ports/textproc/uim/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

137 lines
3.7 KiB
Makefile

PORTNAME= uim
PORTVERSION= 1.8.9.b.${SNAPDATE}
CATEGORIES?= textproc
.if !defined(UIM_SLAVE) && defined(WITHOUT_X11)
PKGNAMESUFFIX= -nox11
.endif
MAINTAINER= nobutaka@FreeBSD.org
COMMENT?= Input method library
WWW= https://github.com/uim/uim
LICENSE= BSD3CLAUSE GPLv2+ GPLv3+ LGPL21+ PD
LICENSE_COMB= multi
LICENSE_FILE= ${WRKSRC}/COPYING
BROKEN_riscv64= fails to configure: ./include/private/gcconfig.h:492:5: The collector has not been ported to this machine/OS combination
USES+= autoreconf:build,2.69 gettext gmake gnome iconv libedit \
libtool pathfix pkgconfig sqlite
USE_LDCONFIG= yes
USE_GNOME+= glib20 intltool
USE_GITHUB= yes
GH_TAGNAME= 6d8fcc8
GH_TUPLE= uim:sigscheme:beb8fbd:sigscheme \
uim:libgcroots:d362356:libgcroots
SNAPDATE= 20220318
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-maintainer-mode
OPTIONS_DEFINE= DOCS X11
OPTIONS_DEFAULT= X11
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MX11}
USES+= xorg
USE_XORG+= x11 xext
LIB_DEPENDS+= libXft.so:x11-fonts/libXft
CONFIGURE_ARGS+= --with-x --with-xft
.endif
.if !defined(UIM_SLAVE)
USES+= perl5
USE_GNOME+= librsvg2:build
USE_PERL5= build
USE_RUBY= yes
RUBY_NO_RUN_DEPENDS= yes
.if ${PORT_OPTIONS:MX11}
USE_GNOME+= cairo gdkpixbuf2 gtk30
LIB_DEPENDS+= libfreetype.so:print/freetype2 \
libfontconfig.so:x11-fonts/fontconfig \
libharfbuzz.so:print/harfbuzz
CONFIGURE_ARGS+= --with-gtk3 --enable-default-toolkit=gtk3
.endif
CONFIGURE_ARGS+= --enable-emacs --with-sj3 --with-canna --with-prime
.endif
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
CFLAGS+= -I${LOCALBASE}/include
.if !defined(UIM_SLAVE)
DOCSDIR_JA= ${PREFIX}/share/doc/ja/uim
DOCSDIR_SIGSCHEME= ${PREFIX}/share/doc/uim/sigscheme
PLIST_SUB+= DOCSDIR_JA="${DOCSDIR_JA:S,^${PREFIX}/,,}" \
DOCSDIR_SIGSCHEME="${DOCSDIR_SIGSCHEME:S,^${PREFIX}/,,}"
.endif
.if empty(PORT_OPTIONS:MX11)
PLIST_SUB+= X11="@comment "
.else
PLIST_SUB+= X11=""
.endif
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64" || ${ARCH} == "sparc64"
CONFIGURE_ARGS+= --enable-storage=fatty
.endif
.for _x in x xft gtk2 gtk3 qt5 anthy canna m17nlib prime scim dict
.if ${CONFIGURE_ARGS:M--with-${_x}} == ""
CONFIGURE_ARGS+=--without-${_x}
.endif
.endfor
.for _x in gnome-applet kde-applet emacs pref
.if ${CONFIGURE_ARGS:M--enable-${_x}} == ""
CONFIGURE_ARGS+=--disable-${_x}
.endif
.endfor
post-extract:
${CP} -R ${WRKSRC_sigscheme}/* ${WRKSRC}/sigscheme
${MKDIR} ${WRKSRC}/sigscheme/libgcroots
${CP} -R ${WRKSRC_libgcroots}/* ${WRKSRC}/sigscheme/libgcroots
pre-configure:
cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./autogen.sh
do-build:
.if !defined(UIM_SLAVE)
.for d in replace sigscheme uim scm xim po fep emacs pixmaps tables
cd ${WRKSRC}/${d} && ${MAKE_CMD}
.endfor
.if ${PORT_OPTIONS:MX11}
cd ${WRKSRC}/gtk3/candwin && ${MAKE_CMD}
.endif
.endif
do-install:
.if !defined(UIM_SLAVE)
cd ${WRKSRC} && ${MAKE_CMD} DESTDIR=${STAGEDIR} install-data-am
.for d in sigscheme uim scm xim fep emacs pixmaps tables
cd ${WRKSRC}/${d} && ${MAKE_CMD} DESTDIR=${STAGEDIR} install-strip
.endfor
cd ${WRKSRC}/po && ${MAKE_CMD} DESTDIR=${STAGEDIR} install
.if ${PORT_OPTIONS:MX11}
cd ${WRKSRC}/gtk3/candwin && ${MAKE_CMD} DESTDIR=${STAGEDIR} install-strip
.endif
.endif
.if !defined(UIM_SLAVE)
post-install:
${MKDIR} ${STAGEDIR}${DATADIR}/helperdata
${MKDIR} ${STAGEDIR}${DOCSDIR}
${MKDIR} ${STAGEDIR}${DOCSDIR_JA}
${INSTALL_DATA} ${WRKSRC}/doc/KEY ${STAGEDIR}${DOCSDIR}/KEY
${INSTALL_DATA} ${WRKSRC}/fep/README ${STAGEDIR}${DOCSDIR}/README.fep
${INSTALL_DATA} ${WRKSRC}/fep/README ${STAGEDIR}${DOCSDIR}/README.key
${INSTALL_DATA} ${WRKSRC}/fep/README.ja ${STAGEDIR}${DOCSDIR_JA}/README.fep
${INSTALL_DATA} ${WRKSRC}/xim/README ${STAGEDIR}${DOCSDIR}/README.xim
.endif
.include <bsd.port.post.mk>