diff --git a/dev-python/pycurl/pycurl-7.43.0.2.recipe b/dev-python/pycurl/pycurl-7.43.0.2.recipe index 8d53912de..ec4f2e05f 100644 --- a/dev-python/pycurl/pycurl-7.43.0.2.recipe +++ b/dev-python/pycurl/pycurl-7.43.0.2.recipe @@ -10,7 +10,7 @@ COPYRIGHT="2001-2008 by Kjetil Jacobsen 2013-2018 by Oleg Pudeyev" LICENSE="GNU LGPL v2.1 MIT" -REVISION="1" +REVISION="2" SOURCE_URI="https://dl.bintray.com/pycurl/pycurl/pycurl-$portVersion.tar.gz" CHECKSUM_SHA256="0f0cdfc7a92d4f2a5c44226162434e34f7d6967d3af416a6f1448649c09a25a4" @@ -48,20 +48,26 @@ BUILD_PREREQUIRES=" cmd:make " -PYTHON_PACKAGES=(python python3) -PYTHON_VERSIONS=(2.7 3.6) +PYTHON_PACKAGES=() +PYTHON_LIBSUFFIXES=() +PYTHON_VERSIONS=() # We don't have python2 for secondaryArch, -# and gcc2 doesn't support the flags passed by python3 -if [ -n "$secondaryArchSuffix" ]; then - unset PYTHON_PACKAGES[0] - unset PYTHON_VERSIONS[0] -elif [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then - unset PYTHON_PACKAGES[1] - unset PYTHON_VERSIONS[1] +if [ -z "$secondaryArchSuffix" ]; then + PYTHON_PACKAGES+=(python) + PYTHON_LIBSUFFIXES+=("") +fi +# gcc2 does not support the flags passed by python3 +if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then + PYTHON_PACKAGES+=(python3) + PYTHON_LIBSUFFIXES+=(m) fi for i in "${!PYTHON_PACKAGES[@]}"; do pythonPackage=${PYTHON_PACKAGES[i]} - pythonVersion=${PYTHON_VERSIONS[$i]} + pythonLibSuffix=${PYTHON_LIBSUFFIXES[$i]} + pythonVersion="`$pythonPackage --version 2>&1 | sed \ + -e "s/Python \([[:digit:]]*\.[[:digit:]]*\)\..*/\1/"`" + PYTHON_VERSIONS+=($pythonVersion) + eval "\ PROVIDES_${pythonPackage}=\"\n\ ${portName}_$pythonPackage = $portVersion\n\ @@ -72,6 +78,7 @@ for i in "${!PYTHON_PACKAGES[@]}"; do lib:libcrypto$secondaryArchSuffix\n\ lib:libcurl$secondaryArchSuffix\n\ lib:libnghttp2$secondaryArchSuffix\n\ + lib:libpython$pythonVersion$pythonLibSuffix$secondaryArchSuffix\n\ lib:libssl$secondaryArchSuffix\n\ lib:libz$secondaryArchSuffix\n\ \"\ @@ -79,29 +86,13 @@ for i in "${!PYTHON_PACKAGES[@]}"; do BUILD_REQUIRES="$BUILD_REQUIRES setuptools_$pythonPackage + devel:libpython$pythonVersion$pythonLibSuffix$secondaryArchSuffix " BUILD_PREREQUIRES="$BUILD_PREREQUIRES cmd:python$pythonVersion " done -if [ -z "$secondaryArchSuffix" ]; then - REQUIRES_python+=" - lib:libpython${PYTHON_VERSIONS[0]} - " - BUILD_PREREQUIRES+=" - devel:libpython${PYTHON_VERSIONS[0]} - " -fi -if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then - REQUIRES_python3+=" - lib:libpython${PYTHON_VERSIONS[1]}m$secondaryArchSuffix - " - BUILD_PREREQUIRES+=" - devel:libpython${PYTHON_VERSIONS[1]}m$secondaryArchSuffix - " -fi - INSTALL() { for i in "${!PYTHON_PACKAGES[@]}"; do