mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-12 12:14:35 +02:00
* CVE-2024-46951 * CVE-2024-46952 * CVE-2024-46953 * CVE-2024-46954 * CVE-2024-46955 * CVE-2024-46956
205 lines
4.4 KiB
Text
205 lines
4.4 KiB
Text
# Contributor: Cameron Banta <cbanta@gmail.com>
|
|
# Maintainer: Cameron Banta <cbanta@gmail.com>
|
|
pkgname=ghostscript
|
|
pkgver=10.04.0
|
|
pkgrel=0
|
|
pkgdesc="Interpreter for the PostScript language and for PDF"
|
|
url="https://ghostscript.com/"
|
|
arch="all"
|
|
license="AGPL-3.0-or-later"
|
|
options="!check"
|
|
makedepends="
|
|
autoconf
|
|
automake
|
|
cups-dev
|
|
expat-dev
|
|
freetype-dev
|
|
gtk+3.0-dev
|
|
jbig2dec-dev
|
|
lcms2-dev
|
|
libjpeg-turbo-dev
|
|
libpng-dev
|
|
libtool
|
|
openjpeg-dev
|
|
tiff-dev
|
|
zlib-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
|
|
ghostscript-system-zlib.patch
|
|
fix-sprintf.patch
|
|
"
|
|
|
|
# secfixes:
|
|
# 10.04.0-r0:
|
|
# - CVE-2024-46951
|
|
# - CVE-2024-46952
|
|
# - CVE-2024-46953
|
|
# - CVE-2024-46954
|
|
# - CVE-2024-46955
|
|
# - CVE-2024-46956
|
|
# 10.03.1-r0:
|
|
# - CVE-2023-52722
|
|
# - CVE-2024-29510
|
|
# - CVE-2024-33869
|
|
# - CVE-2024-33870
|
|
# - CVE-2024-33871
|
|
# 10.02.0-r0:
|
|
# - CVE-2023-43115
|
|
# 9.54-r1:
|
|
# - CVE-2021-3781
|
|
# 9.51-r0:
|
|
# - CVE-2020-16287
|
|
# - CVE-2020-16288
|
|
# - CVE-2020-16289
|
|
# - CVE-2020-16290
|
|
# - CVE-2020-16291
|
|
# - CVE-2020-16292
|
|
# - CVE-2020-16293
|
|
# - CVE-2020-16294
|
|
# - CVE-2020-16295
|
|
# - CVE-2020-16296
|
|
# - CVE-2020-16297
|
|
# - CVE-2020-16298
|
|
# - CVE-2020-16299
|
|
# - CVE-2020-16300
|
|
# - CVE-2020-16301
|
|
# - CVE-2020-16302
|
|
# - CVE-2020-16303
|
|
# - CVE-2020-16304
|
|
# - CVE-2020-16305
|
|
# - CVE-2020-16306
|
|
# - CVE-2020-16307
|
|
# - CVE-2020-16308
|
|
# - CVE-2020-16309
|
|
# - CVE-2020-16310
|
|
# - CVE-2020-17538
|
|
# 9.50-r0:
|
|
# - CVE-2019-14869
|
|
# 9.27-r4:
|
|
# - CVE-2019-14817
|
|
# 9.27-r3:
|
|
# - CVE-2019-14811
|
|
# - CVE-2019-14812
|
|
# - CVE-2019-14813
|
|
# 9.27-r2:
|
|
# - CVE-2019-10216
|
|
# 9.26-r2:
|
|
# - CVE-2019-3835
|
|
# - CVE-2019-3838
|
|
# 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() {
|
|
default_prepare # apply patches
|
|
|
|
# force it to use system-libs
|
|
rm -r \
|
|
cups/libs \
|
|
freetype \
|
|
jbig2dec \
|
|
jpeg \
|
|
lcms2mt \
|
|
libpng \
|
|
openjpeg \
|
|
tiff \
|
|
zlib
|
|
|
|
# fails to build tesseract due missing SIMD instructions on arm32:
|
|
case "$CARCH" in
|
|
armhf|armv7)
|
|
rm -r leptonica tesseract
|
|
;;
|
|
esac
|
|
|
|
# fix parallel builds
|
|
sed -i -e 's/ECHO_XE/ECHOGS_XE/g' \
|
|
-e 's/^\($(GLOBJ)md5.$(OBJ) :.*\)/\1 $(ECHOGS_XE)/' \
|
|
base/lib.mak
|
|
aclocal && autoconf --force
|
|
|
|
cd $builddir/ijs
|
|
libtoolize --force && aclocal && autoconf && automake --add-missing
|
|
}
|
|
|
|
build() {
|
|
export CFLAGS="$CFLAGS -flto=auto"
|
|
|
|
# build ijs
|
|
cd "$builddir"/ijs
|
|
./configure \
|
|
--build=$CBUILD \
|
|
--host=$CHOST \
|
|
--prefix=/usr \
|
|
--enable-shared \
|
|
--disable-static
|
|
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" \
|
|
--with-system-libtiff \
|
|
--with-ijs \
|
|
--with-jbig2dec \
|
|
--without-libpaper \
|
|
--without-versioned-path \
|
|
--enable-gtk \
|
|
--with-drivers=ALL \
|
|
--with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \
|
|
--disable-compile-inits
|
|
make so all
|
|
}
|
|
|
|
package() {
|
|
make -j1 DESTDIR="$pkgdir" install soinstall
|
|
|
|
cd "$builddir"/ijs
|
|
make -j1 DESTDIR="$pkgdir" install
|
|
cd ..
|
|
|
|
# create empty dir for future fonts
|
|
mkdir -p "$pkgdir"/usr/share/fonts/Type1
|
|
}
|
|
|
|
gtk() {
|
|
pkgdesc="A GTK-enabled PostScript interpreter and renderer"
|
|
|
|
amove usr/bin/gsx
|
|
}
|
|
|
|
sha512sums="
|
|
75e49a1778b7cc4fdfb5d871355cbd653458250cddc9075d70df8e4200ccd0a49de22f101450c1d0790a7ee3475b94835265ff295498495eb0dcfd04efee2e8d ghostscript-10.04.0.tar.gz
|
|
70721e3a335afa5e21d4e6cf919119010bd4544a03ab8f53f5325c173902221ad9b88c118b4bfeee80b3e1956bcdbaf4c53f64ae7fb81f5ba57dbc956750c482 ghostscript-system-zlib.patch
|
|
beefcf395f7f828e1b81c088022c08a506e218f27535b9de01e0f0edf7979b435316c318fa676771630f6ad16ff1ab059cd68aa128ed97e5a9f2f3fa840200c4 fix-sprintf.patch
|
|
"
|