Magellan Linux

Contents of /branches/R11-stable/extras/ghostscript-gpl/ghostscript-gpl-9.06-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 15132 - (show annotations) (download)
Wed Jan 2 10:46:17 2013 UTC (11 years, 5 months ago) by niro
File size: 3691 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="ghostscript-gpl"
4 PVER="9.06"
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.24
17 >= x11-libs/libXt-1
18 >= x11-libs/libXext-1
19 >= media-libs/fontconfig-2.10
20 >= media-libs/libjasper-1.900
21 >= app-text/libpaper-1.1.24
22 >= x11-libs/cairo-1.10
23 >= sys-libs/libstdc++-4.7"
24
25 SDEPEND=">= net-print/cups-1.4
26 >= dev-util/pkgconfig-0.25"
27
28 SRCFILE="${PNAME/-gpl/}-${PVER}.tar.gz"
29 EXTRA_SRCFILE="ghostscript-fonts-std-8.11.tar.gz"
30
31 SRCDIR="${BUILDDIR}/${PNAME/-gpl/}-${PVER}"
32
33 sminclude mtools multilib
34
35 SRC_URI=(
36 http://downloads.ghostscript.com/public/${SRCFILE}
37 http://ghostscript.com/releases/${SRCFILE}
38 mirror://${PNAME}/${SRCFILE}
39 mirror://${PNAME}/${EXTRA_SRCFILE}
40 mirror://${PNAME}/${PNAME}-8.70-multilib.patch
41 mirror://${PNAME}/${PNAME}-9.04-scripts.patch
42 mirror://${PNAME}/${PNAME}-8.70-noopt.patch
43 mirror://${PNAME}/${PNAME}-9.04-runlibfileifexists.patch
44 mirror://${PNAME}/${PNAME}-8.70-pksmraw.patch
45 mirror://${PNAME}/${PNAME}-9.05-cups-filters.patch
46 )
47
48 UP2DATE="updatecmd_sourceforge ${PNAME/-gpl/} 'GPL Ghostscript' - ${PNAME/-gpl/}"
49
50 src_prepare()
51 {
52 munpack ${SRCFILE} || die
53 oldmunpack ${EXTRA_SRCFILE} || die
54
55 # remove internal copies of expat, jasper, jpeg, libpng and zlib
56 all-abis rm -r ${SRCDIR}-$(mabi)/expat || die
57 all-abis rm -r ${SRCDIR}-$(mabi)/jasper || die
58 all-abis rm -r ${SRCDIR}-$(mabi)/jpeg || die
59 all-abis rm -r ${SRCDIR}-$(mabi)/libpng || die
60 all-abis rm -r ${SRCDIR}-$(mabi)/zlib || die
61 # remove internal urw-fonts
62 all-abis rm -r ${SRCDIR}-$(mabi)/Resource/Font || die
63
64 # apply several fedora patches
65 mpatch ${PNAME}-8.70-multilib.patch || die
66 mpatch ${PNAME}-9.04-scripts.patch || die
67 mpatch ${PNAME}-8.70-noopt.patch || die
68 mpatch ${PNAME}-9.04-runlibfileifexists.patch || die
69 mpatch ${PNAME}-8.70-pksmraw.patch || die
70 mpatch ${PNAME}-9.05-cups-filters.patch || die
71
72 # search path fix
73 all-abis 'sed -i "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVER%.*}/$(mlibdir):" base/Makefile.in base/*.mak || die'
74
75 # fix doc pathes
76 all-abis 'sed -i -e "s:exdir=.*:exdir=/usr/share/doc/${PNAME}-${PVER}/examples:"
77 -e "s:docdir=.*:docdir=/usr/share/doc/${PNAME}-${PVER}/html:"
78 -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PNAME}-${PVER}/html:"
79 base/Makefile.in base/*.mak || die'
80
81 # fix libtool issues
82 mlibtoolize || die
83 # regen makefiles
84 mautoreconf || die
85
86 # same for ijs dir too
87 SRCSUBDIR="ijs" mlibtoolize || die
88 SRCSUBDIR="ijs" mautoreconf || die
89 }
90
91 src_compile()
92 {
93 mconfigure \
94 --with-ijs \
95 --with-jbig2dec \
96 --with-omni \
97 --without-gimp-print \
98 --with-x \
99 --with-drivers=ALL \
100 --with-libpaper \
101 --enable-fontconfig \
102 --enable-cups \
103 --enable-dynamic \
104 --enable-gtk \
105 --enable-cairo \
106 --with-jasper \
107 --disable-compile-inits \
108 --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \
109 || die
110
111
112 # does not like optimations
113 mmake -j1 so all || die
114
115 # compile ijs
116 SRCSUBDIR="ijs" mconfigure --enable-shared || die
117 SRCSUBDIR="ijs" mmake -j1 || die
118 }
119
120 src_install()
121 {
122 # needed directories
123 minstalldir /usr/bin || die
124 minstalldir /usr/include || die
125 minstalldir /usr/$(mlibdir) || die
126
127 mmake -j1 DESTDIR=${BINDIR} install || die
128 mmake -j1 DESTDIR=${BINDIR} soinstall || die
129
130 # install extra_fonts
131 minstalldir /usr/share/ghostscript || die
132 cp -a ${BUILDDIR}/fonts ${BINDIR}/usr/share/ghostscript || die
133
134 # install ijs
135 SRCSUBDIR="ijs" mmake DESTDIR=${BINDIR} install || die
136
137 # docs
138 minstalldocs LICENSE doc/{AUTHORS,COPYING,README} || die
139 }