mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
pycurl: update to version 7.45.2 (#8220)
- Drop support for Python 2.7/3.7. - Add it for Python 3.9/3.10. - Move to x86 in 32 bits. - Disable creation of "any" pycurl_doc package (for now at least). Its content wasn't that much helpful.
This commit is contained in:
92
dev-python/pycurl/pycurl-7.45.2.recipe
Normal file
92
dev-python/pycurl/pycurl-7.45.2.recipe
Normal file
@@ -0,0 +1,92 @@
|
||||
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="5"
|
||||
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
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libnghttp2$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python39 python310)
|
||||
PYTHON_VERSIONS=(3.9 3.10)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
eval "PROVIDES_${pythonPackage}=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
\""
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user