Contents of /trunk/extras/ghostscript-gpl/ghostscript-gpl-9.21-r1.smage2
Parent Directory
|
Revision Log
Revision 29129 -
(show annotations)
(download)
Wed May 24 08:51:26 2017 UTC (7 years, 1 month ago) by niro
File size: 4742 byte(s)
Wed May 24 08:51:26 2017 UTC (7 years, 1 month ago) by niro
File size: 4742 byte(s)
auto added: ver bump to 9.21-r1
1 | # $Id$ |
2 | |
3 | PNAME="ghostscript-gpl" |
4 | PVER="9.21" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="app-text" |
8 | |
9 | DESCRIPTION="GPL Ghostscript - the most current Ghostscript, AFPL, relicensed." |
10 | HOMEPAGE="http://ghostscript.com/" |
11 | |
12 | DEPEND=">= media-libs/libjpeg-8 |
13 | >= media-libs/libpng-1.5 |
14 | >= media-libs/libtiff-4 |
15 | >= net-print/libcups-2.2 |
16 | >= sys-libs/zlib-1.2 |
17 | >= x11-libs/gtk3+-3.22 |
18 | >= x11-libs/libXt-1 |
19 | >= x11-libs/libXext-1 |
20 | >= media-libs/fontconfig-2.11 |
21 | >= media-libs/freetype-2.6 |
22 | >= media-libs/libjasper-2.0 |
23 | >= media-libs/lcms2-2.8 |
24 | >= app-text/libpaper-1.1.24 |
25 | >= x11-libs/cairo-1.14 |
26 | >= sys-libs/libstdc++-6.3 |
27 | >= app-crypt/gnutls-3.5 |
28 | >= app-crypt/libgcrypt-1.7" |
29 | |
30 | SDEPEND=">= net-print/cups-2.2 |
31 | >= dev-util/pkgconfig-0.25" |
32 | |
33 | SRCFILE="${PNAME/-gpl/}-${PVER}.tar.xz" |
34 | EXTRA_SRCFILE="ghostscript-fonts-std-8.11.tar.gz" |
35 | |
36 | SRCDIR="${BUILDDIR}/${PNAME/-gpl/}-${PVER}" |
37 | |
38 | sminclude mtools multilib |
39 | |
40 | SRC_URI=( |
41 | https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${PVER//.}/${SRCFILE} |
42 | mirror://${PNAME}/${SRCFILE} |
43 | mirror://${PNAME}/${EXTRA_SRCFILE} |
44 | mirror://${PNAME}/${PNAME}-8.70-multilib.patch |
45 | mirror://${PNAME}/${PNAME}-9.04-scripts.patch |
46 | mirror://${PNAME}/${PNAME}-9.04-runlibfileifexists.patch |
47 | mirror://${PNAME}/${PNAME}-8.70-pksmraw.patch |
48 | mirror://${PNAME}/${PNAME}-9.16-zlib.patch |
49 | mirror://${PNAME}/${PNAME}-9.18-fix-devijs-account-for-device-subclassing.patch |
50 | mirror://${PNAME}/${PNAME}-9.18-missing-gserrors-include.patch |
51 | ) |
52 | |
53 | UP2DATE="updatecmd https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/ | grep ${PNAME/-gpl/}- | highesttarball xz" |
54 | |
55 | src_prepare() |
56 | { |
57 | munpack ${SRCFILE} || die |
58 | oldmunpack ${EXTRA_SRCFILE} || die |
59 | |
60 | # remove internal copies of libaries to enforce use of system-libs |
61 | #all-abis rm -r ${SRCDIR}-$(mabi)/expat || die |
62 | #all-abis rm -r ${SRCDIR}-$(mabi)/jasper || die |
63 | all-abis rm -r ${SRCDIR}-$(mabi)/jpeg || die |
64 | all-abis rm -r ${SRCDIR}-$(mabi)/libpng || die |
65 | all-abis rm -r ${SRCDIR}-$(mabi)/zlib || die |
66 | all-abis rm -r ${SRCDIR}-$(mabi)/tiff || die |
67 | #all-abis rm -r ${SRCDIR}-$(mabi)/lcms || die |
68 | all-abis rm -r ${SRCDIR}-$(mabi)/lcms2 || die |
69 | all-abis rm -r ${SRCDIR}-$(mabi)/freetype || die |
70 | all-abis rm -r ${SRCDIR}-$(mabi)/cups/libs || die |
71 | # remove internal urw-fonts |
72 | all-abis rm -r ${SRCDIR}-$(mabi)/Resource/Font || die |
73 | |
74 | # upstream patches |
75 | mpatch ${PNAME}-9.18-fix-devijs-account-for-device-subclassing.patch || die |
76 | mpatch ${PNAME}-9.18-missing-gserrors-include.patch || die |
77 | |
78 | # apply several fedora patches |
79 | mpatch ${PNAME}-8.70-multilib.patch || die |
80 | mpatch ${PNAME}-9.04-scripts.patch || die |
81 | mpatch ${PNAME}-9.04-runlibfileifexists.patch || die |
82 | mpatch ${PNAME}-8.70-pksmraw.patch || die |
83 | |
84 | # fix build against system zlib |
85 | mpatch ${PNAME}-9.16-zlib.patch || die |
86 | |
87 | # search path fix |
88 | all-abis 'sed -i "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" Makefile.in base/*.mak || die' |
89 | |
90 | # fix doc pathes |
91 | all-abis 'sed -i -e "s:exdir=.*:exdir=/usr/share/doc/${PNAME}-${PVER}/examples:" |
92 | -e "s:docdir=.*:docdir=/usr/share/doc/${PNAME}-${PVER}/html:" |
93 | -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PNAME}-${PVER}/html:" |
94 | Makefile.in base/*.mak || die' |
95 | |
96 | # fix libtool issues |
97 | mlibtoolize || die |
98 | # regen makefiles |
99 | mautoreconf || die |
100 | |
101 | # same for ijs dir too |
102 | SRCSUBDIR="ijs" mlibtoolize || die |
103 | SRCSUBDIR="ijs" mautoreconf || die |
104 | } |
105 | |
106 | src_compile() |
107 | { |
108 | mconfigure \ |
109 | --with-ijs \ |
110 | --with-jbig2dec \ |
111 | --without-omni \ |
112 | --without-luratech \ |
113 | --without-gimp-print \ |
114 | --with-x \ |
115 | --with-drivers=ALL \ |
116 | --with-libpaper \ |
117 | --enable-fontconfig \ |
118 | --enable-freetype \ |
119 | --enable-cups \ |
120 | --enable-openjpeg \ |
121 | --enable-dynamic \ |
122 | --enable-gtk \ |
123 | --enable-cairo \ |
124 | --with-jasper \ |
125 | --with-system-libtiff \ |
126 | --disable-compile-inits \ |
127 | --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \ |
128 | || die |
129 | |
130 | |
131 | # does not like optimations |
132 | mmake -j1 so all || die |
133 | |
134 | # compile ijs |
135 | SRCSUBDIR="ijs" mconfigure --enable-shared || die |
136 | SRCSUBDIR="ijs" mmake -j1 || die |
137 | } |
138 | |
139 | src_install() |
140 | { |
141 | # needed directories |
142 | minstalldir /usr/bin || die |
143 | minstalldir /usr/include || die |
144 | minstalldir /usr/$(mlibdir) || die |
145 | |
146 | mmake -j1 DESTDIR=${BINDIR} install || die |
147 | mmake -j1 DESTDIR=${BINDIR} soinstall || die |
148 | |
149 | # install extra_fonts |
150 | minstalldir /usr/share/ghostscript || die |
151 | cp -a ${BUILDDIR}/fonts ${BINDIR}/usr/share/ghostscript || die |
152 | |
153 | # install ijs |
154 | SRCSUBDIR="ijs" mmake DESTDIR=${BINDIR} install || die |
155 | |
156 | # remove filters provided by cups-filters pkg |
157 | #mdelete -r /usr/$(mlibdir)/cups/filter/gstopxl || die |
158 | #mdelete -r /usr/$(mlibdir)/cups/filter/gstoraster || die |
159 | #if [[ $(mlibdir) != lib ]] |
160 | #then |
161 | # #mdelete -r /usr/lib/cups/filter/gstopxl || die |
162 | # mdelete -r /usr/lib/cups/filter/gstoraster || die |
163 | #fi |
164 | |
165 | # docs |
166 | minstalldocs LICENSE doc/{AUTHORS,COPYING,README} || die |
167 | } |
168 |