aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2024-04-22 18:30:11 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2024-04-22 18:30:11 +0000
commitce40706f11a1fefdfa5456073350a300a9cdebb1 (patch)
treec8d15b1cdf8c87ff437e27541f748961b1902b20
parent38968fa4ef4faad856e5863df96c3d6f0c55f028 (diff)
downloadports-ce40706f11a1fefdfa5456073350a300a9cdebb1.tar.gz
ports-ce40706f11a1fefdfa5456073350a300a9cdebb1.zip
german/dict: add OPTIONS
remove WWW and online version fix for agrep 3.x option for ugrep take maingtainership
-rw-r--r--german/dict/Makefile33
-rw-r--r--german/dict/pkg-descr2
2 files changed, 29 insertions, 6 deletions
diff --git a/german/dict/Makefile b/german/dict/Makefile
index d13453741645..589758bb256c 100644
--- a/german/dict/Makefile
+++ b/german/dict/Makefile
@@ -1,29 +1,54 @@
PORTNAME= dict
PORTVERSION= 1.2
+PORTREVISION= 1
CATEGORIES= german
MASTER_SITES= http://wolfram.schneider.org/src/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${dict}.gz
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= dinoex@FreeBSD.org
COMMENT= Simple English/German dictionary
WWW= http://www.de.freebsd.org/~wosch/dict/dict.cgi
LICENSE= BSD2CLAUSE
-RUN_DEPENDS= agrep:textproc/agrep
-
NO_BUILD= yes
PLIST_FILES= bin/de-dict share/ger-eng.txt
dict= ger-eng.txt
+OPTIONS_DEFINE=
+OPTIONS_DEFAULT=AGREP
+OPTIONS_SINGLE= GREP
+OPTIONS_SINGLE_GREP= AGREP UGREP
+GREP_DESC= grep with
+AGREP_DESC= use agrep
+UGREP_DESC= use ugrep
+AGREP_RUN_DEPENDS= agrep:textproc/agrep
+UGREP_RUN_DEPENDS= ugrep:textproc/ugrep
+
+.include <bsd.port.options.mk>
+
post-extract: ${dict}
${dict}:
${GZCAT} < ${DISTDIR}/${dict}.gz > ${WRKSRC}/${.TARGET}
+do-configure:
+.if ${PORT_OPTIONS:MAGREP}
+ ${REINPLACE_CMD} \
+ -e 's|^agrep_opt=.*|agrep_opt="-V0 -i"|' \
+ ${WRKSRC}/dict.sh
+.endif
+.if ${PORT_OPTIONS:MUGREP}
+ ${REINPLACE_CMD} \
+ -e 's|^agrep=.*|agrep="ugrep"|' \
+ -e 's|^agrep_opt=.*|agrep_opt="--no-line-number -i"|' \
+ -e 's| -B | --fuzzy=1 |' \
+ ${WRKSRC}/dict.sh
+.endif
+
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/dict.sh ${STAGEDIR}${PREFIX}/bin/de-dict
- ${INSTALL_DATA} ${WRKSRC}/ger-eng.txt ${STAGEDIR}${PREFIX}/share
+ ${INSTALL_DATA} ${WRKSRC}/ger-eng.txt ${STAGEDIR}${PREFIX}/share/
.include <bsd.port.mk>
diff --git a/german/dict/pkg-descr b/german/dict/pkg-descr
index d73279b9f953..3088895555e7 100644
--- a/german/dict/pkg-descr
+++ b/german/dict/pkg-descr
@@ -1,3 +1 @@
A simple German <-> English dictionary with ~115,000 entries, 3.2MB data.
-
-For an online example, try