mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-12 14:50:08 +02:00
126 lines
3.2 KiB
Bash
126 lines
3.2 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 Kjetil Jacobsen
|
|
2001-2008 Markus F.X.J. Oberhumer
|
|
2013-2018 Oleg Pudeyev"
|
|
LICENSE="GNU LGPL v2.1
|
|
MIT"
|
|
REVISION="4"
|
|
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_VERSIONS=()
|
|
PYTHON_LIBSUFFIXES=()
|
|
# We don't have python2 for secondaryArch,
|
|
if [ -z "$secondaryArchSuffix" ]; then
|
|
PYTHON_PACKAGES+=(python)
|
|
PYTHON_VERSIONS+=(2.7)
|
|
PYTHON_LIBSUFFIXES+=("")
|
|
BUILD_REQUIRES+="
|
|
setuptools_python
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python2
|
|
"
|
|
fi
|
|
# gcc2 does not support the flags passed by python3
|
|
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
|
PYTHON_PACKAGES+=(python3)
|
|
PYTHON_VERSIONS+=(3.6)
|
|
PYTHON_LIBSUFFIXES+=(m)
|
|
BUILD_REQUIRES+="
|
|
setuptools_python3
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python3
|
|
"
|
|
fi
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
pythonPackage=${PYTHON_PACKAGES[i]}
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
pythonLibSuffix=${PYTHON_LIBSUFFIXES[$i]}
|
|
|
|
eval "PROVIDES_${pythonPackage}=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku$secondaryArchSuffix
|
|
lib:libcrypto$secondaryArchSuffix
|
|
lib:libcurl$secondaryArchSuffix
|
|
lib:libnghttp2$secondaryArchSuffix
|
|
lib:libpython$pythonVersion$pythonLibSuffix$secondaryArchSuffix
|
|
lib:libssl$secondaryArchSuffix
|
|
lib:libz$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
|
|
}
|