wand: new python recipe (#10901)

This commit is contained in:
Joachim Mairböck
2024-08-25 22:01:04 +02:00
committed by GitHub
parent e213837d9d
commit bad27af765

View File

@@ -0,0 +1,68 @@
SUMMARY="The ctypes-based simple ImageMagick binding for Python"
DESCRIPTION="Wand is a ctypes-based simple ImageMagick binding for Python, supporting 2.7, 3.3+, \
and PyPy. All functionalities of MagickWand API are implemented in Wand."
HOMEPAGE="https://wand-py.org/"
COPYRIGHT="2011-2018 by Hong Minhee
2019-2023 by E. McConville"
LICENSE="MIT"
REVISION="1"
pypiVersion="59/d5/1bdd7c9662d5e9078e25ba0eb69bdb122859295746d40ab8dfef3a7b4d42"
SOURCE_URI="https://files.pythonhosted.org/packages/$pypiVersion/Wand-$portVersion-py2.py3-none-any.whl#noarchive"
CHECKSUM_SHA256="e5dda0ac2204a40c29ef5c4cb310770c95d3d05c37b1379e69c94ea79d7d19c0"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
DISABLE_SOURCE_PACKAGE="yes"
PROVIDES="
wand$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
PYTHON_VERSIONS=(3.10)
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
wand${secondaryArchSuffix}_$pythonPackage = $portVersion
\""
if [ $targetArchitecture = "x86_gcc2" ]; then
eval "PROVIDES_$pythonPackage+=\"
wand_$pythonPackage = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku$secondaryArchSuffix
cmd:python$pythonVersion
lib:libMagickCore_7.Q16HDRI$secondaryArchSuffix
lib:libMagickWand_7.Q16HDRI$secondaryArchSuffix
\""
BUILD_REQUIRES+="
installer_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
$python -m installer -p $prefix Wand-$portVersion-py2.py3-none-any.whl
packageEntries $pythonPackage \
$prefix/lib/python*
done
}