diff --git a/dev-libs/libxml2/libxml2-2.12.10.recipe b/dev-libs/libxml2/libxml2-2.12.10.recipe index 8e5bbfd4e..f299a331f 100644 --- a/dev-libs/libxml2/libxml2-2.12.10.recipe +++ b/dev-libs/libxml2/libxml2-2.12.10.recipe @@ -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