Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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