blob: def37c305a73eaea537022190fba8fa1998135d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
# $NetBSD: Makefile.common,v 1.12 2001/05/03 05:13:20 jlam Exp $
DISTNAME= ghostscript-${GS_VERS}
GS_VERS= 6.01
CATEGORIES= print
MASTER_SITES+= http://download.sourceforge.net/ghostscript/ \
ftp://ftp.cs.wisc.edu/ghost/aladdin/gs601/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= jlam@netbsd.org
HOMEPAGE= http://www.cs.wisc.edu/~ghost/index.html
DEPENDS+= ghostscript-fonts-6.0:../../fonts/ghostscript-fonts
DEPENDS+= ja-vflib-lib-2.*:../../japanese/vflib-lib
DEPENDS+= watanabe-vfont-19930318:../../fonts/watanabe_vfont
DEPENDS+= png>=1.0.6:../../graphics/png
GS_SOURCES= ${DISTNAME}${EXTRACT_SUFX}
DISTFILES+= ${GS_SOURCES}
# Adobe's JPEG implementation in their PDF/PS documents is non-standard,
# so we can't use an already installed libjpeg.so.
#
MASTER_SITES+= ftp://ftp.uu.net/graphics/jpeg/
JPEG_SOURCES= jpegsrc.v6b.tar.gz
DISTFILES+= ${JPEG_SOURCES}
EXTRACT_LIST+= ${JPEG_SOURCES}
# VFlib & Japanese PDF patch
PATCH_SITES= http://www.sat.t.u-tokyo.ac.jp/~hideyuki/Ghostscript/
PATCHFILES= gs${GS_VERS}-jpdf-exp.patch.gz
PATCH_DIST_STRIP= -p1
# PostScript source to decode encrypted PDF files
MASTER_SITES+= http://www.ozemail.com.au/~geoffk/pdfencrypt/
PDF_SEC= pdf_sec.ps
DISTFILES+= ${PDF_SEC}
# Additional driver for several HP deskjets
MASTER_SITES+= ftp://ftp.sbs.de/pub/graphics/ghostscript/pcl3/
HPDJ_DRV= hpdj-2.6
DISTFILES+= ${HPDJ_DRV}.tar.gz
EXTRACT_LIST+= ${HPDJ_DRV}.tar.gz
# I don't know the primary destribution sites of these drivers....
MASTER_SITES+= ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/
DMPRT_DRV= dmprt-2.01
DISTFILES+= ${DMPRT_DRV}.tar.gz
EXTRACT_LIST+= ${DMPRT_DRV}.tar.gz
BJ10V_DRV= gdev10v
DISTFILES+= ${BJ10V_DRV}.tar.gz
EXTRACT_LIST+= ${BJ10V_DRV}.tar.gz
# EPSON MJ-700V2C
MJC_DRV= gdevmjc-0.8
DISTFILES+= ${MJC_DRV}.tar.gz
EXTRACT_LIST+= ${MJC_DRV}.tar.gz
# Alps MD5000 printer 600dpi monochrome mode
MD5000_DRV= gdevalps-0.2
DISTFILES+= ${MD5000_DRV}.tar.gz
EXTRACT_LIST+= ${MD5000_DRV}.tar.gz
# Alps MD-2000/2010/4000/1300/1500/5000
MASTER_SITES+= http://plaza26.mbn.or.jp/~higamasa/gdevmd2k/
MD2000_DRV= gdevmd2k-0.2a
DISTFILES+= ${MD2000_DRV}.tar.gz
EXTRACT_LIST+= ${MD2000_DRV}.tar.gz
# Canon LIPS II+, III, IV; EPSON ESC/Page; NEC NPDL drivers
MASTER_SITES+= http://www.bukka.p.chiba-u.ac.jp/~ohmori/gs/
LIPS_DRV= gdevlips-2.3.6
DISTFILES+= ${LIPS_DRV}.tar.gz
EXTRACT_LIST+= ${LIPS_DRV}.tar.gz
# Ricoh RPDL
MASTER_SITES+= http://home.jp.FreeBSD.org/~mita/LOCAL_PORTS/
RPDL_DRV= gdevrpdl
DISTFILES+= ${RPDL_DRV}.tar.gz
EXTRACT_LIST+= ${RPDL_DRV}.tar.gz
# Kyocera Prescribe
MASTER_SITES+= ${MASTER_SITE_LOCAL}
PRESCR_DRV= gdevprsc-0.2.1
DISTFILES+= ${PRESCR_DRV}.tar.gz
EXTRACT_LIST+= ${PRESCR_DRV}.tar.gz
DISTINFO_FILE= ${.CURDIR}/../../print/ghostscript-nox11/distinfo
FILESDIR= ${.CURDIR}/../../print/ghostscript-nox11/files
PATCHDIR= ${.CURDIR}/../../print/ghostscript-nox11/patches
SCRIPTDIR= ${.CURDIR}/../../print/ghostscript-nox11/scripts
PLIST_SRC= ${.CURDIR}/../../print/ghostscript-nox11/pkg/PLIST
EXTRACT_ONLY= ${GS_SOURCES}
DIST_SUBDIR= ghostscript
WRKSRC= ${WRKDIR}/gs${GS_VERS}
MAKEFILE= src/unix-gcc.mak
ALL_TARGET= std
.include "../../mk/bsd.prefs.mk"
# arm32 compiler has an optimizer problem
.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "arm32"
CFLAGS=
.endif
.if defined(PAPERSIZE) && (${PAPERSIZE} == "A4" || ${PAPERSIZE} == "a4")
CFLAGS+= -DA4
.endif
CFLAGS+= -I${LOCALBASE}/include # png.h, VF.h
CFLAGS+= -DHAVE_MKSTEMP=1
.if ${OPSYS} == "SunOS"
LDFLAGS+= -L${LOCALBASE}/bsd/lib -Wl,-R${LOCALBASE}/bsd/lib
.endif
MAKE_ENV+= XLDFLAGS="${LDFLAGS}"
# Ghostscript builds in ./obj, which confuses make, so explicitly set
# MAKEOBJDIR so as not to descend into ./obj.
#
MAKE_ENV+= MAKEOBJDIR="."
# Define whether this platform has floating point hardware:
# FPU_TYPE=2 means floating point is faster than fixed point.
# (This is the case on some RISCs with multiple instruction dispatch.)
# FPU_TYPE=1 means floating point is at worst only slightly slower
# than fixed point.
# FPU_TYPE=0 means that floating point may be considerably slower.
# FPU_TYPE=-1 means that floating point is always much slower than
# fixed point.
#
FPU_TYPE?= 1
MAKE_ENV+= FPU_TYPE=${FPU_TYPE}
.if defined(USE_X11)
MAKEFRAGS= ${FILESDIR}/devs.x11
.endif
MAKEFRAGS+= ${FILESDIR}/devs.nox11
GSINST_DIR= ${PREFIX}/share/ghostscript/${GS_VERS}vflib
DOC_DIR= ${PREFIX}/share/doc/ghostscript
HTML_DIR= ${PREFIX}/share/doc/html/ghostscript
LIB_DIR= ${GSINST_DIR}/lib
post-extract:
.for FILE in ${EXTRACT_LIST}
cd ${WRKDIR}; ${PAX} -zrf ${_DISTDIR}/${FILE}
.endfor
cd ${WRKSRC}/src; ${PAX} -rf ${WRKDIR}/${HPDJ_DRV}/hpdj.tar
${MV} ${WRKSRC}/src/gs-hpdj.1 ${WRKSRC}/man
cd ${WRKDIR}; ${CP} gdevdmpr.c gdevdmpr.mak ${WRKSRC}/src
cd ${WRKDIR}; ${CP} dviprlib.* ${WRKSRC}/src
cd ${WRKDIR}/${BJ10V_DRV}; ${CP} gdev10v.c gdev10v.mak ${WRKSRC}/src
cd ${WRKDIR}/${MJC_DRV}; ${CP} *.[ch] gdevmjc.mak ${WRKSRC}/src
cd ${WRKDIR}/${LIPS_DRV}; ${CP} * ${WRKSRC}/src
cd ${WRKDIR}/${RPDL_DRV}; ${CP} gdevrpdl.c gdevrpdl.mak ${WRKSRC}/src
cd ${WRKDIR}/${MD5000_DRV}; \
${CP} gdevalps.c gdevalps.mak-5.50 ${WRKSRC}/src
cd ${WRKDIR}/${MD2000_DRV}; \
${CP} gdevmd2k.c gdevmd2k.mak-5.8x ${WRKSRC}/src
cd ${WRKDIR}/${PRESCR_DRV}; \
${CP} gdevprsc.c gdevprsc.mak ${WRKSRC}/src
${RM} -f ${WRKSRC}/jpeg
${LN} -sf ${WRKDIR}/jpeg-6b ${WRKSRC}/jpeg
${RM} -f ${WRKSRC}/lib/${PDF_SEC}
${LN} -s ${_DISTDIR}/${PDF_SEC} ${WRKSRC}/lib/${PDF_SEC}
${MV} ${WRKSRC}/lib/fixmswrd.pl ${WRKSRC}/lib/fixmswrd.pl.in
post-patch:
if [ ! -f ${WRKDIR}/dmp_site.ps.bak ]; then \
${MV} ${WRKDIR}/dmp_site.ps ${WRKDIR}/dmp_site.ps.bak; \
fi
${SED} -e "s|epsimage\.src|${GSINST_DIR}/lib/escp_24.src|g" \
${WRKDIR}/dmp_site.ps.bak > ${WRKDIR}/dmp_site.ps
do-configure:
#
# Append build rules for extra drivers to contrib.mak
#
${CAT} ${WRKSRC}/src/contrib.mak-5.94.add \
${WRKSRC}/src/gdevlips.mak \
${WRKSRC}/src/gdev10v.mak \
${WRKSRC}/src/gdevmjc.mak \
${WRKSRC}/src/gdevrpdl.mak \
${WRKSRC}/src/gdevdmpr.mak \
${WRKSRC}/src/gdevalps.mak-5.50 \
${WRKSRC}/src/gdevmd2k.mak-5.8x \
${WRKSRC}/src/gdevprsc.mak \
>> ${WRKSRC}/src/contrib.mak
#
# Prepend device list to unix-gcc.mak
#
${CAT} ${MAKEFRAGS} \
${WRKSRC}/src/unix-gcc.mak \
> ${WRKDIR}/unix-gcc.mak
${MV} -f ${WRKDIR}/unix-gcc.mak ${WRKSRC}/src
${SED} -e "s|@PERL@|${PERL5}|g" \
${WRKSRC}/lib/fixmswrd.pl.in > ${WRKSRC}/lib/fixmswrd.pl
post-install:
strip ${PREFIX}/bin/gs
${INSTALL_DATA_DIR} ${DOC_DIR}
${INSTALL_DATA} ${WRKDIR}/${LIPS_DRV}/Gdevlips.htm ${HTML_DIR}
${INSTALL_DATA} ${WRKDIR}/${BJ10V_DRV}/gdev10v.jis ${DOC_DIR}
${INSTALL_DATA} ${WRKDIR}/gdevdmpr.sj ${DOC_DIR}
${INSTALL_DATA} ${WRKDIR}/dmp_init.ps ${LIB_DIR}
${INSTALL_DATA} ${WRKDIR}/dmp_site.ps ${LIB_DIR}
${INSTALL_DATA} ${WRKDIR}/escp_24.src ${LIB_DIR}
${INSTALL_DATA} ${WRKDIR}/testpage.ps ${LIB_DIR}
${INSTALL_DATA} ${WRKDIR}/${PRESCR_DRV}/gdevprsc.?? ${DOC_DIR}
${INSTALL_DATA_DIR} ${DOC_DIR}/${MJC_DRV}
${INSTALL_DATA} ${WRKDIR}/${MJC_DRV}/README.mjc ${DOC_DIR}/${MJC_DRV}
${INSTALL_DATA} ${WRKDIR}/${MJC_DRV}/README.noz ${DOC_DIR}/${MJC_DRV}
${INSTALL_DATA} ${WRKDIR}/${MJC_DRV}/README.mje ${DOC_DIR}/${MJC_DRV}
${INSTALL_DATA} ${WRKDIR}/${MJC_DRV}/cpem.doc ${DOC_DIR}/${MJC_DRV}
${INSTALL_DATA} ${WRKDIR}/${MJC_DRV}/MJ700V2C.FAQ ${DOC_DIR}/${MJC_DRV}
.include "../../mk/bsd.pkg.mk"
|