initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

118
ghostscript/PKGBUILD Normal file
View File

@@ -0,0 +1,118 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
pkgbase=ghostscript
pkgname=(ghostscript ghostxps ghostpcl)
pkgver=9.53.3
_debver=$pkgver
_debrel=7
pkgrel=3
pkgdesc="An interpreter for the PostScript language"
url='https://www.ghostscript.com/'
arch=('i686' 'x86_64')
license=('AGPL-3')
depends=('libxt' 'libcups' 'fontconfig' 'zlib' 'libpng' 'libjpeg-turbo' 'jbig2dec'
'libtiff' 'lcms2' 'libpaper' 'ijs' 'openjpeg2' 'libidn')
makedepends=('gnutls' 'glu' 'freeglut' 'quilt')
# https://github.com/ArtifexSoftware/ghostpdl-downloads/releases
source=("https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${pkgver//./}/ghostpdl-${pkgver}.tar.gz"
"https://deb.debian.org/debian/pool/main/g/ghostscript/ghostscript_${_debver}~dfsg-${_debrel}+deb11u6.debian.tar.xz")
sha512sums=('1ed66f177377f099a012ee0bfdca10be8b6846e8de8e538119eb7de5c9da2edc341f8d45d8c819206908c1f98de3625acd0f647f13d82c5ec56865085cde280b'
'e96b0438b9dd0a724ee244ebbc23950294e3ec83e1f8985d4f7193d597c2a043a7a251c1469a8d9d1d07562c57342e4c9e0997d809dc369af1150b972bcd45ee')
### update jbig2dec first! ###
prepare() {
cd ghostpdl-${pkgver}
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
mv "$srcdir"/debian .
# Doesn't apply
rm -v debian/patches/2* || true
quilt push -av
fi
# force it to use system-libs
rm -r cups/libs expat ijs jbig2dec jpeg lcms2mt libpng openjpeg tiff zlib
# using tree freetype because of https://bugs.archlinux.org/task/56849
# lcms2mt is the new lcms2 fork aimed to replace lcms2 in a thread safe way
# http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=40dc5b409c6262b18b4bf5386b5482ead4c511e3
# libs link unwanted to libgpdl that isn't installed
rm -rf gpdl
}
build() {
cd ghostpdl-${pkgver}
./configure --prefix=/usr \
--enable-dynamic \
--with-ijs \
--with-jbig2dec \
--with-x \
--with-drivers=ALL \
--with-openprinting \
--with-fontpath=/usr/share/fonts/gsfonts \
--enable-fontconfig \
--enable-freetype \
--enable-openjpeg \
--without-luratech \
--with-libtiff \
--with-libpaper \
--disable-compile-inits #--help # needed for linking with system-zlib
make so-only
}
package_ghostscript() {
cd ghostpdl-${pkgver}
make DESTDIR="${pkgdir}" \
CUPSSERVERROOT="${pkgdir}/etc/cups" \
CUPSSERVERBIN="${pkgdir}/usr/libexec/cups" \
soinstall
ln -s gsc "${pkgdir}"/usr/bin/gs
# remove useless broken doc/ symlink - FS#59507
rm -f "${pkgdir}"/usr/share/ghostscript/${pkgver}/doc
# remove unwanted localized manpages
rm -r "${pkgdir}"/usr/share/man/de
install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
}
package_ghostxps() {
pkgdesc="${pkgdesc/PostScript/XPS document}"
depends=("ghostscript=${pkgver}-${pkgrel}")
cd ghostpdl-${pkgver}
install -Dt "${pkgdir}"/usr/bin sobin/gxpsc
ln -s gxpsc "${pkgdir}"/usr/bin/gxps
install -Dt "${pkgdir}"/usr/lib sobin/libgxps.so.${pkgver%.*}
ln -s libgxps.so.${pkgver%.*} "${pkgdir}"/usr/lib/libgxps.so.${pkgver%%.*}
install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
}
package_ghostpcl() {
pkgdesc="${pkgdesc/PostScript/PCL 6}"
depends=("ghostscript=${pkgver}-${pkgrel}")
cd ghostpdl-${pkgver}
install -Dt "${pkgdir}"/usr/bin sobin/gpcl6c
ln -sf gpcl6c "${pkgdir}"/usr/bin/gpcl6
install -Dt "${pkgdir}"/usr/lib sobin/libgpcl6.so.${pkgver%.*}
ln -s libgpcl6.so.${pkgver%.*} "${pkgdir}"/usr/lib/libgpcl6.so.${pkgver%%.*}
install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
}