apsw: cleanups, drop python 3.9.

Put the libsqlite require where it belongs (on each individual
`apsw_python*` package).
This commit is contained in:
Oscar Lesta
2025-07-15 15:03:38 -03:00
committed by OscarL
parent 8f5a6c83d7
commit 5378b7522a

View File

@@ -7,7 +7,7 @@ HOMEPAGE="https://github.com/rogerbinns/apsw/
https://pypi.org/project/apsw/"
COPYRIGHT="2004-2021 Roger Binns"
LICENSE="OSI"
REVISION="3"
REVISION="4"
SOURCE_URI="https://github.com/rogerbinns/apsw/archive/3.36.0-r1.tar.gz"
CHECKSUM_SHA256="133ee2291851e0144661eba25517c7feb026c6d5896df90ef7ea0feddf03a842"
SOURCE_DIR="apsw-3.36.0-r1"
@@ -19,8 +19,7 @@ PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
lib:libsqlite3$secondaryArchSuffix
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
@@ -28,46 +27,54 @@ BUILD_REQUIRES="
sqlite${secondaryArchSuffix}_devel >= 3.36
"
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\
\"; \
REQUIRES_$pythonPackage=\"\
haiku$secondaryArchSuffix\n\
cmd:python$pythonVersion\
\""
if [ "$targetArchitecture" = "x86_gcc2" ]; then
eval "PROVIDES_${pythonPackage}+=\"\n\
apsw_$pythonPackage = $portVersion\
PYTHON_VERSIONS=(3.10)
defaultVersion=3.10
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
fi
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage
devel:libsqlite3$secondaryArchSuffix"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion
cmd:gcc$secondaryArchSuffix"
if [ "$targetArchitecture" = x86_gcc2 ]; then
eval "PROVIDES_$pythonPackage+=\"
apsw_$pythonPackage = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku$secondaryArchSuffix
lib:libsqlite3$secondaryArchSuffix
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
setuptools_$pythonPackage
devel:libsqlite3$secondaryArchSuffix
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
cmd:gcc$secondaryArchSuffix
"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
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
$python setup.py build_ext --enable=load_extension install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
packageEntries $pythonPackage \
$prefix/lib/python*
done
}