void-packages/srcpkgs/pygtk/template
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```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

53 lines
1.4 KiB
Bash

# Template file for 'pygtk'
pkgname=pygtk
version=2.24.0
revision=14
build_style=gnu-configure
configure_args="PYTHON=python2"
# This is required to avoid compiling all of gtk-2.0
# Ignore xlint on this one
pycompile_module="gtk-2.0/gtk"
hostmakedepends="pkg-config python-gobject2-devel python-numpy"
makedepends="python-devel gtk+-devel libxml2-devel libglade-devel
python-gobject2-devel"
depends="python python-cairo python-gobject2"
checkdepends="xvfb-run nemo"
short_desc="Python bindings for the GTK+ toolkit"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="http://www.pygtk.org"
distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.bz2"
checksum=cd1c1ea265bd63ff669e92a2d3c2a88eb26bcd9e5363e0f82c896e649f206912
lib32disabled=yes
python_version=2
pre_configure() {
if [ "$CROSS_BUILD" ]; then
sed -i "s,\(PYTHON_INCLUDES\)=.*,\1=-I${XBPS_CROSS_BASE}/usr/include/python2.7,g" configure
fi
}
do_check() {
export HOME="$(mktemp -d)"
mkdir -p "$HOME/.local/share"
xvfb-run make check
rm -r "$HOME"
}
post_install() {
vinstall gtk/gtk-extrafuncs.defs 644 usr/share/pygtk/2.0/defs
}
pygtk-devel_package() {
lib32disabled=yes
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pycompile_dirs="usr/lib/pygtk"
pkg_install() {
vmove usr/include
vmove usr/share
vmove usr/bin
vmove usr/lib/pkgconfig
vmove usr/lib/pygtk
}
}