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