wok-current view ghostscript/receipt @ rev 25685
Add checkspace / fetchall feature for tazpkg
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Thu Mar 14 20:28:39 2024 +0000 (8 months ago) |
parents | a23978bfa665 |
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 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 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 --prefix=/usr \
43 --infodir=/usr/share/info \
44 --mandir=/usr/share/man \
45 --disable-compile-inits \
46 --enable-cups \
47 --enable-dynamic \
48 --enable-gtk \
49 --with-fontpath="/usr/share/fonts/truetype/:/usr/share/fonts" \
50 --with-system-libtiff \
51 $CONFIGURE_ARGS &&
52 make $MAKEFLAGS &&
53 make install soinstall DESTDIR=$DESTDIR
54 }
56 # Rules to gen a SliTaz package suitable for Tazpkg.
57 genpkg_rules()
58 {
59 mkdir -p $fs/usr/share
60 mkdir -p $fs/usr/lib
62 cp -a $install/usr/bin $fs/usr
63 cp -a $install/usr/lib $fs/usr
64 cp -a $install/usr/share/$PACKAGE $fs/usr/share
66 # if cups-dev installed
67 # 9.55.0: not created
68 # cp -a $install/usr/share/cups $fs/usr/share
69 # cp -a $install/etc $fs
71 # Remove documentation and examples
72 rm -rf $fs/usr/share/$PACKAGE/$VERSION/doc
73 rm -rf $fs/usr/share/$PACKAGE/$VERSION/examples
75 # Remove CMAPs (Non-free : not covered under GPL) :
76 # moved to non-free package get-ghostscript-CMAP
77 rm -rf $fs/usr/share/$PACKAGE/$VERSION/Resource/CMap/*
79 # already compiled as a shared lib; gsc is same as gs
80 rm -rf $fs/usr/bin/gs
81 }
83 post_install()
84 {
85 ln -sf /usr/bin/gsc "$1/usr/bin/gs"
86 }