mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 13:20:08 +02:00
89 lines
2.2 KiB
Bash
89 lines
2.2 KiB
Bash
SUMMARY="Python bindings for GLib/GObject/GIO/GTK"
|
|
DESCRIPTION="PyGObject is a Python package which provides bindings for GObject based libraries \
|
|
such as GTK, GStreamer, WebKitGTK, GLib, GIO and many more."
|
|
HOMEPAGE="https://wiki.gnome.org/Projects/PyGObject"
|
|
COPYRIGHT="2023 Christoph Reiter"
|
|
LICENSE="GNU LGPL v2"
|
|
REVISION="4"
|
|
SOURCE_URI="https://download.gnome.org/sources/pygobject/3.44/pygobject-$portVersion.tar.xz"
|
|
CHECKSUM_SHA256="3c6805d1321be90cc32e648215a562430e0d3d6edcda8f4c5e7a9daffcad5710"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libcairo$secondaryArchSuffix
|
|
devel:libgirepository_1.0$secondaryArchSuffix
|
|
devel:libglib_2.0$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:meson
|
|
cmd:ninja
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
PYTHON_VERSIONS=(3.10)
|
|
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
eval "PROVIDES_$pythonPackage=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
# Also provide "non _x86" package on x86 32 bits
|
|
if [ "$targetArchitecture" = "x86_gcc2" ]; then
|
|
eval "PROVIDES_${pythonPackage}+=\"
|
|
pygobject_$pythonPackage = $portVersion
|
|
\""
|
|
fi
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku$secondaryArchSuffix
|
|
cmd:python$pythonVersion
|
|
lib:libcairo$secondaryArchSuffix
|
|
lib:libcairo_gobject$secondaryArchSuffix
|
|
lib:libcairo_script_interpreter$secondaryArchSuffix
|
|
\""
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
python=python$pythonVersion
|
|
installLocation=$prefix/lib/$python/vendor-packages/
|
|
export PYTHONPATH=$installLocation:$PYTHONPATH
|
|
|
|
mkdir -p $installLocation
|
|
rm -rf build
|
|
|
|
meson build --buildtype=release \
|
|
--prefix=$prefix \
|
|
--includedir=$includeDir \
|
|
--libdir=$prefix/lib \
|
|
--localedir=$dataDir/locale \
|
|
-Dpython=$python \
|
|
-Dpycairo=disabled \
|
|
-Dtests=false
|
|
ninja -C build install
|
|
|
|
fixPkgconfig
|
|
|
|
packageEntries $pythonPackage \
|
|
$developDir \
|
|
$prefix/lib
|
|
done
|
|
}
|