PKGNAME=ghostscript
PKGSEC=doc
PKGDEP="cups x11-lib fontconfig zlib libpng libjpeg-turbo libtiff \
        lcms2 dbus libpaper libidn openjpeg droid-fallback-fonts \
        urw-fonts poppler-data"
BUILDDEP="ijs"
PKGDES="Interpreter for the PostScript language"

ABTYPE=self
AUTOTOOLS_AFTER=(
	'--prefix=/usr'
	'--enable-dynamic'
	'--with-ijs'
	'--with-jbig2dec'
	'--with-x'
	'--with-drivers=ALL'
	'--with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts'
	'--enable-fontconfig'
	'--enable-openjpeg'
	'--with-system-libtiff'
	'--with-libpaper'
	'--disable-gtk'
	'--disable-compile-inits'
	'--disable-hidden-visibility'
	'--without-versioned-path'
)

PKGBREAK="imagemagick<=6.9.13+37-2 gimp<=3.2.2 graphviz<=14.1.2 \
          imagemagick+7<=7.1.1+32-2 libspectre<=0.2.9 texlive<=20250308-4"

# Needed by Afterglow, whereas FAIL_ARCH defaults to mainline-only.
FAIL_ARCH="!(mainline|retro)"
