aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2021-02-28 09:34:36 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2021-02-28 09:34:36 +0000
commitc46b723a3ff687f3a6d86a6ddb61482a6008ab16 (patch)
tree1dee35b3c2c9bc538508358fc1002b55b118505b /editors
parent215e0ad16e760707bcc944455590f28fa49630d7 (diff)
downloadports-c46b723a3ff687f3a6d86a6ddb61482a6008ab16.tar.gz
ports-c46b723a3ff687f3a6d86a6ddb61482a6008ab16.zip
Notes
Diffstat (limited to 'editors')
-rw-r--r--editors/Makefile1
-rw-r--r--editors/mg-static/Makefile19
-rw-r--r--editors/mg/Makefile27
3 files changed, 23 insertions, 24 deletions
diff --git a/editors/Makefile b/editors/Makefile
index ac203792d6bb..c3e58f673f33 100644
--- a/editors/Makefile
+++ b/editors/Makefile
@@ -193,7 +193,6 @@
SUBDIR += madedit
SUBDIR += marker
SUBDIR += mg
- SUBDIR += mg-static
SUBDIR += micro
SUBDIR += mined
SUBDIR += mle
diff --git a/editors/mg-static/Makefile b/editors/mg-static/Makefile
deleted file mode 100644
index 64cf312a9d85..000000000000
--- a/editors/mg-static/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# $FreeBSD$
-
-PORTEPOCH= 0 # don't bump accidentally
-PKGNAMESUFFIX= -static
-
-COMMENT= Small, fast Emacs-like editor (rescue(8) version)
-
-MASTERDIR= ${.CURDIR}/../mg
-
-CONFIGURE_ARGS= --enable-static
-PLIST_FILES= /rescue/${PORTNAME}
-
-OPTIONS_EXCLUDE=DOCS
-
-do-install:
- ${MKDIR} ${STAGEDIR}${PLIST_FILES:[1]:H}
- ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PLIST_FILES:[1]}
-
-.include "${MASTERDIR}/Makefile"
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>