diff --git a/dev-libs/libxml2/libxml2-2.14.5.recipe b/dev-libs/libxml2/libxml2-2.14.5.recipe index 7c529b7d8..016e865b5 100644 --- a/dev-libs/libxml2/libxml2-2.14.5.recipe +++ b/dev-libs/libxml2/libxml2-2.14.5.recipe @@ -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