void-packages/srcpkgs/gimp/template
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

66 lines
2.1 KiB
Bash

# Template file for 'gimp'
pkgname=gimp
version=2.10.24
revision=1
build_style=gnu-configure
configure_args="--disable-check-update --datadir=/usr/share"
hostmakedepends="automake gegl gettext-devel glib-devel gtk+-devel intltool
libtool pkg-config pygtk-devel 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 pygtk-devel glib-networking libwebp-devel
libheif-devel libopenjpeg2-devel x265-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"
distfiles="https://download.gimp.org/pub/gimp/v${version%.*}/gimp-${version}.tar.bz2"
checksum=bd1bb762368c0dd3175cf05006812dd676949c3707e21f4e6857435cb435989e
python_version=2
lib32disabled=yes
no_generic_pkgconfig_link=yes
pre_configure() {
NOCONFIGURE=1 autoreconf -fi
if [ "$CROSS_BUILD" ]; then
vsed -i 's:^py_prefix=`:py_prefix='"$XBPS_CROSS_BASE"'`:' configure
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"
}
}
gimp-python_package() {
lib32disabled=yes
depends="pygtk"
pycompile_dirs="usr/lib/gimp/2.0"
short_desc+=" - Python2 bindings"
pkg_install() {
vmove usr/lib/gimp/2.0/python
for file in $(find ${DESTDIR}/usr/lib/gimp/2.0/plug-ins -name *.py); do
vmove ${file/$DESTDIR/}
done
}
}