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