diff --git a/dev-python/pygobject/pygobject-3.44.1.recipe b/dev-python/pygobject/pygobject-3.44.1.recipe new file mode 100644 index 000000000..d586f9eb5 --- /dev/null +++ b/dev-python/pygobject/pygobject-3.44.1.recipe @@ -0,0 +1,82 @@ +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="2014 Developer name + 2016 Another developer's name" +LICENSE="GNU LGPL v2" +REVISION="1" +SOURCE_URI="https://download.gnome.org/sources/pygobject/3.44/pygobject-$portVersion.tar.xz" +CHECKSUM_SHA256="3c6805d1321be90cc32e648215a562430e0d3d6edcda8f4c5e7a9daffcad5710" + +ARCHITECTURES="any" + +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_PACKAGES=(python39 python310) +PYTHON_VERSIONS=(3.9 3.10) +for i in "${!PYTHON_PACKAGES[@]}"; do + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + + eval "PROVIDES_$pythonPackage=\" + ${portName}_$pythonPackage = $portVersion + \"" + 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 i in "${!PYTHON_PACKAGES[@]}"; do + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + + 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=$libDir \ + --localedir=$dataDir/locale \ + -Dpython=$python \ + -Dpycairo=disabled \ + -Dtests=false + ninja -C build install + + fixPkgconfig + + packageEntries $pythonPackage \ + $developDir \ + $libDir + done +}