Files
haikuports/dev-python/dbuspython/dbuspython-1.3.2.recipe
OscarL 810866934f dbuspython: update to version 1.3.2, support Python 3.10. (#9431)
Only user of this package, Calibre, dropped this dependency in
favor of the "pure-Python" `jeepney` package on newer versions.

For now, this will do.
2023-09-16 07:36:04 +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="1"
SOURCE_URI="https://dbus.freedesktop.org/releases/dbus-python/dbus-python-$portVersion.tar.gz"
CHECKSUM_SHA256="ad67819308618b5069537be237f8e68ca1c7fcc95ee4a121fe6845b1418248f8"
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=(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
\""
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
}