7 MASTER_SITES= http://downloads.ghostscript.com/public/:gs_srcs \
8 SF/ghostscript/GPL%20Ghostscript/${PORTVERSION}:gs_srcs \
9 ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/gs${PORTVERSION:S/.//}/:gs_srcs \
10 http://www.humblesoft.com/pub/:epag
11 PKGNAMESUFFIX= 9-agpl-base
12 DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:gs_srcs ${EPAG_SRCS}:epag
13 DIST_SUBDIR= ${PORTNAME}
14 EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
16 MAINTAINER= doceng@FreeBSD.org
17 COMMENT= Ghostscript 9.x PostScript interpreter, base part
21 LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2 \
22 libfreetype.so:${PORTSDIR}/print/freetype2 \
23 libidn.so:${PORTSDIR}/dns/libidn \
24 libjbig2dec.so:${PORTSDIR}/graphics/jbig2dec \
25 liblcms2.so:${PORTSDIR}/graphics/lcms2 \
26 libpaper.so:${PORTSDIR}/print/libpaper \
27 libpng.so:${PORTSDIR}/graphics/png \
28 libtiff.so:${PORTSDIR}/graphics/tiff
29 RUN_DEPENDS= ${LOCALBASE}/share/${PORTNAME}/fonts/a010013l.pfb:${PORTSDIR}/print/gsfonts
33 ghostscript[789]-[0-9]* \
34 ghostscript[789]-nox11-[0-9]* \
35 ghostscript9-agpl-[0-9]* \
36 ghostscript9-agpl-nox11-[0-9]*
38 USES= autoreconf gmake iconv jpeg pkgconfig:build tar:bzip2
40 EXTRACT_AFTER_ARGS= ${EXCLUDE_DIRS:S/^/--exclude /}
41 DATADIR= ${PREFIX}/share/${PORTNAME}/${PORTVERSION}
43 MAKE_ENV= CFLAGS_STANDARD="${CFLAGS}" \
44 XCFLAGS="${XCFLAGS}" XLDFLAGS="${XLDFLAGS}" \
45 SOC_LOADER="dxmainc.c"
46 CONFIGURE_ENV= ${MAKE_ENV}
47 CONFIGURE_ARGS= --disable-compile-inits \
51 --with-libiconv=native \
52 --with-system-libtiff \
59 CPPFLAGS+= -DUPD_SIGNAL=0 -I. \
60 -I${LOCALBASE}/include/libpng \
61 -I${WRKSRC}/openjpeg/src/lib/openjp2 \
62 -I${LOCALBASE}/include
63 LDFLAGS+= -L${LOCALBASE}/lib
67 INSTALL_TARGET= soinstall
68 PLIST_SUB= SHLIB_VER="${PORTVERSION:R}" \
69 GS_VERSION="${PORTVERSION}"
70 SUB_FILES= pkg-message
71 SUB_LIST= DATADIR="${DATADIR}"
72 PKGMESSAGE= ${WRKDIR}/pkg-message
74 OPTIONS_DEFINE= DOCS CUPS FONTCONFIG ICONV
75 OPTIONS_DEFAULT=DOCS CUPS FONTCONFIG ICONV
77 FONTCONFIG_DESC=Enable fontconfig support
78 FONTCONFIG_LIB_DEPENDS= libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig
79 FONTCONFIG_CONFIGURE_ENABLE= fontconfig
82 EXCLUDE_DIRS= freetype jbig2dec jpeg expat lcms2 libpng tiff zlib
84 .include "Makefile.drivers"
85 .include <bsd.port.options.mk>
86 .include "files/Makefile.drivers_post"
88 PORTDOCS= japanese chp2200 epson740 lxm3200-tweaked md2k_md5k
89 PORTDOC_FILES= japanese/Gdevlips.htm japanese/README.gs550j \
90 japanese/cdj880.txt japanese/dj505j.txt japanese/djgpp.txt \
91 japanese/gdev10v.txt japanese/gdevalps.txt \
92 japanese/gdevcd8.txt japanese/gdevdmpr.txt \
93 japanese/gdevfmlbp.txt japanese/gdevj100.txt \
94 japanese/gdevlbp3.txt japanese/gdevmag.txt \
95 japanese/gdevmd2k.txt japanese/gdevmjc.txt \
96 japanese/gdevml6.txt japanese/gdevp201.txt japanese/gs261j.euc \
97 japanese/gs261j.txt chp2200/AUTHORS chp2200/INSTALL \
98 epson740/README epson740/upp-HowTo-to-be \
99 lxm3200-tweaked/LICENSE lxm3200-tweaked/README \
100 lxm3200-tweaked/RELEASE_NOTES \
101 lxm3200-tweaked/Z12-Z31-QuickSetup md2k_md5k/README.jis
104 ${REINPLACE_CMD} -e 's,%%DATADIR%%,${DATADIR},' \
105 ${WRKSRC}/contrib/japanese/dmp_site.ps
107 pre-build-drivers.mak:
108 @${ECHO_CMD} '# automatically generated' > ${WRKSRC}/base/drivers.mak
109 @${ECHO_CMD} 'DEVICE_DEVS=$${DISPLAY_DEV}' >> ${WRKSRC}/base/drivers.mak
110 .for N in ${DEVS_LIST}
111 @${ECHO_CMD} '${N:S/^/DEVICE_/:S/^DEVICE_DISPLAY_DEV/DISPLAY_DEV/}=' >> ${WRKSRC}/base/drivers.mak
113 .for D in ${OPTIONS_DEFINE:MGS_*:S/^GS_//} \
114 ${OPTIONS_GROUP_ICONV:MGS_*:S/^GS_//} \
115 ${OPTIONS_GROUP_SVGALIB:MGS_*:S/^GS_//}
116 .for N in ${DEVS_LIST}
117 .if ${PORT_OPTIONS:MGS_${D}}
118 .if !defined(OPTIONS_UNSET) || !${OPTIONS_UNSET:MGS_${D}}
119 .for X in ${${N:S/^/DEVICE_/:S/^DEVICE_DISPLAY_DEV/DISPLAY_DEV/}:M${D}.dev}
120 @${ECHO_CMD} '${N:S/^/DEVICE_/:S/^DEVICE_DISPLAY_DEV/DISPLAY_DEV/}+= $$(DD)${D}.dev' >> ${WRKSRC}/base/drivers.mak
127 pre-build: pre-build-drivers.mak
128 ${MKDIR} ${WRKSRC}/obj
129 ${MKDIR} ${WRKSRC}/bin
132 cd ${WRKSRC}/Resource/Init && ${RM} -f \
133 gs_statd.ps.orig gs_ttf.ps.orig pdf_font.ps.orig
134 ${MKDIR} ${STAGEDIR}${DATADIR}
136 post-install-DOCS-on: post-install-docs
137 ${MKDIR} ${WRKSRC}/contrib/japanese
138 ${INSTALL_DATA} ${WRKSRC}/contrib/japanese/doc/* \
139 ${WRKSRC}/contrib/japanese
140 ${MKDIR} ${STAGEDIR}${DOCSDIR}
141 cd ${WRKSRC}/contrib && \
142 ${TAR} -cf - ${PORTDOC_FILES} | \
143 (cd ${STAGEDIR}${DOCSDIR} && ${TAR} -xof -)
146 ${LN} -sf gsc ${STAGEDIR}${PREFIX}/bin/gs
147 ${LN} -s -f ${LOCALBASE}/share/fonts/CIDFont \
148 ${STAGEDIR}${DATADIR}/Resource/CIDFont/fonts
150 .include <bsd.port.mk>