freebsd-ports/japanese/edict/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

102 lines
3.8 KiB
Makefile

PORTNAME= edict
PORTVERSION= 19990714
PORTREVISION= 5
CATEGORIES= japanese
MASTER_SITES= \
http://japanology.arts.kuleuven.ac.be/mirrors/monash/ \
http://www.bcit-broadcast.com/monash/ \
ftp://ftp.mirrorservice.org/sites/ftp.cc.monash.edu.au/pub/nihongo/ \
ftp://ftp.edrdg.org/pub/Nihongo/ \
ftp://ftp.u-aizu.ac.jp/pub/SciEng/nihongo/ftp.cc.monash.edu.au/ \
ftp://ftp.funet.fi/pub/culture/japan/mirrors/monash/pub/nihongo/ \
ftp://ftp.uni-duisburg.de/Mirrors/ftp.monash.edu.au/pub/nihongo/ \
ftp://ftp.monash.edu.au/pub/nihongo/
EXTRACT_SUFX= # empty
DISTFILES= ${DICTFILES} ${SRCFILES} ${DOCFILES}
EXTRACT_ONLY= ${SRCFILES}
MAINTAINER= ports@FreeBSD.org
COMMENT= Japanese-English dictionaries with access and maintenance utilities
WWW= http://ftp.monash.edu.au/pub/nihongo/00INDEX.html
DIST_SUBDIR= edict
DICTFILES= edict.gz edicth enamdict.gz compdic.gz \
j_places.gz ediclsd3.zip \
kanjidic.gz kanjd212.gz lawgledt.zip \
lingdic.zip geodic.gz pandpdic.zip \
aviation.zip findic.zip mktdic.zip \
4jword3_edict.zip concrete.zip
SRCFILES= xjdic23.tgz
DOCFILES= edict_doc.html edicth.doc \
enamdict_doc.txt enamdict_doc.html \
j_places.inf kanjidic.doc kanjd212.doc ediclsd3.rme \
lawgldoc.new lingdic.txt geodic.doc aviation.txt \
findic.doc mktdic.doc 4jword3_inf.txt \
concrete.doc
BINFILES= exjdxgen xjdic_cl xjdic_sa xjdserver xjdxgen
# Where to install the data files
DATADIR= ${PREFIX}/share/dict/edict
DOCSDIR= ${PREFIX}/share/doc/xjdic
NO_WRKSUBDIR= yes
# Fix build with clang11
CFLAGS+= -fcommon
OPTIONS_DEFINE= DOCS
post-patch:
@${GREP} -l '^main' ${WRKSRC}/*.c | ${XARGS} ${REINPLACE_CMD} \
-e '/argv/s/unsigned//'
do-install:
(cd ${WRKSRC} && ${INSTALL_PROGRAM} ${BINFILES} ${STAGEDIR}${PREFIX}/bin)
@${MKDIR} ${STAGEDIR}${DATADIR}
${CP} ${_DISTDIR}/edicth ${STAGEDIR}${DATADIR}
.for f in edict enamdict compdic j_places kanjidic kanjd212 geodic
${GZIP_CMD} -cd ${_DISTDIR}/${f}.gz > ${STAGEDIR}${DATADIR}/${f}
.endfor
.for f in ediclsd3 lawgledt lingdic pandpdic aviation findic mktdic \
4jword3_edict concrete
cd ${STAGEDIR}${DATADIR} && \
${TAR} -xf ${_DISTDIR}/${f}.zip ${f:S|edict|edict.euc|}
.endfor
.for dict in ${DICTFILES:S|_edict|_edict.euc|}
(cd ${STAGEDIR}${DATADIR} && ${STAGEDIR}${PREFIX}/bin/xjdxgen ${dict:R})
(cd ${STAGEDIR}${DATADIR} && ${CHMOD} ${SHAREMODE} \
${dict:R} ${dict:R}.xjdx)
.endfor
${RM} ${STAGEDIR}${PREFIX}/bin/xjdic
${LN} -s ${PREFIX}/bin/xjdic_sa ${STAGEDIR}${PREFIX}/bin/xjdic
(cd ${WRKSRC} && ${INSTALL_DATA} radicals.tm radkfile kanjstroke \
romkana.cnv vconj ${STAGEDIR}${DATADIR})
#
# Only 9 dictionaries can be enabled
#
@${ECHO_CMD} dicdir ${DATADIR} > ${STAGEDIR}${DATADIR}/.xjdicrc
@${ECHO_CMD} dicfile edict >> ${STAGEDIR}${DATADIR}/.xjdicrc
@${ECHO_CMD} dicfile enamdict >> ${STAGEDIR}${DATADIR}/.xjdicrc
@${ECHO_CMD} dicfile compdic >> ${STAGEDIR}${DATADIR}/.xjdicrc
@${ECHO_CMD} dicfile ediclsd3 >> ${STAGEDIR}${DATADIR}/.xjdicrc
@${ECHO_CMD} dicfile j_places >> ${STAGEDIR}${DATADIR}/.xjdicrc
# @${ECHO_CMD} dicfile lawgledt >> ${DATADIR}/.xjdicrc
@${ECHO_CMD} dicfile geodic >> ${STAGEDIR}${DATADIR}/.xjdicrc
# @${ECHO_CMD} dicfile pandpdic >> ${DATADIR}/.xjdicrc
@${ECHO_CMD} dicfile aviation >> ${STAGEDIR}${DATADIR}/.xjdicrc
# @${ECHO_CMD} dicfile findic >> ${DATADIR}/.xjdicrc
# @${ECHO_CMD} dicfile mktdic >> ${DATADIR}/.xjdicrc
@${ECHO_CMD} dicfile 4jword3_edict.euc >> ${STAGEDIR}${DATADIR}/.xjdicrc
# @${ECHO_CMD} dicfile concrete.doc >> ${DATADIR}/.xjdicrc
# @${ECHO_CMD} dicfile lingdic >> ${DATADIR}/.xjdicrc
@${CHMOD} ${SHAREMODE} ${STAGEDIR}${DATADIR}/.xjdicrc
${INSTALL_MAN} ${WRKSRC}/xjdic.1 ${STAGEDIR}${PREFIX}/man/man1
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/xjdic23.inf ${STAGEDIR}${DOCSDIR}
(cd ${_DISTDIR} && ${INSTALL_DATA} ${DOCFILES} ${STAGEDIR}${DOCSDIR})
.include <bsd.port.mk>