Annotation of /branches/R11-stable/extras/ghostscript-gpl/ghostscript-gpl-9.10-r2.smage2
Parent Directory | Revision Log
Revision 21725 -
(hide annotations)
(download)
Mon Jul 21 09:39:01 2014 UTC (9 years, 9 months ago) by niro
File size: 4371 byte(s)
Mon Jul 21 09:39:01 2014 UTC (9 years, 9 months ago) by niro
File size: 4371 byte(s)
-release branches/R11-stable
1 | niro | 20923 | # $Id$ |
2 | |||
3 | PNAME="ghostscript-gpl" | ||
4 | PVER="9.10" | ||
5 | PBUILD="r2" | ||
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-1.6 | ||
16 | >= sys-libs/zlib-1.2 | ||
17 | >= x11-libs/gtk2+-2.24 | ||
18 | >= x11-libs/libXt-1 | ||
19 | >= x11-libs/libXext-1 | ||
20 | >= media-libs/fontconfig-2.10 | ||
21 | >= media-libs/freetype-2.5 | ||
22 | >= media-libs/libjasper-1.900 | ||
23 | >= app-text/libpaper-1.1.24 | ||
24 | >= x11-libs/cairo-1.12 | ||
25 | >= sys-libs/libstdc++-4.8 | ||
26 | >= app-crypt/gnutls-3.2 | ||
27 | >= app-crypt/libgcrypt-1.6" | ||
28 | |||
29 | SDEPEND=">= net-print/cups-1.4 | ||
30 | >= dev-util/pkgconfig-0.25" | ||
31 | |||
32 | SRCFILE="${PNAME/-gpl/}-${PVER}.tar.gz" | ||
33 | EXTRA_SRCFILE="ghostscript-fonts-std-8.11.tar.gz" | ||
34 | |||
35 | SRCDIR="${BUILDDIR}/${PNAME/-gpl/}-${PVER}" | ||
36 | |||
37 | sminclude mtools multilib | ||
38 | |||
39 | SRC_URI=( | ||
40 | http://downloads.ghostscript.com/public/${SRCFILE} | ||
41 | http://ghostscript.com/releases/${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}-8.70-noopt.patch | ||
47 | mirror://${PNAME}/${PNAME}-9.04-runlibfileifexists.patch | ||
48 | mirror://${PNAME}/${PNAME}-8.70-pksmraw.patch | ||
49 | ) | ||
50 | |||
51 | UP2TARBALL="ghostscript" | ||
52 | UP2DATE="updatecmd_sourceforge ghostscript 'GPL Ghostscript' gz" | ||
53 | |||
54 | src_prepare() | ||
55 | { | ||
56 | munpack ${SRCFILE} || die | ||
57 | oldmunpack ${EXTRA_SRCFILE} || die | ||
58 | |||
59 | # remove internal copies of libaries to enforce use of system-libs | ||
60 | all-abis rm -r ${SRCDIR}-$(mabi)/expat || die | ||
61 | #all-abis rm -r ${SRCDIR}-$(mabi)/jasper || die | ||
62 | all-abis rm -r ${SRCDIR}-$(mabi)/jpeg || die | ||
63 | all-abis rm -r ${SRCDIR}-$(mabi)/libpng || die | ||
64 | all-abis rm -r ${SRCDIR}-$(mabi)/zlib || die | ||
65 | all-abis rm -r ${SRCDIR}-$(mabi)/tiff || die | ||
66 | all-abis rm -r ${SRCDIR}-$(mabi)/lcms || die | ||
67 | all-abis rm -r ${SRCDIR}-$(mabi)/lcms2 || die | ||
68 | all-abis rm -r ${SRCDIR}-$(mabi)/freetype || die | ||
69 | all-abis rm -r ${SRCDIR}-$(mabi)/cups/libs || die | ||
70 | # remove internal urw-fonts | ||
71 | all-abis rm -r ${SRCDIR}-$(mabi)/Resource/Font || die | ||
72 | |||
73 | # apply several fedora patches | ||
74 | mpatch ${PNAME}-8.70-multilib.patch || die | ||
75 | mpatch ${PNAME}-9.04-scripts.patch || die | ||
76 | mpatch ${PNAME}-8.70-noopt.patch || die | ||
77 | mpatch ${PNAME}-9.04-runlibfileifexists.patch || die | ||
78 | mpatch ${PNAME}-8.70-pksmraw.patch || die | ||
79 | |||
80 | # search path fix | ||
81 | all-abis 'sed -i "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" Makefile.in base/*.mak || die' | ||
82 | |||
83 | # fix doc pathes | ||
84 | all-abis 'sed -i -e "s:exdir=.*:exdir=/usr/share/doc/${PNAME}-${PVER}/examples:" | ||
85 | -e "s:docdir=.*:docdir=/usr/share/doc/${PNAME}-${PVER}/html:" | ||
86 | -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PNAME}-${PVER}/html:" | ||
87 | Makefile.in base/*.mak || die' | ||
88 | |||
89 | # fix libtool issues | ||
90 | mlibtoolize || die | ||
91 | # regen makefiles | ||
92 | export WANT_AUTOMAKE=1.12 | ||
93 | mautoreconf || die | ||
94 | |||
95 | # same for ijs dir too | ||
96 | SRCSUBDIR="ijs" mlibtoolize || die | ||
97 | SRCSUBDIR="ijs" mautoreconf || die | ||
98 | } | ||
99 | |||
100 | src_compile() | ||
101 | { | ||
102 | mconfigure \ | ||
103 | --with-ijs \ | ||
104 | --with-jbig2dec \ | ||
105 | --without-omni \ | ||
106 | --without-luratech \ | ||
107 | --without-gimp-print \ | ||
108 | --with-x \ | ||
109 | --with-drivers=ALL \ | ||
110 | --with-libpaper \ | ||
111 | --enable-fontconfig \ | ||
112 | --enable-freetype \ | ||
113 | --enable-cups \ | ||
114 | --enable-openjpeg \ | ||
115 | --enable-dynamic \ | ||
116 | --enable-gtk \ | ||
117 | --enable-cairo \ | ||
118 | --with-jasper \ | ||
119 | --with-system-libtiff \ | ||
120 | --disable-compile-inits \ | ||
121 | --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \ | ||
122 | || die | ||
123 | |||
124 | |||
125 | # does not like optimations | ||
126 | mmake -j1 so all || die | ||
127 | |||
128 | # compile ijs | ||
129 | SRCSUBDIR="ijs" mconfigure --enable-shared || die | ||
130 | SRCSUBDIR="ijs" mmake -j1 || die | ||
131 | } | ||
132 | |||
133 | src_install() | ||
134 | { | ||
135 | # needed directories | ||
136 | minstalldir /usr/bin || die | ||
137 | minstalldir /usr/include || die | ||
138 | minstalldir /usr/$(mlibdir) || die | ||
139 | |||
140 | mmake -j1 DESTDIR=${BINDIR} install || die | ||
141 | mmake -j1 DESTDIR=${BINDIR} soinstall || die | ||
142 | |||
143 | # install extra_fonts | ||
144 | minstalldir /usr/share/ghostscript || die | ||
145 | cp -a ${BUILDDIR}/fonts ${BINDIR}/usr/share/ghostscript || die | ||
146 | |||
147 | # install ijs | ||
148 | SRCSUBDIR="ijs" mmake DESTDIR=${BINDIR} install || die | ||
149 | |||
150 | # remove filters provided by cups-filters pkg | ||
151 | #mdelete -r /usr/$(mlibdir)/cups/filter/gstopxl || die | ||
152 | #mdelete -r /usr/$(mlibdir)/cups/filter/gstoraster || die | ||
153 | #if [[ $(mlibdir) != lib ]] | ||
154 | #then | ||
155 | # #mdelete -r /usr/lib/cups/filter/gstopxl || die | ||
156 | # mdelete -r /usr/lib/cups/filter/gstoraster || die | ||
157 | #fi | ||
158 | |||
159 | # docs | ||
160 | minstalldocs LICENSE doc/{AUTHORS,COPYING,README} || die | ||
161 | } | ||
162 |