aboutsummaryrefslogtreecommitdiff
path: root/editors/mg/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'editors/mg/Makefile')
-rw-r--r--editors/mg/Makefile27
1 files changed, 23 insertions, 4 deletions
diff --git a/editors/mg/Makefile b/editors/mg/Makefile
index 260b23d45988..10754f28c9e9 100644
--- a/editors/mg/Makefile
+++ b/editors/mg/Makefile
@@ -3,25 +3,44 @@
PORTNAME= mg
PORTVERSION= 6.8.1
-PORTEPOCH?= 1
+PORTEPOCH= 1
CATEGORIES= editors
MASTER_SITES= https://github.com/ibara/mg/releases/download/mg-${PORTVERSION}/
-MAINTAINER= ports@FreeBSD.org
-COMMENT?= Small, fast Emacs-like editor
+MAINTAINER= tobik@FreeBSD.org
+COMMENT= Small, fast Emacs-like editor
LICENSE= PD
+FLAVORS= dynamic static
+FLAVOR?= ${FLAVORS:[1]}
+
+static_PKGNAMESUFFIX= -static
+.if ${FLAVOR} == static
+COMMENT+= (rescue(8) version)
+.endif
+
USES= ncurses
HAS_CONFIGURE= yes
-PLIST_FILES?= bin/mg \
+.if ${FLAVOR} == static
+CONFIGURE_ARGS= --enable-static
+PLIST_FILES= /rescue/mg
+.else
+PLIST_FILES= bin/mg \
man/man1/mg.1.gz
PORTDOCS= README-Mg README.md tutorial
OPTIONS_DEFINE= DOCS
+.endif
+.if ${FLAVOR} == static
+do-install:
+ @${MKDIR} ${STAGEDIR}/rescue
+ ${INSTALL_PROGRAM} ${WRKSRC}/mg ${STAGEDIR}/rescue
+.else
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
+.endif
.include <bsd.port.mk>