void-packages/srcpkgs/wxPython4/template

45 lines
1.4 KiB
Bash

# Template file for 'wxPython4'
pkgname=wxPython4
version=4.0.6
revision=3
wrksrc="wxPython-${version}"
build_style=python3-module
pycompile_module="wx"
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"
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=35cc8ae9dd5246e2c9861bb796026bbcb9fb083e4d49650f776622171ecdab37
if [ "$CROSS_BUILD" ]; then
CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/python${py3_ver}"
fi
pre_build() {
chmod -R go+rX $wrksrc
if [ "$CROSS_BUILD" ]; then
PYPREFIX="$XBPS_CROSS_BASE"
CFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include"
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}/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
}