freebsd-ports/japanese/mecab-ipadic/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

72 lines
2.3 KiB
Makefile

PORTNAME= mecab-ipadic
DISTVERSION= 2.7.0-20070801
PORTREVISION= 1
CATEGORIES= japanese textproc
MASTER_SITES= https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7MWVlSDBCSXZMTXM&dummy=/
MAINTAINER= ports@FreeBSD.org
COMMENT?= MeCab IPA dictionary meta-port
WWW= https://taku910.github.io/mecab/
LICENSE= NAIST ICOT
LICENSE_COMB= multi
LICENSE_NAME_NAIST= NAIST
LICENSE_NAME_ICOT= ICOT
LICENSE_PERMS_NAIST= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
LICENSE_PERMS_ICOT= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
.if empty(PKGNAMESUFFIX)
LICENSE_TEXT_NAIST= See https://github.com/taku910/mecab/blob/master/mecab-ipadic/COPYING
LICENSE_TEXT_ICOT= See https://github.com/taku910/mecab/blob/master/mecab-ipadic/COPYING
USES= metaport
OPTIONS_RADIO= CHARSET
OPTIONS_RADIO_CHARSET= EUCJP SHIFTJIS UTF8
OPTIONS_DEFAULT= UTF8
EUCJP_DESC= Use EUC-JP as dictionary charset.
SHIFTJIS_DESC= Use SHIFT-JIS as dictionary charset.
UTF8_DESC= Use UTF-8 as dictionary charset.
EUCJP_RUN_DEPENDS= ja-mecab-ipadic-eucjp>0:japanese/mecab-ipadic-eucjp
SHIFTJIS_RUN_DEPENDS= ja-mecab-ipadic-sjis>0:japanese/mecab-ipadic-sjis
UTF8_RUN_DEPENDS= ja-mecab-ipadic-utf8>0:japanese/mecab-ipadic-utf8
.endif
.if !empty(PKGNAMESUFFIX)
LICENSE_FILE_NAIST= ${WRKSRC}/COPYING
LICENSE_FILE_ICOT= ${WRKSRC}/COPYING
BUILD_DEPENDS= ja-mecab>=0.94:japanese/mecab
USES= perl5
USE_PERL5= build
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-dicdir=${PREFIX}/lib/mecab/dic/ipadic
.if ${PKGNAMESUFFIX:S,-,,} == "eucjp"
CONFIGURE_ARGS+= --with-charset=euc-jp
CONFLICTS= ja-mecab-ipadic-utf8-[0-9]* ja-mecab-ipadic-sjis-[0-9]*
.elif ${PKGNAMESUFFIX:S,-,,} == "sjis"
CONFIGURE_ARGS+= --with-charset=shiftjis
CONFLICTS= ja-mecab-ipadic-eucjp-[0-9]* ja-mecab-ipadic-utf8-[0-9]*
.elif ${PKGNAMESUFFIX:S,-,,} == "utf8"
CONFIGURE_ARGS+= --with-charset=utf-8
CONFLICTS= ja-mecab-ipadic-eucjp-[0-9]* ja-mecab-ipadic-sjis-[0-9]*
.endif
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
PLIST_FILES= \
lib/mecab/dic/ipadic/char.bin \
lib/mecab/dic/ipadic/dicrc \
lib/mecab/dic/ipadic/left-id.def \
lib/mecab/dic/ipadic/matrix.bin \
lib/mecab/dic/ipadic/pos-id.def \
lib/mecab/dic/ipadic/rewrite.def \
lib/mecab/dic/ipadic/right-id.def \
lib/mecab/dic/ipadic/sys.dic \
lib/mecab/dic/ipadic/unk.dic
.endif # !empty(PKGNAMESUFFIX)
.include <bsd.port.mk>