libxml2-2.14.5: fixup variables and package names related to python.

The recipe is still disabled, but this change makes it more similar
to what the current 2.12.10 already does.
This commit is contained in:
Oscar Lesta
2025-12-28 23:36:16 -03:00
parent 5a323b1e66
commit eb3e569b70

View File

@@ -37,6 +37,9 @@ else
fi
fi
pythonVersion=3.10
pythonPackage=python${pythonVersion//.}
PROVIDES="
libxml2$secondaryArchSuffix = $portVersion compat >= 2
lib:libxml2$secondaryArchSuffix = $libVersionCompat
@@ -63,26 +66,31 @@ REQUIRES_devel="
devel:libiconv$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
CONFLICTS_devel="
libxml2${secondaryArchSuffix}_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="
@@ -92,7 +100,7 @@ BUILD_REQUIRES="
"
if $pythonModuleEnabled; then
BUILD_REQUIRES="$BUILD_REQUIRES
cmd:python3
cmd:python$pythonVersion
"
fi
BUILD_PREREQUIRES="
@@ -122,7 +130,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
@@ -163,7 +171,7 @@ INSTALL()
# python package
if $pythonModuleEnabled; then
packageEntries python \
packageEntries $pythonPackage \
$prefix/lib/python*
fi