mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
lxml: bump to 4.2.5.
This commit is contained in:
114
dev-python/lxml/lxml-4.2.5.recipe
Normal file
114
dev-python/lxml/lxml-4.2.5.recipe
Normal file
@@ -0,0 +1,114 @@
|
||||
SUMMARY="A Pythonic binding for the libxml2 and libxslt libraries"
|
||||
DESCRIPTION="The lxml XML toolkit is unique in that it combines the speed \
|
||||
and XML feature completeness of the libxml2 and libxslt libraries with the \
|
||||
simplicity of a native Python API, mostly compatible but superior to the \
|
||||
well-known ElementTree API."
|
||||
HOMEPAGE="https://lxml.de/
|
||||
https://github.com/lxml/lxml
|
||||
https://pypi.python.org/pypi/lxml/"
|
||||
COPYRIGHT="2003-2010 Gustavo Niemeyer
|
||||
2003 Shuttleworth Foundation
|
||||
2004 Infrae"
|
||||
LICENSE="BSD (3-clause)
|
||||
GNU GPL v2
|
||||
PSF-2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://lxml.de/files/lxml-$portVersion.tgz"
|
||||
CHECKSUM_SHA256="36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
devel:libxslt$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
"
|
||||
|
||||
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
|
||||
"
|
||||
REPLACES_python="
|
||||
python_lxml
|
||||
"
|
||||
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:libpython$pythonVersion$pythonLibSuffix$secondaryArchSuffix
|
||||
lib:libxml2$secondaryArchSuffix
|
||||
lib:libxslt$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
\""
|
||||
done
|
||||
if [ "$targetArchitecture" = x86_gcc2 -a -n "$secondaryArchSuffix" ]; then
|
||||
PROVIDES_python3+="
|
||||
lxml_python3 = $portVersion
|
||||
"
|
||||
fi
|
||||
|
||||
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
|
||||
mkdir -p "$installLocation"
|
||||
rm -rf build
|
||||
$python setup.py build install \
|
||||
--root=/ --prefix="$prefix"
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
"$prefix"/lib/$python
|
||||
done
|
||||
|
||||
if [ -z "$secondaryArchSuffix" ]; then
|
||||
install -m 755 -d "$docDir"
|
||||
install -m 644 -t "$docDir" CHANGES.txt CREDITS.txt README.rst
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user