Files
haikuports/dev-python/dbuspython/dbuspython-1.2.14.recipe
OscarL 41be08383e dbuspython: recipe clean up. (#8809)
* Provide "non _x86" package name.
* Remove unneded \n scaping.
2023-06-07 11:01:49 +02:00

116 lines
2.7 KiB
Bash

SUMMARY="The original dbus implementation for Python"
DESCRIPTION="dbus-python is the original Python binding \
for dbus, the reference implementation of the D-Bus protocol."
HOMEPAGE="https://www.freedesktop.org/wiki/Software/DBusBindings/"
COPYRIGHT="2002-2010 Red Hat Inc.
2003 David Zeuthen
2002-2003 CodeFactory AB
2003 James Willcox
2004 Rob Taylor
2004 Anders Carlsson
2005 Colin Walters
2006 Steve Frécinaux
2009-2011 Nokia Corporation
2010-2012 Mike Gorse
2016 Simon McVittie
2005-2019 Collabora Ltd."
LICENSE="MIT
AFL v2.1
GNU GPL v2"
REVISION="4"
SOURCE_URI="https://dbus.freedesktop.org/releases/dbus-python/dbus-python-$portVersion.tar.gz"
CHECKSUM_SHA256="b10206ba3dd641e4e46411ab91471c88e0eec1749860e4285193ee68df84ac31"
SOURCE_DIR="dbus-python-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
dbuspython$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libdbus_1$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoreconf
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
PYTHON_PACKAGES=(python38 python39)
PYTHON_VERSIONS=(3.8 3.9)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"
${portName}_$pythonPackage = $portVersion
\""
if [ "$targetArchitecture" = x86_gcc2 ]; then
eval "PROVIDES_$pythonPackage+=\"
dbuspython_$pythonPackage = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku$secondaryArchSuffix
${portName} == $portVersion base
lib:libdbus_1$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
cmd:python$pythonVersion
\""
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
BUILD()
{
autoreconf -vfi
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
cd "$sourceDir"
mkdir build-$pythonPackage
cd ./build-$pythonPackage
runConfigure ../configure PYTHON_VERSION=$pythonVersion
make "$jobArgs"
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
make -C build-$pythonPackage install \
pythondir=$installLocation \
pyexecdir=$installLocation
rm $installLocation/*.la
packageEntries $pythonPackage \
$prefix/lib/python*
done
fixPkgconfig
}