freebsd-ports/print/ghostscript7-base/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

122 lines
3.1 KiB
Makefile

PORTNAME= ghostscript
PORTVERSION= 7.07
PORTREVISION= 32
CATEGORIES= print
MASTER_SITES= SF/ghostscript/gnu-gs/${PORTVERSION}:gs_srcs \
PORTS_JP:ports_jp,ports_jp_gs
PKGNAMESUFFIX= 7-base
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:gs_srcs
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= hrs@FreeBSD.org
COMMENT= Ghostscript 7.x PostScript interpreter
WWW= https://www.cs.wisc.edu/~ghost/doc/gnu/index.htm
LICENSE= GPLv2
LIB_DEPENDS= libpng.so:graphics/png
RUN_DEPENDS= ${LOCALBASE}/share/ghostscript/fonts/a010013l.pfb:print/gsfonts
CONFLICTS_INSTALL= ghostscript*-base # CHECK
USES= autoreconf cpe gmake jpeg shebangfix tar:bzip2
USE_LDCONFIG= yes
CPE_VENDOR= artifex
SHEBANG_FILES= lib/fixmswrd.pl
# normazile WRKSRC so things like cups-pstoraster may work
WRKSRC= ${WRKDIR}/${PORTNAME}
MAKE_JOBS_UNSAFE= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= ${MAKE_ENV}
CONFIGURE_ARGS= --disable-compile-inits \
--enable-dynamic \
--with-ijs \
--without-x
MAKE_ENV= CFLAGS_STANDARD="${CFLAGS}" \
XCFLAGS="${XCFLAGS}" XLDFLAGS="${XLDFLAGS}" \
EXTRALIBS="${EXTRALIBS}"
CPPFLAGS+= -fPIC -DUPD_SIGNAL=0 -I. \
-I${WRKSRC}/gimp-print \
-I${LOCALBASE}/include
XCFLAGS+= -DA4
LDFLAGS+= ${XLDFLAGS}
XLDFLAGS= -lpthread \
-L${LOCALBASE}/lib \
-L${WRKSRC}/gimp-print
ALL_TARGET= so
INSTALL_TARGET= soinstall
PLIST_SUB= SHLIB_VER="${PORTVERSION:R}" \
GS_VERSION="${PORTVERSION}"
OPTIONS_DEFINE= DOCS
NO_OPTIONS_SORT=yes
post-extract-all:
${LN} -sf ${WRKDIR}/${DISTNAME} ${WRKDIR}/${PORTNAME}
post-extract: post-extract-all
.include "Makefile.drivers"
.include <bsd.port.options.mk>
.include "files/Makefile.drivers_post"
.for D in ${OPTIONS_DEFINE:MGS_*:S/^GS_//} \
${OPTIONS_GROUP_SVGALIB:MGS_*:S/^GS_//}
.if ${PORT_OPTIONS:MGS_${D}}
PLIST_SUB+= GS_${D}=""
.else
PLIST_SUB+= GS_${D}="@comment "
.endif
.endfor
.if ${PORT_OPTIONS:MGS_pcl3}
ALL_TARGET+= pcl3opts
.endif
# contributed uniprint profiles
CONTRIB_UPP= lqx70ch.upp lqx70cl.upp lqx70cm.upp \
stc740ih.upp stc740p.upp stc740pl.upp
post-patch:
${REINPLACE_CMD} -e 's,%%DATADIR%%,${DATADIR},' \
${WRKSRC}/lib/gs_res.ps
pre-build-drivers.mak:
@${ECHO_CMD} '# automatically generated' > ${WRKSRC}/src/drivers.mak
.for N in ${DEVS_LIST}
@${ECHO_CMD} 'DEVICE_${N}=' >> ${WRKSRC}/src/drivers.mak
.endfor
.for D in ${OPTIONS_DEFINE:MGS_*:S/^GS_//} \
${OPTIONS_MULTI_X11:MGS_*:S/^GS_//} \
${OPTIONS_GROUP_SVGALIB:MGS_*:S/^GS_//}
.for N in ${DEVS_LIST}
.if ${PORT_OPTIONS:MGS_${D}}
.if !defined(OPTIONS_UNSET) || !${OPTIONS_UNSET:MGS_${D}}
.for X in ${DEVICE_${N}:M${D}.dev}
@${ECHO_CMD} 'DEVICE_${N}+= $$(DD)${D}.dev' >> ${WRKSRC}/src/drivers.mak
.endfor
.endif
.endif
.endfor
.endfor
pre-build-contrib_extra.mak:
${CAT} /dev/null ${EXTRADEVMKFILE} > ${WRKSRC}/src/contrib_extra.mak
pre-build-all:
${MKDIR} ${WRKSRC}/obj ${WRKSRC}/bin
pre-build: pre-build-all pre-build-drivers.mak pre-build-contrib_extra.mak
pre-install:
${MKDIR} ${STAGEDIR}${DATADIR}
post-install:
${LN} -sf gsc ${STAGEDIR}${PREFIX}/bin/gs
cd ${FILESDIR} && ${INSTALL_DATA} ${CONTRIB_UPP} \
${STAGEDIR}${DATADIR}/${PORTVERSION}/lib
post-install-DOCS-on: post-install-docs
.include <bsd.port.mk>