f5ef7f193b
Let ghostscript-encrypt grab its directory directly from aladdin or gnu ghostscript. Includes a perfectly sick hack to obtain PDFDIR from those directories: we do need PORTSDIR at Makefile parsing time, and for that, we just hack its value from the current Makefile, avoiding endless recursion with a flag. Note that this hack is clean though, and doesn't need extra knowledge from the rest of the ports tree.
118 lines
3.3 KiB
Makefile
118 lines
3.3 KiB
Makefile
# $OpenBSD: Makefile,v 1.16 2001/04/13 17:01:05 espie Exp $
|
|
# Original from: Andreas Klemm <andreas@klemm.gtn.com>
|
|
|
|
COMMENT= "GNU Postscript interpreter"
|
|
VERSION= 5.50
|
|
DISTNAME= ghostscript-${VERSION}
|
|
CATEGORIES= print
|
|
NEED_VERSION= 1.395
|
|
|
|
DIR= gnu/gs${VERSION:S/.//}
|
|
|
|
# Eventually, the FSF should wake up...
|
|
MASTER_SITE_SUBDIR= ghostscript
|
|
MASTER_SITES= ${GS_SITES} ${MASTER_SITE_GNU}
|
|
|
|
HOMEPAGE= http://www.cs.wisc.edu/%7Eghost/
|
|
|
|
MASTER_SITES0= http://www.erdw.ethz.ch/%7Ebonk/ftp/gs-driver-distrib/
|
|
|
|
DISTFILES= ${GS_SOURCES} ${GS_FONTS_STD} ${GS_FONTS_OTHER} \
|
|
${HP850_DRV}:0
|
|
|
|
SUBST_VARS= OSREV VERSION
|
|
DIST_SUBDIR= gs
|
|
|
|
# png and jpeg sources are under a BSD license
|
|
LICENSE_TYPE= GPL BSD
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
PERMIT_DISTFILES_FTP= Yes
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
MAINTAINER= ports@openbsd.org
|
|
|
|
JPEGDIR=graphics/jpeg
|
|
PNGDIR=graphics/png
|
|
|
|
BUILD_DEPENDS= /nonexistent::${JPEGDIR}:patch \
|
|
/nonexistent::${PNGDIR}:patch \
|
|
unzip::archivers/unzip \
|
|
|
|
LIB_DEPENDS= png.1::${PNGDIR}
|
|
|
|
EXTRACT_ONLY= ${GS_SOURCES}
|
|
WRKDIST= ${WRKDIR}/gs${VERSION}
|
|
BASE_FLAGS= INSTALL_PROGRAM='${INSTALL_SCRIPT}' \
|
|
INSTALL_DATA='${INSTALL_DATA}' \
|
|
SHARE_LIBPNG=1 \
|
|
SHARE_ZLIB=1 \
|
|
CFLAGS_STANDARD='${CFLAGS}' \
|
|
XLDFLAGS=-L${PREFIX}/lib \
|
|
XINCLUDE=-I${X11BASE}/include \
|
|
XLIBS='Xt SM ICE Xext X11' \
|
|
XLIBDIRS=-L${X11BASE}/lib \
|
|
GLOBJDIR=./objects \
|
|
GLGENDIR=./objects \
|
|
PSOBJDIR=./objects \
|
|
PSGENDIR=./objects \
|
|
DEVICE_DEVS="`cat ${FILESDIR}/devices`"
|
|
|
|
PDFDIR=share/ghostscript/${VERSION}
|
|
|
|
MAKE_FLAGS= ${BASE_FLAGS} prefix=${PREFIX}
|
|
FAKE_FLAGS= ${BASE_FLAGS} prefix=${WRKINST}${PREFIX}
|
|
|
|
MAKE_FILE= unixansi.mak
|
|
MAN1= gs.1 pdf2dsc.1 pdf2ps.1 ps2ascii.1 ps2epsi.1 ps2pdf.1 ps2ps.1
|
|
|
|
GS_SOURCES= gnu-gs-${VERSION}.tar.gz
|
|
# Note: the following two are real files that have symlinks with
|
|
# later version numbers pointing to them. To avoid unnecessarily
|
|
# downloading distfiles, do not change these when upgrading the port
|
|
# unless the files really change.
|
|
GS_FONTS_STD= gnu-gs-fonts-std-5.50.tar.gz
|
|
GS_FONTS_OTHER= gnu-gs-fonts-other-5.50.tar.gz
|
|
|
|
# Additional driver HP 850, see http://www.erdw.ethz.ch/~bonk/hp850/hp850.html
|
|
HP850_DRV= hp8xxs13.zip
|
|
|
|
# The pdf_sec.ps non-stub version has been moved to a separate package
|
|
|
|
|
|
FLAVORS=A4
|
|
|
|
FLAVOR?=
|
|
.if ${FLAVOR:U} == "A4"
|
|
CFLAGS+= -DA4
|
|
.endif
|
|
|
|
post-extract:
|
|
ln -s `cd ${PORTSDIR} && cd ${JPEGDIR} && make show VARNAME=WRKDIST` ${WRKSRC}/jpeg
|
|
ln -s `cd ${PORTSDIR} && cd ${PNGDIR} && make show VARNAME=WRKDIST` ${WRKSRC}/libpng
|
|
cd ${WRKSRC} && unzip -Lao ${FULLDISTDIR}/${HP850_DRV} -x devs.mak
|
|
|
|
pre-build:
|
|
mkdir -p ${WRKSRC}/objects
|
|
|
|
pre-install:
|
|
@${INSTALL_DATA_DIR} ${PREFIX}/share/ghostscript
|
|
@${INSTALL_PROGRAM_DIR} ${PREFIX}/bin
|
|
@${INSTALL_MAN_DIR} ${PREFIX}/man/man1
|
|
cd ${PREFIX}/share/ghostscript && \
|
|
tar xzf ${FULLDISTDIR}/${GS_FONTS_STD}
|
|
cd ${PREFIX}/share/ghostscript/fonts && \
|
|
tar xzf ${FULLDISTDIR}/${GS_FONTS_OTHER}
|
|
|
|
# install the readme and license file of the hp8xxx driver as well
|
|
post-install:
|
|
strip ${PREFIX}/bin/gs
|
|
${INSTALL_SCRIPT} ${WRKSRC}/unix-lpr.sh ${PREFIX}/bin
|
|
${INSTALL_SCRIPT} ${WRKSRC}/lprsetup.sh ${PREFIX}/bin
|
|
${INSTALL_DATA} ${WRKSRC}/license.hp8 \
|
|
${PREFIX}/share/ghostscript/${VERSION}/doc
|
|
${INSTALL_DATA} ${WRKSRC}/readme.hp8 \
|
|
${PREFIX}/share/ghostscript/${VERSION}/doc
|
|
|
|
.include <bsd.port.mk>
|