void-packages/srcpkgs/wxPython4/template
Đoàn Trần Công Danh 04b9978a29 srcpkgs/w*: convert patches to -Np1
* wine 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

42 lines
1.4 KiB
Bash

# Template file for 'wxPython4'
pkgname=wxPython4
version=4.0.7
revision=3
wrksrc="wxPython-${version}"
build_style=python3-module
make_build_args="--skip-build"
make_install_args="--skip-build"
hostmakedepends="pkg-config python3-setuptools python3-pathlib2"
makedepends="python3-devel wxWidgets-gtk3-devel SDL2-devel webkit2gtk-devel
gst-plugins-base1-devel"
depends="python3 python3-six python3-numpy python3-Pillow"
short_desc="WxWidgets GUI toolkit library (Python3 Bindings)"
maintainer="Jasper Chan <jasperchan515@gmail.com>"
license="custom:wxWindows"
homepage="http://www.wxpython.org/"
distfiles="${PYPI_SITE}/w/wxPython/wxPython-${version}.tar.gz"
checksum=3be608bfdede3063678cc703453850ab0a018b82bafd5ee057302250b18f0233
if [ "$CROSS_BUILD" ]; then
CFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include"
fi
pre_build() {
chmod -R go+rX $wrksrc
if [ "$CROSS_BUILD" ]; then
PYPREFIX="$XBPS_CROSS_BASE"
LDFLAGS+=" -L${XBPS_CROSS_BASE}/${py3_lib} -L${XBPS_CROSS_BASE}/usr/lib"
CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS"
LDSHARED="${CC} -shared $LDFLAGS"
env CC="$CC" LDSHARED="$LDSHARED" \
PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \
PYTHON_CONFIG="${XBPS_CROSS_BASE}/usr/bin/python3-config" \
LDFLAGS="$LDFLAGS" python3 build.py build_py --use_syswx
else
python3 build.py build_py --use_syswx
fi
}
post_install() {
vlicense LICENSE.txt
}