void-packages/srcpkgs/python3-pyside2/template
yopito 73916f1c49
New package: python3-pyside2 5.11.2
Co-authored-by: maxice8 <thinkabit.ukim@gmail.com>
2019-04-16 12:01:31 -03:00

60 lines
1.9 KiB
Bash

# Template file for 'python3-pyside2'
pkgname=python3-pyside2
version=5.11.2
revision=1
_pkgname="pyside-setup-everywhere-src-${version}"
wrksrc="$_pkgname"
configure_args="-DUSE_PYTHON_VERSION=3 -DCMAKE_INSTALL_PREFIX=/usr
-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF"
pycompile_module="PySide2"
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-webengine-devel
qt5-websockets-devel qt5-3d-devel qt5-gamepad-devel"
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=18f572f1f832e476083d30fccabab167450f2a8cbe5cd9c6e6e4fa078ccb86c2
pre_build() {
# Fix inconsistent naming of .so and .cmake files
sed -i "/get_python_extension_suffix()/d" sources/pyside2/CMakeLists.txt
}
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
}
libpyside2-python3-devel_package() {
depends="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.*"
}
}