mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-20 18:50:08 +02:00
For some unknown reason the previous definition was not working on the build servers, although it was on my system.
123 lines
3.3 KiB
Bash
123 lines
3.3 KiB
Bash
SUMMARY="A Python interface to the cURL library"
|
|
DESCRIPTION="PycURL is a Python interface to libcurl, the multiprotocol file \
|
|
transfer library. Similarly to the urllib Python module, PycURL can be used to \
|
|
fetch objects identified by a URL from a Python program. Beyond simple fetches \
|
|
however PycURL exposes most of the functionality of libcurl."
|
|
HOMEPAGE="http://pycurl.io/
|
|
https://github.com/pycurl/pycurl"
|
|
COPYRIGHT="2001-2008 by Kjetil Jacobsen
|
|
2001-2008 by Markus F.X.J. Oberhumer
|
|
2013-2018 by Oleg Pudeyev"
|
|
LICENSE="GNU LGPL v2.1
|
|
MIT"
|
|
REVISION="2"
|
|
SOURCE_URI="https://dl.bintray.com/pycurl/pycurl/pycurl-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="0f0cdfc7a92d4f2a5c44226162434e34f7d6967d3af416a6f1448649c09a25a4"
|
|
|
|
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
pycurl$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
if [ -z "$secondaryArchSuffix" ]; then
|
|
ARCHITECTURES_doc="any"
|
|
SUMMARY_doc="A Python interface to the cURL library (documentation)"
|
|
PROVIDES_doc="
|
|
pycurl_doc = $portVersion
|
|
"
|
|
REQUIRES_doc="
|
|
haiku
|
|
"
|
|
fi
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libcrypto$secondaryArchSuffix
|
|
devel:libcurl$secondaryArchSuffix
|
|
devel:libnghttp2$secondaryArchSuffix
|
|
devel:libssl$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:make
|
|
"
|
|
|
|
PYTHON_PACKAGES=()
|
|
PYTHON_LIBSUFFIXES=()
|
|
PYTHON_VERSIONS=()
|
|
# We don't have python2 for secondaryArch,
|
|
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]}
|
|
pythonLibSuffix=${PYTHON_LIBSUFFIXES[$i]}
|
|
pythonVersion=`eval "$pythonPackage --version 2>&1" | sed -n \
|
|
-e "1s/Python \([0-9]*\.[0-9]*\)\..*/\1/p"`
|
|
PYTHON_VERSIONS+=($pythonVersion)
|
|
|
|
eval "PROVIDES_${pythonPackage}=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku$secondaryArchSuffix
|
|
cmd:python$pythonVersion
|
|
lib:libcrypto$secondaryArchSuffix
|
|
lib:libcurl$secondaryArchSuffix
|
|
lib:libnghttp2$secondaryArchSuffix
|
|
lib:libpython$pythonVersion$pythonLibSuffix$secondaryArchSuffix
|
|
lib:libssl$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
\""
|
|
|
|
BUILD_REQUIRES+="
|
|
setuptools_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
devel:libpython$pythonVersion$pythonLibSuffix$secondaryArchSuffix
|
|
"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
pythonPackage=${PYTHON_PACKAGES[i]}
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
|
|
python=python$pythonVersion
|
|
installLocation="$prefix"/lib/$python/vendor-packages/
|
|
export PYTHONPATH="$installLocation"
|
|
rm -rf build
|
|
mkdir -p "$installLocation"
|
|
$python setup.py build install --root=/ --prefix="$prefix"
|
|
|
|
packageEntries $pythonPackage \
|
|
"$prefix"/lib/$python
|
|
done
|
|
|
|
if [ -z "$secondaryArchSuffix" ]; then
|
|
mkdir -p "$docDir"
|
|
mv "$prefix"/share/doc/pycurl/* "$docDir"
|
|
rmdir "$prefix"/share/doc/pycurl
|
|
packageEntries doc \
|
|
"$docDir"
|
|
rmdir "$prefix"/documentation/packages "$prefix"/documentation
|
|
else
|
|
rm -rf "$prefix"/share/doc/pycurl
|
|
fi
|
|
rmdir "$prefix"/share/doc "$prefix"/share
|
|
}
|