Contents of /branches/magellan-next/core/ghostscript-gpl/ghostscript-gpl-9.00-r1.smage2
Parent Directory | Revision Log
Revision 6858 -
(show annotations)
(download)
Thu Sep 23 07:02:16 2010 UTC (14 years ago) by niro
File size: 3829 byte(s)
Thu Sep 23 07:02:16 2010 UTC (14 years ago) by niro
File size: 3829 byte(s)
auto added: ver bump to 9.00-r1
1 | # $Id: ghostscript-gpl-8.70-r3.smage2 5596 2010-07-07 08:04:16Z niro $ |
2 | |
3 | PNAME="ghostscript-gpl" |
4 | PVER="9.00" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="app-text" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="GPL Ghostscript - the most current Ghostscript, AFPL, relicensed." |
11 | HOMEPAGE="http://ghostscript.com/" |
12 | |
13 | DEPEND=">= media-libs/libjpeg-8 |
14 | >= media-libs/libpng-1.4 |
15 | >= media-libs/libtiff-3.9 |
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 |
21 | >= app-text/libpaper-1.1.24 |
22 | >= x11-libs/cairo-1.8" |
23 | |
24 | SDEPEND=">= net-print/cups-1.4 |
25 | >= dev-util/pkgconfig-0.25" |
26 | |
27 | SRCFILE="${PNAME/-gpl/}-${PVER}.tar.bz2" |
28 | EXTRA_SRCFILE="ghostscript-fonts-std-8.11.tar.gz" |
29 | |
30 | SRCDIR="${BUILDDIR}/${PNAME/-gpl/}-${PVER}" |
31 | |
32 | sminclude mtools |
33 | |
34 | SRC_URI=( |
35 | http://ghostscript.com/releases/${SRCFILE} |
36 | mirror://${PNAME}/${SRCFILE} |
37 | mirror://${PNAME}/${EXTRA_SRCFILE} |
38 | mirror://${PNAME}/${PNAME}-8.70-multilib.patch |
39 | mirror://${PNAME}/${PNAME}-${PVER}-scripts.patch |
40 | mirror://${PNAME}/${PNAME}-8.70-noopt.patch |
41 | mirror://${PNAME}/${PNAME}-${PVER}-fpic.patch |
42 | mirror://${PNAME}/${PNAME}-8.70-runlibfileifexists.patch |
43 | mirror://${PNAME}/${PNAME}-8.70-system-jasper.patch |
44 | mirror://${PNAME}/${PNAME}-8.70-pksmraw.patch |
45 | ) |
46 | |
47 | UP2DATE="updatecmd_sourceforge ${PNAME/-gpl/} 'GPL Ghostscript' - ${PNAME/-gpl/}" |
48 | |
49 | src_prepare() |
50 | { |
51 | munpack ${SRCFILE} || die |
52 | munpack ${EXTRA_SRCFILE} || die |
53 | cd ${SRCDIR} |
54 | |
55 | # remove internal copies of expat, jasper, jpeg, libpng and zlib |
56 | rm -r expat || die |
57 | rm -r jasper || die |
58 | rm -r jpeg || die |
59 | rm -r libpng || die |
60 | rm -r zlib || die |
61 | # remove internal urw-fonts |
62 | rm -r Resource/Font || die |
63 | |
64 | # apply several fedora patches |
65 | mpatch ${PNAME}-8.70-multilib.patch || die |
66 | mpatch ${PNAME}-${PVER}-scripts.patch || die |
67 | mpatch ${PNAME}-8.70-noopt.patch || die |
68 | mpatch ${PNAME}-${PVER}-fpic.patch || die |
69 | mpatch ${PNAME}-8.70-runlibfileifexists.patch || die |
70 | mpatch ${PNAME}-8.70-system-jasper.patch || die |
71 | mpatch ${PNAME}-8.70-pksmraw.patch || die |
72 | |
73 | # search path fix |
74 | #sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" \ |
75 | # -e 's:$(gsdir)/fonts:/usr/share/ghostscript/fonts:' \ |
76 | # base/Makefile.in base/*.mak || die |
77 | sed -i "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" \ |
78 | base/Makefile.in base/*.mak || die |
79 | |
80 | # fix doc pathes |
81 | sed -i -e "s:exdir=.*:exdir=/usr/share/doc/${PNAME}-${PVER}/examples:" \ |
82 | -e "s:docdir=.*:docdir=/usr/share/doc/${PNAME}-${PVER}/html:" \ |
83 | -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PNAME}-${PVER}/html:" \ |
84 | base/Makefile.in base/*.mak || die |
85 | |
86 | # fix libtool issues |
87 | mlibtoolize || die |
88 | |
89 | # regen makefiles |
90 | autoreconf --install --force --verbose || die |
91 | cd ${SRCDIR}/ijs |
92 | # fix libtool issues |
93 | mlibtoolize || die |
94 | autoreconf --install --force --verbose || die |
95 | } |
96 | |
97 | src_compile() |
98 | { |
99 | cd ${SRCDIR} |
100 | |
101 | mconfigure \ |
102 | --with-ijs \ |
103 | --with-jbig2dec \ |
104 | --with-omni \ |
105 | --without-gimp-print \ |
106 | --with-x \ |
107 | --with-drivers=ALL \ |
108 | --with-libpaper \ |
109 | --enable-fontconfig \ |
110 | --enable-cups \ |
111 | --enable-dynamic \ |
112 | --enable-gtk \ |
113 | --enable-cairo \ |
114 | --without-jasper \ |
115 | --disable-compile-inits \ |
116 | --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \ |
117 | || die |
118 | |
119 | |
120 | # does not like optimations |
121 | mmake -j1 so all || die |
122 | |
123 | # compile ijs |
124 | cd ${SRCDIR}/ijs |
125 | mconfigure || die |
126 | mmake -j1 || die |
127 | } |
128 | |
129 | src_install() |
130 | { |
131 | cd ${SRCDIR} |
132 | |
133 | # needed directories |
134 | minstalldir /usr/bin || die |
135 | minstalldir /usr/include || die |
136 | minstalldir /usr/$(mlibdir) || die |
137 | |
138 | mmake -j1 DESTDIR=${BINDIR} install || die |
139 | mmake -j1 DESTDIR=${BINDIR} soinstall || die |
140 | |
141 | # install extra_fonts |
142 | minstalldir /usr/share/ghostscript || die |
143 | cp -a ${BUILDDIR}/fonts ${BINDIR}/usr/share/ghostscript || die |
144 | |
145 | # install ijs |
146 | cd ${SRCDIR}/ijs |
147 | mmake DESTDIR=${BINDIR} install || die |
148 | |
149 | # docs |
150 | cd ${SRCDIR} |
151 | minstalldocs LICENSE doc/{AUTHORS,COPYING,README} || die |
152 | } |