Contents of /trunk/extras/ghostscript-gpl/ghostscript-gpl-9.10-r1.smage2
Parent Directory | Revision Log
Revision 20618 -
(show annotations)
(download)
Fri Jan 31 14:47:41 2014 UTC (10 years, 4 months ago) by niro
File size: 4275 byte(s)
Fri Jan 31 14:47:41 2014 UTC (10 years, 4 months ago) by niro
File size: 4275 byte(s)
-fixed makefile locations
1 | # $Id$ |
2 | |
3 | PNAME="ghostscript-gpl" |
4 | PVER="9.10" |
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 | >= net-print/libcups-1.6 |
16 | >= sys-libs/zlib-1.2 |
17 | >= x11-libs/gtk2+-2.24 |
18 | >= x11-libs/libXt-1 |
19 | >= x11-libs/libXext-1 |
20 | >= media-libs/fontconfig-2.10 |
21 | >= media-libs/freetype-2.5 |
22 | >= media-libs/libjasper-1.900 |
23 | >= app-text/libpaper-1.1.24 |
24 | >= x11-libs/cairo-1.12 |
25 | >= sys-libs/libstdc++-4.8" |
26 | |
27 | SDEPEND=">= net-print/cups-1.4 |
28 | >= dev-util/pkgconfig-0.25" |
29 | |
30 | SRCFILE="${PNAME/-gpl/}-${PVER}.tar.gz" |
31 | EXTRA_SRCFILE="ghostscript-fonts-std-8.11.tar.gz" |
32 | |
33 | SRCDIR="${BUILDDIR}/${PNAME/-gpl/}-${PVER}" |
34 | |
35 | sminclude mtools multilib |
36 | |
37 | SRC_URI=( |
38 | http://downloads.ghostscript.com/public/${SRCFILE} |
39 | http://ghostscript.com/releases/${SRCFILE} |
40 | mirror://${PNAME}/${SRCFILE} |
41 | mirror://${PNAME}/${EXTRA_SRCFILE} |
42 | mirror://${PNAME}/${PNAME}-8.70-multilib.patch |
43 | mirror://${PNAME}/${PNAME}-9.04-scripts.patch |
44 | mirror://${PNAME}/${PNAME}-8.70-noopt.patch |
45 | mirror://${PNAME}/${PNAME}-9.04-runlibfileifexists.patch |
46 | mirror://${PNAME}/${PNAME}-8.70-pksmraw.patch |
47 | ) |
48 | |
49 | UP2DATE="updatecmd_sourceforge ${PNAME/-gpl/} 'GPL Ghostscript' - ${PNAME/-gpl/}" |
50 | |
51 | src_prepare() |
52 | { |
53 | munpack ${SRCFILE} || die |
54 | oldmunpack ${EXTRA_SRCFILE} || die |
55 | |
56 | # remove internal copies of libaries to enforce use of system-libs |
57 | all-abis rm -r ${SRCDIR}-$(mabi)/expat || die |
58 | #all-abis rm -r ${SRCDIR}-$(mabi)/jasper || die |
59 | all-abis rm -r ${SRCDIR}-$(mabi)/jpeg || die |
60 | all-abis rm -r ${SRCDIR}-$(mabi)/libpng || die |
61 | all-abis rm -r ${SRCDIR}-$(mabi)/zlib || die |
62 | all-abis rm -r ${SRCDIR}-$(mabi)/tiff || die |
63 | all-abis rm -r ${SRCDIR}-$(mabi)/lcms || die |
64 | all-abis rm -r ${SRCDIR}-$(mabi)/lcms2 || die |
65 | all-abis rm -r ${SRCDIR}-$(mabi)/freetype || die |
66 | all-abis rm -r ${SRCDIR}-$(mabi)/cups/libs || die |
67 | # remove internal urw-fonts |
68 | all-abis rm -r ${SRCDIR}-$(mabi)/Resource/Font || die |
69 | |
70 | # apply several fedora patches |
71 | mpatch ${PNAME}-8.70-multilib.patch || die |
72 | mpatch ${PNAME}-9.04-scripts.patch || die |
73 | mpatch ${PNAME}-8.70-noopt.patch || die |
74 | mpatch ${PNAME}-9.04-runlibfileifexists.patch || die |
75 | mpatch ${PNAME}-8.70-pksmraw.patch || die |
76 | |
77 | # search path fix |
78 | all-abis 'sed -i "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" Makefile.in base/*.mak || die' |
79 | |
80 | # fix doc pathes |
81 | all-abis 'sed -i -e "s:exdir=.*:exdir=/usr/share/doc/${PNAME}-${PVER}/examples:" |
82 | -e "s:docdir=.*:docdir=/usr/share/doc/${PNAME}-${PVER}/html:" |
83 | -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PNAME}-${PVER}/html:" |
84 | Makefile.in base/*.mak || die' |
85 | |
86 | # fix libtool issues |
87 | mlibtoolize || die |
88 | # regen makefiles |
89 | export WANT_AUTOMAKE=1.12 |
90 | mautoreconf || die |
91 | |
92 | # same for ijs dir too |
93 | SRCSUBDIR="ijs" mlibtoolize || die |
94 | SRCSUBDIR="ijs" mautoreconf || die |
95 | } |
96 | |
97 | src_compile() |
98 | { |
99 | mconfigure \ |
100 | --with-ijs \ |
101 | --with-jbig2dec \ |
102 | --with-omni \ |
103 | --without-gimp-print \ |
104 | --with-x \ |
105 | --with-drivers=ALL \ |
106 | --with-libpaper \ |
107 | --enable-fontconfig \ |
108 | --enable-freetype \ |
109 | --enable-cups \ |
110 | --enable-openjpeg \ |
111 | --enable-dynamic \ |
112 | --enable-gtk \ |
113 | --enable-cairo \ |
114 | --with-jasper \ |
115 | --with-system-libtiff \ |
116 | --disable-compile-inits \ |
117 | --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \ |
118 | || die |
119 | |
120 | |
121 | # does not like optimations |
122 | mmake -j1 so all || die |
123 | |
124 | # compile ijs |
125 | SRCSUBDIR="ijs" mconfigure --enable-shared || die |
126 | SRCSUBDIR="ijs" mmake -j1 || die |
127 | } |
128 | |
129 | src_install() |
130 | { |
131 | # needed directories |
132 | minstalldir /usr/bin || die |
133 | minstalldir /usr/include || die |
134 | minstalldir /usr/$(mlibdir) || die |
135 | |
136 | mmake -j1 DESTDIR=${BINDIR} install || die |
137 | mmake -j1 DESTDIR=${BINDIR} soinstall || die |
138 | |
139 | # install extra_fonts |
140 | minstalldir /usr/share/ghostscript || die |
141 | cp -a ${BUILDDIR}/fonts ${BINDIR}/usr/share/ghostscript || die |
142 | |
143 | # install ijs |
144 | SRCSUBDIR="ijs" mmake DESTDIR=${BINDIR} install || die |
145 | |
146 | # remove filters provided by cups-filters pkg |
147 | mdelete -r /usr/$(mlibdir)/cups/filter/gstopxl || die |
148 | mdelete -r /usr/$(mlibdir)/cups/filter/gstoraster || die |
149 | if [[ $(mlibdir) != lib ]] |
150 | then |
151 | mdelete -r /usr/lib/cups/filter/gstopxl || die |
152 | mdelete -r /usr/lib/cups/filter/gstoraster || die |
153 | fi |
154 | |
155 | # docs |
156 | minstalldocs LICENSE doc/{AUTHORS,COPYING,README} || die |
157 | } |