mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
98 lines
2.5 KiB
Bash
98 lines
2.5 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="7"
|
|
SOURCE_URI="https://github.com/pycurl/pycurl/archive/REL_${portVersion//./_}.tar.gz"
|
|
CHECKSUM_SHA256="1aaaf415a5affe141593b3edf6ce187a79d99fbeb65c0b18490b03edc606394c"
|
|
SOURCE_DIR="pycurl-REL_${portVersion//./_}"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
pycurl$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libcrypto$secondaryArchSuffix >= 3
|
|
devel:libcurl$secondaryArchSuffix
|
|
devel:libnghttp2$secondaryArchSuffix
|
|
devel:libssl$secondaryArchSuffix >= 3
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:make
|
|
"
|
|
|
|
PYTHON_PACKAGES=(python310)
|
|
PYTHON_VERSIONS=(3.10)
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
pythonPackage=${PYTHON_PACKAGES[i]}
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
|
|
eval "PROVIDES_${pythonPackage}=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
eval "PROVIDES_$pythonPackage+=\"
|
|
pycurl_$pythonPackage = $portVersion
|
|
\""
|
|
fi
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku$secondaryArchSuffix
|
|
lib:libcrypto$secondaryArchSuffix
|
|
lib:libcurl$secondaryArchSuffix
|
|
lib:libnghttp2$secondaryArchSuffix
|
|
lib:libpython$pythonVersion$secondaryArchSuffix
|
|
lib:libssl$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
\""
|
|
BUILD_REQUIRES+="
|
|
setuptools_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
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
|
|
make PYTHON=$python
|
|
mkdir -p "$installLocation"
|
|
|
|
$python setup.py build install --root=/ --prefix="$prefix"
|
|
|
|
# mkdir -p "$docDir"
|
|
# mv "$prefix"/share/doc/pycurl/* "$docDir"
|
|
rm -rf "$prefix"/share
|
|
|
|
packageEntries $pythonPackage \
|
|
"$prefix"/lib/$python
|
|
# "$docDir"
|
|
done
|
|
}
|