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