freebsd-ports/graphics/libimg/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

63 lines
1.9 KiB
Makefile

PORTNAME= libimg
PORTVERSION= 1.4.12
CATEGORIES?= graphics tk tcl
MASTER_SITES= SF/tkimg/tkimg/${PORTVERSION:R}/tkimg%20${PORTVERSION}
DISTNAME= Img-${PORTVERSION}-Source
MAINTAINER= mi@aldan.algebra.com
COMMENT= Library of image format handlers for Tk4.1 and later
WWW= http://members1.chello.nl/~j.nijtmans/img.html
LICENSE= TclTk
LICENSE_NAME= Tcl/Tk License
LICENSE_FILE= ${WRKSRC}/license.terms
LICENSE_PERMS= auto-accept pkg-sell pkg-mirror dist-sell dist-mirror
BUILD_DEPENDS= dtplite:devel/tcllib
LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2 \
libpng.so:graphics/png \
libtiff.so:graphics/tiff
USES= autoreconf jpeg tk:tea xorg dos2unix
PLIST_SUB+= PORTVERSION=${PORTVERSION}
USE_XORG= x11 xext xft xrender xscrnsaver
OPTIONS_DEFINE= EXAMPLES
OPTIONS_SUB= yes
WRKSRC= ${WRKDIR}/Img-${PORTVERSION}
DOS2UNIX_GLOB= *.[ch] *.tcl *.msg *.in *.test license.terms
# We don't need the bundled libraries:
EXTRACT_AFTER_ARGS= --exclude 'config.*' --exclude Makefile --exclude \
'compat' --exclude win
MAKE_ARGS+= INSTALL_ROOT="${STAGEDIR}"
CONFIGURE_ENV= WRKDIR="${WRKDIR}"
CONFIGURE_ARGS+=--enable-shared --disable-stubs
post-patch:
${REINPLACE_CMD} -E -e 's,"(zlib|tiff|jpeg|png)tcl.h",<\1.h>,' \
-e 's,jpeg\.h,jpeglib.h,' ${WRKSRC}/*/*.[ch]
.for d in jpeg png tiff zlib
${TOUCH} ${WRKDIR}/$dtclConfig.sh
.endfor
post-configure:
.for l in jpeg png tiff
# Link with -l$l
${REINPLACE_CMD} -E \
-e 's,^SHLIB_LD_LIBS[[:space:]]*=[[:space:]]*(.*),SHLIB_LD_LIBS=\1 -l$l,' \
${WRKSRC}/$l/Makefile
.endfor
do-test:
cd ${WRKSRC}/tests && \
${SETENV} TCLLIBPATH=${WRKSRC:Q} ${WISH} ${WRKSRC}/tests/all
post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/msgs/
${INSTALL_DATA} ${WRKSRC}/msgs/*.msg ${STAGEDIR}${EXAMPLESDIR}/msgs/
${INSTALL_SCRIPT} ${WRKSRC}/demo.tcl ${WRKSRC}/tkv.tcl ${STAGEDIR}${EXAMPLESDIR}/
.include <bsd.port.mk>