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 + 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 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