blob: 68b83c4bb5ad85cb8f45328dc673d0cf7657b614 (
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
# Contributor: Cameron Banta <cbanta@gmail.com>
# Maintainer: Cameron Banta <cbanta@gmail.com>
pkgname=ghostscript
pkgver=9.26
pkgrel=4
pkgdesc="An interpreter for the PostScript language and for PDF"
url="https://ghostscript.com/"
arch="all"
license="GPL-3.0"
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-dbg $pkgname-doc $pkgname-dev $pkgname-gtk"
source="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${pkgver/./}/ghostscript-$pkgver.tar.gz
https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs926/0001-Bug700317-Address-.force-operators-exposure.tgz
CVE-2019-6116.patch
CVE-2019-3835.patch
CVE-2019-3838.patch
CVE-2019-10216.patch
ghostscript-system-zlib.patch
fix-sprintf.patch
CVE-2019-14811-14812-14813.patch
0001-Hide-pdfdict-and-GS_PDF_ProcSet-internal-stuff-for-t.patch
0002-Bug-700599-Issue-an-error-message-if-an-ExtGstate-is.patch
CVE-2019-14817.patch
"
builddir="$srcdir/$pkgname-$pkgver"
# secfixes:
# 9.26-r4:
# - CVE-2019-14811
# - CVE-2019-14812
# - CVE-2019-14813
# - CVE-2019-14817
# 9.26-r3:
# - CVE-2019-10216
# 9.26-r2:
# - CVE-2019-3835
# - CVE-2019-3838
# - CVE-2019-6116
# 9.26-r1:
# - CVE-2019-6116
# 9.26-r0:
# - CVE-2018-19409
# - CVE-2018-19475
# - CVE-2018-19476
# - CVE-2018-19477
# 9.25-r1:
# - CVE-2018-17961
# - CVE-2018-18073
# - CVE-2018-18284
# 9.25-r0:
# - CVE-2018-16802
# 9.24-r0:
# - CVE-2018-15908
# - CVE-2018-15909
# - CVE-2018-15910
# - CVE-2018-15911
# 9.23-r0:
# - CVE-2018-10194
# 9.21-r2:
# - CVE-2017-8291
# 9.21-r3:
# - CVE-2017-7207
# - CVE-2017-5951
prepare() {
cd "$builddir"
default_prepare || return 1 # apply patches
# force it to use system-libs
rm -r jpeg libpng zlib tiff lcms2mt cups/libs jbig2dec \
freetype || 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 || return 1
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 || return 1
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"
}
gtk() {
pkgdesc="A GTK-enabled PostScript interpreter and renderer"
install -d "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/gsx "$subpkgdir"/usr/bin/
}
sha512sums="670159c23618ffafa85c671642bf182a107a82c053a1fd8c3f45f73f203524077be1b212d2ddbabae7892c7713922877e03b020f78bd2aab1ae582c4fc7d820a ghostscript-9.26.tar.gz
289d916a0b0da410e6f721e42bc44659c91c66ca0f7b96b1a6b010ae1c25e47788e282edc3578b4e4b120a2c684c7b1fd4cc574084bdc9cbbf6e431a01fbae0e 0001-Bug700317-Address-.force-operators-exposure.tgz
78564c1dd878cb6a924663cb5d61901a413a867dedc8753e537e08a4da9cc0aaeb817bab266fd66e5d0e871d9ed6078af6e6f455b5426e0917875682d76638f5 CVE-2019-6116.patch
31769852e75be4e1cd0e7c3f43cc7b3457bf9ba505fc2a5acda53779cc5626854bf15fef3e225f3d922f4038dd18c598dbac30abb863159202e4d0fe02c02d3b CVE-2019-3835.patch
dc3bd1de86e4a968ed35a35a125f682cffeed51fe4dbf9b3939dd78b07ef0748fe6b34816e689bcfffb4f819e51bcb5022f3151a5610aa24fd2468cdcbc665ea CVE-2019-3838.patch
f89744b17922b7d9c04c6de69ce35fa621732e4373eccc158b7ff6a9e56d2cf0bbea30c28119f4808864ca584e94342e5125d7bcc6195252455b5f223f379e3f CVE-2019-10216.patch
70721e3a335afa5e21d4e6cf919119010bd4544a03ab8f53f5325c173902221ad9b88c118b4bfeee80b3e1956bcdbaf4c53f64ae7fb81f5ba57dbc956750c482 ghostscript-system-zlib.patch
beefcf395f7f828e1b81c088022c08a506e218f27535b9de01e0f0edf7979b435316c318fa676771630f6ad16ff1ab059cd68aa128ed97e5a9f2f3fa840200c4 fix-sprintf.patch
b61a1c5d818c054463e606a9f85e4f4a308ac839f734d6200dfc3b74e3859ac64b23996ff1bf4c90a0ee95acf10dfa19d066fda0b6fb11689294d0dc4267689e CVE-2019-14811-14812-14813.patch
8036fa8a7175546dc3aae8619c92fa38016a8be132bb2a3a01f16ba66b5d9c05581dba40c1f184380b43b4e0b079d3cace7e401f9ed5fd718f36fbe7038649bc 0001-Hide-pdfdict-and-GS_PDF_ProcSet-internal-stuff-for-t.patch
26ad5e996d4724a1683083c1abfdd39ebf41f5e7478a061f5713e11f2ffaf3834fe52f29e03d585044c7536b1201a97626f3640324abdc3e90b6ecc2a2db399b 0002-Bug-700599-Issue-an-error-message-if-an-ExtGstate-is.patch
63b7d1a30045e454eba0bcceba52fd402c5fd9313c0057100bb98d2e82c1d61cd404826f63c4b9d7e4fdf4935c71f09a9633d43edbcd0658fb5dc5e20afc6ca0 CVE-2019-14817.patch"
|