mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
pillow, bump version, drop python2.7, add python3.10 (#7215)
This commit is contained in:
93
dev-python/pillow/pillow-9.2.0.recipe
Normal file
93
dev-python/pillow/pillow-9.2.0.recipe
Normal file
@@ -0,0 +1,93 @@
|
||||
SUMMARY="Python Imaging Library (fork)"
|
||||
DESCRIPTION="Pillow is the friendly PIL fork by Alex Clark and Contributors.
|
||||
PIL is the Python Imaging Library by Fredrik Lundh and Contributors."
|
||||
HOMEPAGE="https://github.com/python-imaging/Pillow
|
||||
https://pypi.python.org/pypi/Pillow"
|
||||
COPYRIGHT="1997-2011 by Secret Labs AB
|
||||
1995-2011 by Fredrik Lundh
|
||||
2010-2022 by Alex Clark and contributors"
|
||||
LICENSE="HPND"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/python-pillow/Pillow/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="95836f00972dbf724bf1270178683a0ac4ea23c6c3a980858fc9f2f9456e32ef"
|
||||
SOURCE_FILENAME="pillow-$portVersion.tar.gz"
|
||||
SOURCE_DIR="Pillow-$portVersion"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2 ?x86"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:liblcms2$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libimagequant$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:libopenjp2$secondaryArchSuffix
|
||||
devel:libtiff$secondaryArchSuffix
|
||||
devel:libwebp$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python3 python38 python39 python310)
|
||||
PYTHON_VERSIONS=(3.7 3.8 3.9 3.10)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
eval "PROVIDES_${pythonPackage}=\"\
|
||||
${portName}_$pythonPackage = $portVersion\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku${secondaryArchSuffix}\n\
|
||||
cmd:python$pythonVersion\n\
|
||||
lib:liblcms2$secondaryArchSuffix\n\
|
||||
lib:libfreetype$secondaryArchSuffix\n\
|
||||
lib:libimagequant$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix\n\
|
||||
lib:libopenjp2$secondaryArchSuffix\n\
|
||||
lib:libtiff$secondaryArchSuffix\n\
|
||||
lib:libwebp$secondaryArchSuffix\n\
|
||||
lib:libz$secondaryArchSuffix\n\
|
||||
\""
|
||||
if [ "$targetArchitecture" = "x86_gcc2" ]; then
|
||||
eval "PROVIDES_${pythonPackage}+=\"\n\
|
||||
projectx_$pythonPackage = $portVersion\
|
||||
\""
|
||||
fi
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
done
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
export INCLUDE="$(findpaths -c: B_FIND_PATH_HEADERS_DIRECTORY)"
|
||||
export LIB="$(findpaths -c: B_FIND_PATH_DEVELOP_LIB_DIRECTORY)"
|
||||
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:$PYTHONPATH
|
||||
mkdir -p $installLocation
|
||||
rm -rf build
|
||||
$python setup.py build install \
|
||||
--root=/ --prefix=$prefix
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python*
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user