blob: 05ad3ddfe959a6e507e71fa2b8a9973472e8b6de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
# Contributor: Cameron Banta <cbanta@gmail.com>
# Maintainer: Cameron Banta <cbanta@gmail.com>
pkgname=ghostscript
pkgver=9.18
pkgrel=0
pkgdesc="An interpreter for the PostScript language and for PDF"
url="http://ghostscript.com/"
arch="all"
license="GPL3"
makedepends="autoconf automake libjpeg-turbo-dev libpng-dev jasper-dev expat-dev
zlib-dev tiff-dev freetype-dev lcms2-dev gtk+3.0-dev
cups-dev libtool jbig2dec-dev openjpeg-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-gtk"
source="http://downloads.ghostscript.com/public/$pkgname-$pkgver.tar.gz
ghostscript-system-zlib.patch
ghostscript-system-openjpeg2.patch
fix-sprintf.patch
"
_builddir="$srcdir/ghostscript-$pkgver"
prepare() {
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
# force it to use system-libs
rm -r jpeg libpng zlib tiff lcms2 cups/libs jbig2dec \
freetype openjpeg || return 1
# fix parallel builds
sed -i -e 's/ECHO_XE/ECHOGS_XE/g' \
-e 's/^\($(GLOBJ)md5.$(OBJ) :.*\)/\1 $(ECHOGS_XE)/' \
base/lib.mak || return 1
aclocal && autoconf --force
cd $_builddir/ijs
libtoolize --force && aclocal && autoconf && automake --add-missing
}
build(){
# build ijs
cd "$_builddir"/ijs
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--enable-shared \
--disable-static \
|| return 1
make
cd "$_builddir"
# --disable-compile-inits is needed to link with system-zlib
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--docdir=/usr/share/doc/"$pkgname" \
--enable-dynamic \
--disable-static \
--with-system-libtiff \
--with-ijs \
--with-jbig2dec \
--without-omni \
--enable-gtk \
--with-drivers=ALL \
--with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \
--disable-compile-inits \
|| return 1
make so all || return 1
}
package() {
cd "$_builddir"
make -j1 DESTDIR="${pkgdir}" install soinstall || return 1
cd "$_builddir"/ijs
make -j1 DESTDIR="${pkgdir}" install || return 1
cd..
#create empty dir for future fonts
mkdir -p "${pkgdir}"/usr/share/fonts/Type1
# license and copying
install -m644 -D "$srcdir/$pkgname-$pkgver/LICENSE" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -m644 -D "$srcdir/$pkgname-$pkgver/doc/COPYING" \
"$pkgdir/usr/share/licenses/$pkgname/COPYING"
# make the doc and examples more alpine like
# (the --docdir above doesn't seem to work so good)
mkdir -p "$pkgdir/usr/share/doc/$pkgname"
mv "$pkgdir/usr/share/$pkgname/$pkgver/doc" "$pkgdir/usr/share/doc/$pkgname"
mv "$pkgdir/usr/share/$pkgname/$pkgver/examples" "$pkgdir/usr/share/doc/$pkgname"
}
gtk() {
pkgdesc="A GTK-enabled PostScript interpreter and renderer"
install -d "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/gsx "$subpkgdir"/usr/bin/
}
md5sums="33a47567d7a591c00a253caddd12a88a ghostscript-9.18.tar.gz
bdad7bbdc1d8a0cba5817ad722003fcc ghostscript-system-zlib.patch
7bc12888cccf6d2827d0ff012813220f ghostscript-system-openjpeg2.patch
ed14fa288463e08e1e6074a5d1ebbcbb fix-sprintf.patch"
sha256sums="5fc93079749a250be5404c465943850e3ed5ffbc0d5c07e10c7c5ee8afbbdb1b ghostscript-9.18.tar.gz
ef2a7546592561c27a6f0a61c28cc76ec5aa1f569f5c2c344c6228de059b60cd ghostscript-system-zlib.patch
0d029c98b2149715b63d2eae9634eca0d427bf77e713dd355854412fc92b35ac ghostscript-system-openjpeg2.patch
3051dff937ab9ced9f88b36384400b10bc9cdb39b2abd3ece8f4c41a0246874e fix-sprintf.patch"
sha512sums="e204648f7c21f4c48854c5fe9fc1b5a2914b8234a20a9b8b7670c7d9688360f5122f439b1396abcdb357562ad2a95384b90ffff2c5570fdaa811dfe2f6acc1a8 ghostscript-9.18.tar.gz
25af145eff059a5c854e5e290541b53ffaf4dea67f3f3ea4a608c14c2bbb151983d2a986265fae2e75651a5df212d0754d05ca64ac245fcaf6e3645a063a5aac ghostscript-system-zlib.patch
f874540fc53f85a3587253aaf8a29fc7792590938daf7f44e573cbbdac258b39db8baccce9569737c5c1a0a3816c6a8ff55b97f60dbefbba0c1729fd202d0ddd ghostscript-system-openjpeg2.patch
300712709ec75f728c703f6a2a5abd992b7c2137df81cc1dd4f6e96c690077e0d5a4afd0e06ce55660061911ddfbf1e68d7020ec3e5f2124602133a10451ec42 fix-sprintf.patch"
|