freebsd-ports/chinese/fcitx/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

116 lines
3.4 KiB
Makefile

PORTNAME= fcitx
PORTVERSION= 4.2.9.8
CATEGORIES= chinese x11
MASTER_SITES= http://download.fcitx-im.org/fcitx/:fcitx \
http://download.fcitx-im.org/data/:data
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:fcitx \
en_dict-${_DICT_VER}.tar.gz:data \
pinyin.tar.gz:data \
py_stroke-${_PYSTROKE_VER}.tar.gz:data \
py_table-${_PYTABLE_VER}.tar.gz:data \
table.tar.gz:data
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= lichray@gmail.com
COMMENT= Flexible Input Method Framework
WWW= https://fcitx-im.org/wiki/Fcitx
LICENSE= GPLv2
BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/iso-codes.pc:misc/iso-codes \
bash:shells/bash \
${LOCALBASE}/libdata/pkgconfig/xkeyboard-config.pc:x11/xkeyboard-config
LIB_DEPENDS= libcairo.so:graphics/cairo \
libdbus-1.so:devel/dbus \
libenchant-2.so:textproc/enchant2 \
libjson-c.so:devel/json-c \
libXfixes.so:x11/libXfixes \
libXinerama.so:x11/libXinerama \
libXrender.so:x11/libXrender \
libxkbcommon.so:x11/libxkbcommon \
libuuid.so:misc/e2fsprogs-libuuid
RUN_DEPENDS= xdg-open:devel/xdg-utils \
xkeyboard-config>=0:x11/xkeyboard-config
SUB_FILES= pkg-message
SUB_LIST+= PORTSDIR=${PORTSDIR}
CONFLICTS_INSTALL= fcitx5 zh-fcitx5-chinese-addons # bin/createPYMB share/icons/hicolor/128x128/apps/fcitx.png share/icons/hicolor/16x16/apps/fcitx-fullwidth-active.png
USE_GNOME= pango intltool libxml2 introspection
USE_KDE= ecm
USE_XORG= x11 xext xkbfile sm ice
USE_LDCONFIG= yes
USES= compiler:c++11-lang gnome tar:xz cmake:noninja desktop-file-utils \
gettext-tools:build,run gettext-runtime iconv:wchar_t \
kde:5 pkgconfig shared-mime-info compiler:c++14-lang xorg
OPTIONS_DEFINE= GTK2 GTK3 OPENCC TPUNC DOCS
OPTIONS_DEFAULT=GTK2 GTK3
OPTIONS_SUB= yes
GTK2_DESC= Enable Gtk2 IM module
GTK2_USE= GNOME=gtk20
GTK2_CMAKE_ON= -DENABLE_GTK2_IM_MODULE=ON
GTK3_DESC= Enable Gtk3 IM module
GTK3_USE= GNOME=gtk30
GTK3_CMAKE_ON= -DENABLE_GTK3_IM_MODULE=ON
OPENCC_DESC= Enable OpenCC for Chinese Transform
TPUNC_DESC= Use traditional quotation marks
.include <bsd.port.options.mk>
CMAKE_ARGS+= -DENABLE_XDGAUTOSTART=OFF -DFORCE_ENCHANT=ON \
-DLIBICONV_LIBC_HAS_ICONV_OPEN=OFF \
-DDATADIR=${DATADIR} \
-DDOCSDIR=${DOCSDIR} \
-DGOBJECT_INTROSPECTION_GIRDIR=${PREFIX}/share/gir-1.0 \
-DGOBJECT_INTROSPECTION_TYPELIBDIR=${PREFIX}/lib/girepository-1.0 \
-DMANPREFIX=${MANPREFIX} \
-DPREFIX=${PREFIX} \
-DENABLE_QT=OFF -DENABLE_QT_IM_MODULE=OFF -DENABLE_QT_GUI=OFF
.if ${PORT_OPTIONS:MGTK2}
SUB_LIST+= GTK2_IM=fcitx
.else
SUB_LIST+= GTK2_IM=xim
.endif
.if ${PORT_OPTIONS:MGTK3}
PLIST_SUB+= GTK3=""
SUB_LIST+= GTK3_IM=fcitx
.else
PLIST_SUB+= GTK3="@comment "
SUB_LIST+= GTK3_IM=xim
.endif
.if ${PORT_OPTIONS:MOPENCC}
LIB_DEPENDS+= libopencc.so:chinese/opencc
.else
CMAKE_ARGS+= -DENABLE_OPENCC=OFF
.endif
.if ${PORT_OPTIONS:MTPUNC}
EXTRA_PATCHES+= ${FILESDIR}/tpunc-data_punc.mb.zh_CN
.endif
.if defined(WITH_DEBUG)
CMAKE_ARGS+= -DENABLE_DEBUG=ON
.endif
_DICT_VER= 20121020
_PYSTROKE_VER= 20121124
_PYTABLE_VER= 20121124
post-patch:
@${CP} ${_DISTDIR}/en_dict-${_DICT_VER}.tar.gz ${WRKSRC}/src/module/spell/dict/.
@${CP} ${_DISTDIR}/pinyin.tar.gz ${WRKSRC}/src/im/pinyin/data/.
@${CP} ${_DISTDIR}/py_stroke-${_PYSTROKE_VER}.tar.gz ${WRKSRC}/src/module/pinyin-enhance/data/.
@${CP} ${_DISTDIR}/py_table-${_PYTABLE_VER}.tar.gz ${WRKSRC}/src/module/pinyin-enhance/data/.
@${CP} ${_DISTDIR}/table.tar.gz ${WRKSRC}/src/im/table/data/.
.include <bsd.port.mk>