void-packages/srcpkgs/python3-pyside2/template

109 lines
3.0 KiB
Bash

# Template file for 'python3-pyside2'
# XXX CAUTION patched to support Qt 5.13.2 and *NOT* Qt 5.14
# warning: python3-pyside2 is supposed to be aligned with Qt version
pkgname=python3-pyside2
version=5.14.0
revision=2
_pkgname="pyside-setup-opensource-src-${version}"
wrksrc="$_pkgname"
configure_args="-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
-DBUILD_TESTS=OFF -DPYTHON_EXECUTABLE=/usr/bin/python"
hostmakedepends="cmake"
makedepends="python3-devel libshiboken2-devel qt5-devel
qt5-multimedia-devel qt5-tools-devel qt5-plugin-mysql qt5-plugin-odbc
qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds qt5-x11extras-devel
qt5-xmlpatterns-devel qt5-location-devel qt5-declarative-devel qt5-scxml-devel
qt5-script-devel qt5-sensors-devel qt5-speech-devel qt5-charts-devel
qt5-svg-devel qt5-datavis3d-devel qt5-webchannel-devel qt5-websockets-devel
qt5-3d-devel qt5-gamepad-devel qt5-remoteobjects-devel"
depends="python3-shiboken2"
short_desc="Python3 bindings for the Qt5 toolkit"
maintainer="yopito <pierre.bourgin@free.fr>"
license="LGPL-3.0-or-later"
homepage="https://wiki.qt.io/Qt_for_Python"
distfiles="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${version}-src/${_pkgname}.tar.xz"
checksum=8c2ad1901a99165ed7bac8f522ee351ae3ebadd580024248f5a1db52e4a94b30
build_options="webengine"
desc_option_webengine="Build Qt5 WebEngine bindings"
if [ "$XBPS_TARGET_ENDIAN" = "le" ]; then
build_options_default="webengine"
fi
if [ "$build_option_webengine" ]; then
makedepends+=" qt5-webengine-devel"
fi
subpackages="libpyside2-python3-devel libpyside2-python3 libpyside-python3
python3-pyside python3-pyside-phonon python3-pyenet"
if [ "$build_option_webengine" ]; then
subpackages+=" python3-pyside2-webengine"
fi
do_build() {
[ ! -d build ] && mkdir build
pushd build
export CLANG_INSTALL_DIR=/usr
cmake ../sources/pyside2 ${configure_args}
make ${makejobs}
popd
}
do_install() {
make -C build DESTDIR=${DESTDIR} install
}
python3-pyside2-webengine_package() {
depends="python3-pyside2-${version}_${revision}"
short_desc+=" - WebEngine component"
pkg_install() {
vmove "${py3_sitelib}/PySide2/QtWebEngine*"
}
}
libpyside2-python3-devel_package() {
depends="${sourcepkg}-${version}_${revision}
libpyside2-python3-${version}_${revision}"
short_desc+=" - shared library (development files)"
pkg_install() {
vmove usr/include
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove usr/share
}
}
libpyside2-python3_package() {
short_desc+=" - shared library"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
libpyside-python3_package() {
short_desc+=" - transitional dummy package"
build_style=meta
archs=noarch
}
python3-pyside_package() {
short_desc+=" - transitional dummy package"
build_style=meta
archs=noarch
}
python3-pyside-phonon_package() {
short_desc+=" - transitional dummy package"
build_style=meta
archs=noarch
}
python3-pyenet_package() {
short_desc+=" - transitional dummy package"
build_style=meta
archs=noarch
}