Contents of /branches/magellan-next/core/ghostscript-gpl/ghostscript-gpl-9.02-r1.smage2
Parent Directory | Revision Log
Revision 8039 -
(show annotations)
(download)
Wed Jun 29 12:21:21 2011 UTC (13 years, 2 months ago) by niro
File size: 4375 byte(s)
Wed Jun 29 12:21:21 2011 UTC (13 years, 2 months ago) by niro
File size: 4375 byte(s)
-added more fedora patches and removed deprecated jasper patch
1 | # $Id$ |
2 | |
3 | PNAME="ghostscript-gpl" |
4 | PVER="9.02" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="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-3.9 |
15 | >= sys-libs/zlib-1.2 |
16 | >= x11-libs/gtk2+-2.28 |
17 | >= x11-libs/libXt-1 |
18 | >= x11-libs/libXext-1 |
19 | >= media-libs/fontconfig-2.8 |
20 | >= app-text/libpaper-1.1.24 |
21 | >= x11-libs/cairo-1.10" |
22 | |
23 | SDEPEND=">= net-print/cups-1.4 |
24 | >= dev-util/pkgconfig-0.25" |
25 | |
26 | SRCFILE="${PNAME/-gpl/}-${PVER}.tar.bz2" |
27 | EXTRA_SRCFILE="ghostscript-fonts-std-8.11.tar.gz" |
28 | |
29 | SRCDIR="${BUILDDIR}/${PNAME/-gpl/}-${PVER}" |
30 | |
31 | sminclude mtools |
32 | |
33 | SRC_URI=( |
34 | http://ghostscript.com/releases/${SRCFILE} |
35 | mirror://${PNAME}/${SRCFILE} |
36 | mirror://${PNAME}/${EXTRA_SRCFILE} |
37 | mirror://${PNAME}/${PNAME}-8.70-multilib.patch |
38 | mirror://${PNAME}/${PNAME}-9.00-scripts.patch |
39 | mirror://${PNAME}/${PNAME}-8.70-noopt.patch |
40 | mirror://${PNAME}/${PNAME}-9.00-fpic.patch |
41 | mirror://${PNAME}/${PNAME}-8.70-runlibfileifexists.patch |
42 | mirror://${PNAME}/${PNAME}-8.70-pksmraw.patch |
43 | mirror://${PNAME}/${PNAME}-8.71-jbig2dec-nullderef.patch |
44 | mirror://${PNAME}/${PNAME}-8.71-jbig2-image-refcount.patch.patch |
45 | mirror://${PNAME}/${PNAME}-9.01-iccprofiles-initdir.patch |
46 | mirror://${PNAME}/${PNAME}-9.01-vsnprintf.patch |
47 | mirror://${PNAME}/${PNAME}-9.02-colord.patch |
48 | mirror://${PNAME}/${PNAME}-9.02-cups-filters.patch |
49 | mirror://${PNAME}/${PNAME}-9.02-pxl-landscape.patch |
50 | ) |
51 | |
52 | UP2DATE="updatecmd_sourceforge ${PNAME/-gpl/} 'GPL Ghostscript' - ${PNAME/-gpl/}" |
53 | |
54 | src_prepare() |
55 | { |
56 | munpack ${SRCFILE} || die |
57 | munpack ${EXTRA_SRCFILE} || die |
58 | cd ${SRCDIR} |
59 | |
60 | # remove internal copies of expat, jasper, jpeg, libpng and zlib |
61 | rm -r expat || die |
62 | rm -r jasper || die |
63 | rm -r jpeg || die |
64 | rm -r libpng || die |
65 | rm -r zlib || die |
66 | # remove internal urw-fonts |
67 | rm -r Resource/Font || die |
68 | |
69 | # apply several fedora patches |
70 | mpatch ${PNAME}-8.70-multilib.patch || die |
71 | mpatch ${PNAME}-9.00-scripts.patch || die |
72 | mpatch ${PNAME}-8.70-noopt.patch || die |
73 | mpatch ${PNAME}-9.00-fpic.patch || die |
74 | mpatch ${PNAME}-8.70-runlibfileifexists.patch || die |
75 | mpatch ${PNAME}-8.70-pksmraw.patch || die |
76 | mpatch ${PNAME}-8.71-jbig2dec-nullderef.patch || die |
77 | mpatch ${PNAME}-8.71-jbig2-image-refcount.patch.patch || die |
78 | mpatch ${PNAME}-9.01-iccprofiles-initdir.patch || die |
79 | mpatch ${PNAME}-9.01-vsnprintf.patch || die |
80 | mpatch ${PNAME}-9.02-colord.patch || die |
81 | mpatch ${PNAME}-9.02-cups-filters.patch || die |
82 | mpatch ${PNAME}-9.02-pxl-landscape.patch || die |
83 | |
84 | # search path fix |
85 | #sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" \ |
86 | # -e 's:$(gsdir)/fonts:/usr/share/ghostscript/fonts:' \ |
87 | # base/Makefile.in base/*.mak || die |
88 | sed -i "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" \ |
89 | base/Makefile.in base/*.mak || die |
90 | |
91 | # fix doc pathes |
92 | sed -i -e "s:exdir=.*:exdir=/usr/share/doc/${PNAME}-${PVER}/examples:" \ |
93 | -e "s:docdir=.*:docdir=/usr/share/doc/${PNAME}-${PVER}/html:" \ |
94 | -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PNAME}-${PVER}/html:" \ |
95 | base/Makefile.in base/*.mak || die |
96 | |
97 | # fix libtool issues |
98 | mlibtoolize || die |
99 | |
100 | # regen makefiles |
101 | autoreconf --install --force --verbose || die |
102 | cd ${SRCDIR}/ijs |
103 | # fix libtool issues |
104 | mlibtoolize || die |
105 | autoreconf --install --force --verbose || die |
106 | } |
107 | |
108 | src_compile() |
109 | { |
110 | cd ${SRCDIR} |
111 | |
112 | mconfigure \ |
113 | --with-ijs \ |
114 | --with-jbig2dec \ |
115 | --with-omni \ |
116 | --without-gimp-print \ |
117 | --with-x \ |
118 | --with-drivers=ALL \ |
119 | --with-libpaper \ |
120 | --enable-fontconfig \ |
121 | --enable-cups \ |
122 | --enable-dynamic \ |
123 | --enable-gtk \ |
124 | --enable-cairo \ |
125 | --without-jasper \ |
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 | cd ${SRCDIR}/ijs |
136 | mconfigure || die |
137 | mmake -j1 || die |
138 | } |
139 | |
140 | src_install() |
141 | { |
142 | cd ${SRCDIR} |
143 | |
144 | # needed directories |
145 | minstalldir /usr/bin || die |
146 | minstalldir /usr/include || die |
147 | minstalldir /usr/$(mlibdir) || die |
148 | |
149 | mmake -j1 DESTDIR=${BINDIR} install || die |
150 | mmake -j1 DESTDIR=${BINDIR} soinstall || die |
151 | |
152 | # install extra_fonts |
153 | minstalldir /usr/share/ghostscript || die |
154 | cp -a ${BUILDDIR}/fonts ${BINDIR}/usr/share/ghostscript || die |
155 | |
156 | # install ijs |
157 | cd ${SRCDIR}/ijs |
158 | mmake DESTDIR=${BINDIR} install || die |
159 | |
160 | # docs |
161 | cd ${SRCDIR} |
162 | minstalldocs LICENSE doc/{AUTHORS,COPYING,README} || die |
163 | } |