mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-10 13:50:08 +02:00
97 lines
2.7 KiB
Bash
97 lines
2.7 KiB
Bash
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="5"
|
|
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 >= 6
|
|
devel:libwebp$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
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}+=\"
|
|
pillow_$pythonPackage = $portVersion
|
|
\""
|
|
fi
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku${secondaryArchSuffix}
|
|
cmd:python$pythonVersion
|
|
lib:libfreetype$secondaryArchSuffix
|
|
lib:libimagequant$secondaryArchSuffix
|
|
lib:libjpeg$secondaryArchSuffix
|
|
lib:liblcms2$secondaryArchSuffix
|
|
lib:libopenjp2$secondaryArchSuffix
|
|
lib:libtiff$secondaryArchSuffix
|
|
lib:libwebp$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
\""
|
|
BUILD_REQUIRES+="
|
|
setuptools_$pythonPackage
|
|
"
|
|
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
|
|
}
|