void-packages/srcpkgs/gimp/template
Imran Hameed b021f400fa gimp: reenable avif/heic
libheif commit cf0d89c6e0809427427583290547a7757428cf5a removes the definitions
for the `builtin_h265_decoder`, `builtin_h265_encoder`, `builtin_avif_decoder`,
and `builtin_avif_encoder` pkg-config variables. This commit is included in
libheif 1.80.0 and newer. gimp 2.10.38 depends on these pkg-config variables in
its autoconf morass, and as a result is built without support for importing or
exporting avif and heic. This commit "fixes" this by forcefully setting these
feature detection flags to "yes" if any version of libheif is present.
Technically this logic should only apply to libheif 1.80.0 and above, but I
don't think there's really any good reason to bother with that additional
complication for a patch meant specifically for compiling gimp in a rolling
release distribution.

Some links:
 - <https://www.github.com/strukturag/libheif/issues/758>
 - <https://gitlab.gnome.org/GNOME/gimp/-/issues/9080>
2024-09-08 12:16:19 -04:00

50 lines
1.7 KiB
Bash

# Template file for 'gimp'
pkgname=gimp
version=2.10.38
revision=3
build_style=gnu-configure
configure_args="--disable-check-update --datadir=/usr/share --disable-python"
hostmakedepends="automake gegl gettext-devel glib-devel gtk+-devel intltool
libtool pkg-config perl-XML-Parser gtk-doc iso-codes"
makedepends="aalib-devel alsa-lib-devel babl-devel dbus-glib-devel gegl-devel
ghostscript-devel jasper-devel lcms2-devel libXcursor-devel libXpm-devel
libgexiv2-devel libgudev-devel libmng-devel libmypaint-devel
libopenexr-devel librsvg-devel libwmf-devel mypaint-brushes1
poppler-glib-devel glib-networking libwebp-devel
libheif-devel libopenjpeg2-devel x265-devel gtk+-devel"
depends="desktop-file-utils hicolor-icon-theme iso-codes mypaint-brushes1"
short_desc="GNU image manipulation program"
conf_files="/etc/gimp/${version%%.*}.0/*"
maintainer="fosslinux <fosslinux@aussies.space>"
license="GPL-3.0-only"
homepage="https://www.gimp.org"
changelog="https://gitlab.gnome.org/GNOME/gimp/-/raw/gimp-2-10/NEWS"
distfiles="https://download.gimp.org/pub/gimp/v${version%.*}/gimp-${version}.tar.bz2"
checksum=50a845eec11c8831fe8661707950f5b8446e35f30edfb9acf98f85c1133f856e
lib32disabled=yes
no_generic_pkgconfig_link=yes
pre_configure() {
NOCONFIGURE=1 autoreconf -fi
# don't allow configure to set DATADIRNAME=lib
vsed -i 's/DATADIRNAME=lib/DATADIRNAME=share/' configure
}
libgimp_package() {
short_desc+=" - runtime libraries"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
gimp-devel_package() {
depends="gegl-devel gtk+-devel lcms2-devel libgimp>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/share/gtk-doc
vmove usr/share/aclocal
vmove "usr/lib/*.so"
}
}