116 lines
4.9 KiB
Bash
116 lines
4.9 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
# Based on gimp-package
|
|
|
|
_realpkgname=gimp
|
|
pkgname=$_realpkgname-legacy
|
|
pkgver=2.10.24
|
|
_basever=2.0
|
|
_debver=2.10.22
|
|
_debrel=4
|
|
pkgrel=2
|
|
pkgdesc="GNU Image Manipulation Program (legacy version)"
|
|
arch=('i686' 'x86_64')
|
|
url='https://www.gimp.org/'
|
|
# plug-ins doesn't cover the license software, because contains an exception in GPL-3, read: LICENSE
|
|
# script-fu is GPL-3 and contains some code with Modified-BSD
|
|
license=('custom:GPL-3+Plugins-Special-Exception' LGPL-3 GPL-2) # software/plug-ins and libraries
|
|
backup=(etc/$_realpkgname/$_basever/{controller,$_realpkgname,gtk,menu,session,template,tool,unit}rc)
|
|
depends=('aalib' 'ghostscript' 'gtk2' 'libmng' 'libxmu' 'libxpm' 'mypaint-brushes1' 'poppler-data'
|
|
'tauthon-pygtk' 'glib-networking' 'gexiv2')
|
|
makedepends=('intltool' 'iso-codes' 'libxslt' 'quilt' 'xdg-utils')
|
|
optdepends=('gutenprint: for sophisticated printing only as gimp has built-in cups print support'
|
|
'xdg-utils: for send email support')
|
|
source=("https://download.gimp.org/pub/$_realpkgname/v${pkgver%.*}/${_realpkgname}-${pkgver}.tar.bz2"
|
|
"https://deb.debian.org/debian/pool/main/g/$_realpkgname/${_realpkgname}_${_debver}-${_debrel}+deb11u2.debian.tar.xz"
|
|
"linux_kernel.gpl"
|
|
"remove-update-check.patch"
|
|
"remove-plugins.patch"
|
|
"CVE-2025-2761.patch")
|
|
sha512sums=('828350ad5c53b8409463c24693821d78a1940f18c221249ae7b864ad9db5cf01ab41d6ec5bbefd96115f0e91809ecdc61451d71881b56b07920c442f4a514936'
|
|
'feccd981fc3a76da3322e6ccc6958cd92b37d01bec0beedb340e0a7daafbd996452da534b203bc9781fe780e7282a897d06d38ce5ad2135c522b9a313e9a5e57'
|
|
'6f33d57f242fa8ce04b65e06a712bd54677306a45b22cb853fbe348089cd4673bd4ed91073074fe067166fe8951c370f8bbbc386783e3ed5170d52e9062666fe'
|
|
'173b865f039c1b96b7dea9868acecfe62aeedf6721c7bf0bc8d56327e6f7c2be2efd78a91bb089d67b2e9f55dd78d6691be130de9010bb9c01cef856be5166a5'
|
|
'f653872e6051f6cf870470f6da63eae33a65b853ce50e9ac0af0f5fb732641dcb47a0c05b51b8709861bc43ce54b31162ceb2ca171f56af8199104d24adaa0ea'
|
|
'0d14f620179e41936fc8ac004f80851eb52943644d0173a2da124b4e435a98342693f357323b3677ae3c88bff4b118bf4a75ba44990389fb283f63a507fb5d1d')
|
|
|
|
prepare() {
|
|
# gimp 2.10.22 requires gegl 0.4.26 and it's broken with gegl 0.4.30
|
|
# gimp will update to 2.10.24 to use gegl 0.4.30
|
|
# gegl 0.4.30 is needed by gimp-devel 2.99.6
|
|
cd $srcdir/$_realpkgname-$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 .
|
|
|
|
quilt push -av
|
|
fi
|
|
|
|
# removing the button on dialog for update-check
|
|
# possible enhancement to include that in the configure-routine
|
|
patch -Np1 -i ${srcdir}/remove-update-check.patch
|
|
|
|
# fix check gettext-tiny in configure.ac
|
|
sed -i '\|XGETTEXT_APPLIED_VERSION| s| -f4| -f5|' configure.ac
|
|
|
|
# remove devel-docs: this part of source code requires gtk-doc to build
|
|
# or will fail the configuration, due needs macro variables like:
|
|
# HAVE_GTK_DOC, GTK_DOC_USE_LIBTOOL, GTK_DOC_BUILD_HTML and GTK_DOC_BUILD_PDF
|
|
sed -i '\|devel-docs|d' Makefile.am configure.ac
|
|
|
|
# replace python to tauthon in m4macros/pythondev.m4
|
|
sed -i 's|am_display_PYTHON=python|am_display_PYTHON=tauthon|;
|
|
s|/include/python|/include/tauthon|' m4macros/pythondev.m4
|
|
|
|
# remove problematic plugins
|
|
rm -rf ./plug-ins/file-{dds,faxg3,ico,psd}
|
|
patch -Np1 -i ${srcdir}/remove-plugins.patch
|
|
|
|
# fix CVE-2025-2761
|
|
patch -Np1 -i ${srcdir}/CVE-2025-2761.patch
|
|
|
|
autoreconf -vfi
|
|
}
|
|
|
|
build() {
|
|
cd $_realpkgname-$pkgver
|
|
PYTHON=/usr/bin/tauthon ./configure \
|
|
--prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--enable-relocatable-bundle \
|
|
--disable-check-update \
|
|
--with-${_realpkgname}dir=$_realpkgname \
|
|
--with-bug-report-url=https://issues.hyperbola.info \
|
|
--without-libheif \
|
|
--without-webp \
|
|
--without-gudev \
|
|
--without-webkit \
|
|
--without-wmf \
|
|
--without-openexr \
|
|
--without-appdata-test
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd $_realpkgname-$pkgver
|
|
make DESTDIR=$pkgdir install
|
|
|
|
install -Dm644 LICENSE -t $pkgdir/usr/share/licenses/$pkgname
|
|
install -Dm644 COPYING -t $pkgdir/usr/share/licenses/$pkgname/$_realpkgname
|
|
install -Dm644 lib$_realpkgname/COPYING -t $pkgdir/usr/share/licenses/$pkgname/lib$_realpkgname
|
|
install -Dm644 COPYING -t $pkgdir/usr/share/licenses/$pkgname/$_realpkgname/plug-ins
|
|
|
|
sed -i 's|#!/usr/bin/env python2|#!/usr/bin/env tauthon|' $pkgdir/usr/lib/$_realpkgname/$_basever/plug-ins/*/*.py
|
|
|
|
install -Dm644 $srcdir/linux_kernel.gpl $pkgdir/usr/share/$_realpkgname/$_basever/palettes
|
|
|
|
ln -s $_realpkgname-test-clipboard-$_basever $pkgdir/usr/bin/$_realpkgname-test-clipboard
|
|
ln -s ${_realpkgname}tool-$_basever $pkgdir/usr/bin/${_realpkgname}tool
|
|
ln -s ${_realpkgname}tool-$_basever.1.gz $pkgdir/usr/share/man/man1/${_realpkgname}tool.1.gz
|
|
}
|