mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 13:20:08 +02:00
While this module could be "any" in theory, doing so means the "x86_gcc2" version of "pkg-config" gets called (that causes problems when packages that use this module to build stuff, get the wrong info on 32 bits, no sane python package would be asking for, or expecting, GCC2 stuff). Cleaned up a bit the recipe while at it, and droped 3.9, as the only user on-tree of this module is Python 3.10 only already (borgbackup).
78 lines
2.0 KiB
Bash
78 lines
2.0 KiB
Bash
SUMMARY="A Python module to interface with the pkg-config"
|
|
DESCRIPTION="pkgconfig is a Python module to interface with the pkg-config command line tool for \
|
|
Python 3.3+."
|
|
HOMEPAGE="https://pypi.org/project/pkgconfig/"
|
|
COPYRIGHT="201-2021 Mathias Vogelgesang"
|
|
LICENSE="MIT"
|
|
REVISION="4"
|
|
SOURCE_URI="https://files.pythonhosted.org/packages/source/p/pkgconfig/pkgconfig-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="deb4163ef11f75b520d822d9505c1f462761b4309b1bb713d08689759ea8b899"
|
|
SOURCE_DIR="pkgconfig-$portVersion"
|
|
|
|
# Ideally, this should be "any", but we really want "pkg-config-x86" here, not the gcc2 version.
|
|
# Python modules using this one have no concept of Haiku's x86_gcc2 vs x86, and we can pretty
|
|
# much assume they only care for the non-gcc2 version of libs.
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
|
|
PYTHON_VERSIONS=(3.10)
|
|
|
|
for i in "${!PYTHON_VERSIONS[@]}"; do
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
eval "PROVIDES_${pythonPackage}=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
eval "PROVIDES_$pythonPackage+=\"
|
|
python_pkgconfig_$pythonPackage = $portVersion
|
|
\""
|
|
fi
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
$REQUIRES
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:python$pythonVersion
|
|
\""
|
|
|
|
BUILD_REQUIRES+="
|
|
setuptools_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
for i in "${!PYTHON_VERSIONS[@]}"; do
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
python=python$pythonVersion
|
|
|
|
installLocation=$prefix/lib/$python/vendor-packages/
|
|
export PYTHONPATH=$installLocation:$PYTHONPATH
|
|
mkdir -p $installLocation
|
|
|
|
rm -rf build
|
|
|
|
$python setup.py build install \
|
|
--root=/ --prefix=$prefix
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|