Magellan Linux

Contents of /branches/magellan-next/core/ghostscript-gpl/ghostscript-gpl-9.04-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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