libxml2: fix name of the python bindings package.

(to explicitly tell which Python version it targets).

While at it, make use of dot in the python package name.

Related to #12949.
This commit is contained in:
Oscar Lesta
2025-10-05 13:21:12 -03:00
committed by OscarL
parent 0f64b69d95
commit 0d9bf5dbff

View File

@@ -10,7 +10,7 @@ available in other environments."
HOMEPAGE="http://www.xmlsoft.org/"
COPYRIGHT="1998-2012 Daniel Veillard. All Rights Reserved."
LICENSE="MIT"
REVISION="1"
REVISION="2"
SOURCE_URI="https://download.gnome.org/sources/libxml2/2.12/libxml2-$portVersion.tar.xz"
CHECKSUM_SHA256="c3d8c0c34aa39098f66576fe51969db12a5100b956233dc56506f7a8679be995"
SOURCE_URI_2="https://www.w3.org/XML/Test/xmlts20130923.tar.gz"
@@ -31,6 +31,9 @@ else
fi
fi
pythonVersion=3.10
pythonPackage=python${pythonVersion//.}
PROVIDES="
libxml2$secondaryArchSuffix = $portVersion compat >= 2
lib:libxml2$secondaryArchSuffix = $portVersion compat >= 2
@@ -59,21 +62,29 @@ REQUIRES_devel="
"
if $pythonModuleEnabled; then
SUMMARY_python="The python module for libxml2"
PROVIDES_python="
libxml2${secondaryArchSuffix}_python = $portVersion
"
# Allows using dot in sub-package names (eg: "_python3.10" vs "_python310"):
eval "PACKAGE_NAME_$pythonPackage=\"${portName}_python$pythonVersion\""
eval "SUMMARY_$pythonPackage=\"The python module for libxml2\""
eval "PROVIDES_$pythonPackage=\"
${portName}_python$pythonVersion = $portVersion
\""
if [ -n "$secondaryArchSuffix" ]; then
PROVIDES_python+="
libxml2_python = $portVersion
"
eval "PROVIDES_${pythonPackage}+=\"
${portBaseName}_python$pythonVersion= $portVersion
\""
fi
REQUIRES_python="
eval "REQUIRES_$pythonPackage=\"
libxml2$secondaryArchSuffix == $portVersion base
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
cmd:python3
"
cmd:python$pythonVersion
\""
eval "REPLACES_$pythonPackage=\"${portName}_python\""
fi
BUILD_REQUIRES="
@@ -83,7 +94,7 @@ BUILD_REQUIRES="
"
if $pythonModuleEnabled; then
BUILD_REQUIRES="$BUILD_REQUIRES
cmd:python3
cmd:python$pythonVersion
"
fi
BUILD_PREREQUIRES="
@@ -113,7 +124,7 @@ BUILD()
# We symlink python's directories into our packaging directory and tell
# configure that it can find python there. This way the correct
# installation directory for the python module is determined.
pythonDir="$portPackageLinksDir/cmd~python3.10"
pythonDir="$portPackageLinksDir/cmd~python$pythonVersion"
ln -s $pythonDir/bin $pythonDir/develop $pythonDir/lib $prefix
withPython="--with-python=$prefix"
else
@@ -151,7 +162,7 @@ INSTALL()
# python package
if $pythonModuleEnabled; then
packageEntries python \
packageEntries $pythonPackage \
$prefix/lib/python*
fi