wok view ghostscript/receipt @ rev 25679

Fix ghostscript receipt
author Stanislas Leduc <shann@slitaz.org>
date Fri Mar 08 14:14:23 2024 +0100 (2 months ago)
parents 70fb2457b74f
children
line source
1 # SliTaz package receipt.
3 PACKAGE="ghostscript"
4 VERSION="9.55.0"
5 CATEGORY="office"
6 SHORT_DESC="Ghostscript tools and utilities."
7 MAINTAINER="jozee@slitaz.org"
8 LICENSE="AGPL"
9 WEB_SITE="https://www.ghostscript.com/"
11 TARBALL="$PACKAGE-$VERSION.tar.xz"
12 WGET_URL="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${VERSION//./}/$TARBALL"
14 DEPENDS="cups expat fontconfig freetype gcc83-lib-base gnutls gtk+ jasper
15 jbig2dec jpeg libgcrypt libgpg-error libpng tiff xorg-libICE
16 xorg-libSM xorg-libX11 xorg-libXau xorg-libXdmcp xorg-libXext
17 xorg-libXt zlib"
18 # build depends are optional ; ghostscripts still build but does not compile in cups support
19 BUILD_DEPENDS="cairo-dev cups-dev expat-dev fontconfig-dev freetype-dev
20 gcc83 gnutls-dev gtk+-dev jasper-dev jbig2dec jpeg-dev libgcrypt-dev
21 libgpg-error-dev libpng-dev tiff-dev zlib-dev"
23 # What is the latest version available today?
24 current_version()
25 {
26 wget -O - https://www.ghostscript.com/releases/index.html 2>/dev/null | \
27 sed '/latest release/!d;s|.*script ||;s| .*||;q'
28 }
30 # Rules to configure and make the package.
31 compile_rules()
32 {
33 # force it to use system-libs
34 rm -rf jpeg libpng zlib jasper expat
36 # Patch for CVE-2023-36664
37 patch -p1 < $stuff/CVE-2023-36664-1.patch
38 patch -p1 < $stuff/CVE-2023-36664-2.patch
40 # --disable-compile-inits is needed for linking with system-zlib
41 ./configure \
42 CC=gcc-83 \
43 CXX=gcc-83 \
44 --prefix=/usr \
45 --infodir=/usr/share/info \
46 --mandir=/usr/share/man \
47 --disable-compile-inits \
48 --enable-cups \
49 --enable-dynamic \
50 --enable-gtk \
51 --with-fontpath="/usr/share/fonts/truetype/:/usr/share/fonts" \
52 --with-system-libtiff \
53 $CONFIGURE_ARGS &&
54 make $MAKEFLAGS &&
55 make install soinstall DESTDIR=$DESTDIR
56 }
58 # Rules to gen a SliTaz package suitable for Tazpkg.
59 genpkg_rules()
60 {
61 mkdir -p $fs/usr/share
62 mkdir -p $fs/usr/lib
64 cp -a $install/usr/bin $fs/usr
65 cp -a $install/usr/lib $fs/usr
66 cp -a $install/usr/share/$PACKAGE $fs/usr/share
68 # if cups-dev installed
69 # 9.55.0: not created
70 # cp -a $install/usr/share/cups $fs/usr/share
71 # cp -a $install/etc $fs
73 # Remove documentation and examples
74 rm -rf $fs/usr/share/$PACKAGE/$VERSION/doc
75 rm -rf $fs/usr/share/$PACKAGE/$VERSION/examples
77 # Remove CMAPs (Non-free : not covered under GPL) :
78 # moved to non-free package get-ghostscript-CMAP
79 rm -rf $fs/usr/share/$PACKAGE/$VERSION/Resource/CMap/*
81 # already compiled as a shared lib; gsc is same as gs
82 rm -rf $fs/usr/bin/gs
83 }
85 post_install()
86 {
87 ln -sf /usr/bin/gsc "$1/usr/bin/gs"
88 }