wok view ghostscript/receipt @ rev 24598

updated ghostscript and ghostscript-dev (9.02 -> 9.55.0)
author Hans-G?nter Theisgen
date Wed Mar 02 07:25:16 2022 +0100 (2022-03-02)
parents d8c511e24c20
children 8691816c33c5
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 # --disable-compile-inits is needed for linking with system-zlib
38 # 9.02
39 sed -i '32i#include <cups/ppd.h>' \
40 cups/colord.h
42 ./configure \
43 CC=gcc-83 \
44 CXX=g++-83 \
45 --prefix=/usr \
46 --infodir=/usr/share/info \
47 --mandir=/usr/share/man \
48 --disable-compile-inits \
49 --enable-cups \
50 --enable-dynamic \
51 --enable-gtk \
52 --with-fontpath="/usr/share/fonts/truetype/:/usr/share/fonts" \
53 --with-system-libtiff \
54 $CONFIGURE_ARGS &&
55 make $MAKEFLAGS &&
56 make install soinstall DESTDIR=$DESTDIR
57 }
59 # Rules to gen a SliTaz package suitable for Tazpkg.
60 genpkg_rules()
61 {
62 mkdir -p $fs/usr/share
63 mkdir -p $fs/usr/lib
65 cp -a $install/usr/bin $fs/usr
66 cp -a $install/usr/lib $fs/usr
67 cp -a $install/usr/share/$PACKAGE $fs/usr/share
69 # if cups-dev installed
70 # 9.55.0: not created
71 # cp -a $install/usr/share/cups $fs/usr/share
72 # cp -a $install/etc $fs
74 # Remove documentation and examples
75 rm -rf $fs/usr/share/$PACKAGE/$VERSION/doc
76 rm -rf $fs/usr/share/$PACKAGE/$VERSION/examples
78 # Remove CMAPs (Non-free : not covered under GPL) :
79 # moved to non-free package get-ghostscript-CMAP
80 rm -rf $fs/usr/share/$PACKAGE/$VERSION/Resource/CMap/*
82 # already compiled as a shared lib; gsc is same as gs
83 rm -rf $fs/usr/bin/gs
84 }
86 post_install()
87 {
88 ln -sf /usr/bin/gsc "$1/usr/bin/gs"
89 }