Contents of /trunk/extras/ghostscript-gpl/ghostscript-gpl-9.05-r1.smage2
Parent Directory | Revision Log
Revision 12383 -
(show annotations)
(download)
Wed May 16 23:41:17 2012 UTC (12 years ago) by niro
File size: 3837 byte(s)
Wed May 16 23:41:17 2012 UTC (12 years ago) by niro
File size: 3837 byte(s)
-dropped landscape patch
1 | # $Id$ |
2 | |
3 | PNAME="ghostscript-gpl" |
4 | PVER="9.05" |
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 | >= 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 | >= sys-libs/libstdc++-4.6" |
23 | |
24 | SDEPEND=">= net-print/cups-1.4 |
25 | >= dev-util/pkgconfig-0.25" |
26 | |
27 | SRCFILE="${PNAME/-gpl/}-${PVER}.tar.gz" |
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://downloads.ghostscript.com/public/${SRCFILE} |
36 | http://ghostscript.com/releases/${SRCFILE} |
37 | mirror://${PNAME}/${SRCFILE} |
38 | mirror://${PNAME}/${EXTRA_SRCFILE} |
39 | mirror://${PNAME}/${PNAME}-8.70-multilib.patch |
40 | mirror://${PNAME}/${PNAME}-9.04-scripts.patch |
41 | mirror://${PNAME}/${PNAME}-8.70-noopt.patch |
42 | mirror://${PNAME}/${PNAME}-9.04-runlibfileifexists.patch |
43 | mirror://${PNAME}/${PNAME}-8.70-pksmraw.patch |
44 | mirror://${PNAME}/${PNAME}-9.04-iccprofiles-initdir.patch |
45 | mirror://${PNAME}/${PNAME}-9.05-cups-filters.patch |
46 | ) |
47 | |
48 | UP2DATE="updatecmd_sourceforge ${PNAME/-gpl/} 'GPL Ghostscript' - ${PNAME/-gpl/}" |
49 | |
50 | src_prepare() |
51 | { |
52 | munpack ${SRCFILE} || die |
53 | munpack ${EXTRA_SRCFILE} || die |
54 | cd ${SRCDIR} |
55 | |
56 | # remove internal copies of expat, jasper, jpeg, libpng and zlib |
57 | rm -r expat || die |
58 | rm -r jasper || die |
59 | rm -r jpeg || die |
60 | rm -r libpng || die |
61 | rm -r zlib || die |
62 | # remove internal urw-fonts |
63 | rm -r Resource/Font || die |
64 | |
65 | # apply several fedora patches |
66 | mpatch ${PNAME}-8.70-multilib.patch || die |
67 | mpatch ${PNAME}-9.04-scripts.patch || die |
68 | mpatch ${PNAME}-8.70-noopt.patch || die |
69 | mpatch ${PNAME}-9.04-runlibfileifexists.patch || die |
70 | mpatch ${PNAME}-8.70-pksmraw.patch || die |
71 | mpatch ${PNAME}-9.04-iccprofiles-initdir.patch || die |
72 | mpatch ${PNAME}-9.05-cups-filters.patch || die |
73 | |
74 | # search path fix |
75 | #sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" \ |
76 | # -e 's:$(gsdir)/fonts:/usr/share/ghostscript/fonts:' \ |
77 | # base/Makefile.in base/*.mak || die |
78 | sed -i "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" \ |
79 | base/Makefile.in base/*.mak || die |
80 | |
81 | # fix doc pathes |
82 | sed -i -e "s:exdir=.*:exdir=/usr/share/doc/${PNAME}-${PVER}/examples:" \ |
83 | -e "s:docdir=.*:docdir=/usr/share/doc/${PNAME}-${PVER}/html:" \ |
84 | -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PNAME}-${PVER}/html:" \ |
85 | base/Makefile.in base/*.mak || die |
86 | |
87 | # fix libtool issues |
88 | mlibtoolize || die |
89 | |
90 | # regen makefiles |
91 | autoreconf --install --force --verbose || die |
92 | cd ${SRCDIR}/ijs |
93 | # fix libtool issues |
94 | mlibtoolize || die |
95 | autoreconf --install --force --verbose || die |
96 | } |
97 | |
98 | src_compile() |
99 | { |
100 | cd ${SRCDIR} |
101 | |
102 | mconfigure \ |
103 | --with-ijs \ |
104 | --with-jbig2dec \ |
105 | --with-omni \ |
106 | --without-gimp-print \ |
107 | --with-x \ |
108 | --with-drivers=ALL \ |
109 | --with-libpaper \ |
110 | --enable-fontconfig \ |
111 | --enable-cups \ |
112 | --enable-dynamic \ |
113 | --enable-gtk \ |
114 | --enable-cairo \ |
115 | --without-jasper \ |
116 | --disable-compile-inits \ |
117 | --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \ |
118 | || die |
119 | |
120 | |
121 | # does not like optimations |
122 | mmake -j1 so all || die |
123 | |
124 | # compile ijs |
125 | cd ${SRCDIR}/ijs |
126 | mconfigure || die |
127 | mmake -j1 || die |
128 | } |
129 | |
130 | src_install() |
131 | { |
132 | cd ${SRCDIR} |
133 | |
134 | # needed directories |
135 | minstalldir /usr/bin || die |
136 | minstalldir /usr/include || die |
137 | minstalldir /usr/$(mlibdir) || die |
138 | |
139 | mmake -j1 DESTDIR=${BINDIR} install || die |
140 | mmake -j1 DESTDIR=${BINDIR} soinstall || die |
141 | |
142 | # install extra_fonts |
143 | minstalldir /usr/share/ghostscript || die |
144 | cp -a ${BUILDDIR}/fonts ${BINDIR}/usr/share/ghostscript || die |
145 | |
146 | # install ijs |
147 | cd ${SRCDIR}/ijs |
148 | mmake DESTDIR=${BINDIR} install || die |
149 | |
150 | # docs |
151 | cd ${SRCDIR} |
152 | minstalldocs LICENSE doc/{AUTHORS,COPYING,README} || die |
153 | } |