Magellan Linux

Contents of /trunk/extras/ghostscript-gpl/ghostscript-gpl-9.05-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12380 - (show annotations) (download)
Wed May 16 23:38:23 2012 UTC (12 years, 1 month ago) by niro
File size: 4067 byte(s)
-dropped nullderef 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}-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-jbig2-image-refcount.patch.patch || die
74 mpatch ${PNAME}-9.04-iccprofiles-initdir.patch || die
75 mpatch ${PNAME}-9.02-cups-filters.patch || die
76 mpatch ${PNAME}-9.04-pxl-landscape.patch || die
77
78 # search path fix
79 #sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" \
80 # -e 's:$(gsdir)/fonts:/usr/share/ghostscript/fonts:' \
81 # base/Makefile.in base/*.mak || die
82 sed -i "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" \
83 base/Makefile.in base/*.mak || die
84
85 # fix doc pathes
86 sed -i -e "s:exdir=.*:exdir=/usr/share/doc/${PNAME}-${PVER}/examples:" \
87 -e "s:docdir=.*:docdir=/usr/share/doc/${PNAME}-${PVER}/html:" \
88 -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PNAME}-${PVER}/html:" \
89 base/Makefile.in base/*.mak || die
90
91 # fix libtool issues
92 mlibtoolize || die
93
94 # regen makefiles
95 autoreconf --install --force --verbose || die
96 cd ${SRCDIR}/ijs
97 # fix libtool issues
98 mlibtoolize || die
99 autoreconf --install --force --verbose || die
100 }
101
102 src_compile()
103 {
104 cd ${SRCDIR}
105
106 mconfigure \
107 --with-ijs \
108 --with-jbig2dec \
109 --with-omni \
110 --without-gimp-print \
111 --with-x \
112 --with-drivers=ALL \
113 --with-libpaper \
114 --enable-fontconfig \
115 --enable-cups \
116 --enable-dynamic \
117 --enable-gtk \
118 --enable-cairo \
119 --without-jasper \
120 --disable-compile-inits \
121 --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \
122 || die
123
124
125 # does not like optimations
126 mmake -j1 so all || die
127
128 # compile ijs
129 cd ${SRCDIR}/ijs
130 mconfigure || die
131 mmake -j1 || die
132 }
133
134 src_install()
135 {
136 cd ${SRCDIR}
137
138 # needed directories
139 minstalldir /usr/bin || die
140 minstalldir /usr/include || die
141 minstalldir /usr/$(mlibdir) || die
142
143 mmake -j1 DESTDIR=${BINDIR} install || die
144 mmake -j1 DESTDIR=${BINDIR} soinstall || die
145
146 # install extra_fonts
147 minstalldir /usr/share/ghostscript || die
148 cp -a ${BUILDDIR}/fonts ${BINDIR}/usr/share/ghostscript || die
149
150 # install ijs
151 cd ${SRCDIR}/ijs
152 mmake DESTDIR=${BINDIR} install || die
153
154 # docs
155 cd ${SRCDIR}
156 minstalldocs LICENSE doc/{AUTHORS,COPYING,README} || die
157 }