From 9f1dee16d797f0388c55a922d98738ba032af3d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Fri, 5 Feb 2016 00:03:56 +0100 Subject: [PATCH] add a recipe for Pillow (fork of PIL) --- dev-python/pillow/pillow-3.1.1.recipe | 92 +++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 dev-python/pillow/pillow-3.1.1.recipe diff --git a/dev-python/pillow/pillow-3.1.1.recipe b/dev-python/pillow/pillow-3.1.1.recipe new file mode 100644 index 000000000..07f9fb141 --- /dev/null +++ b/dev-python/pillow/pillow-3.1.1.recipe @@ -0,0 +1,92 @@ +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 + " +SOURCE_URI="https://pypi.python.org/packages/source/P/Pillow/Pillow-3.1.1.tar.gz" +CHECKSUM_SHA256="486f4ccddee09429cb1c63ea56c02894aecf9d69acdcaf006c53835df2549fff" +LICENSE="HPND" +COPYRIGHT=" + 1997-2011 by Secret Labs AB + 1995-2011 by Fredrik Lundh + " +REVISION="1" + +ARCHITECTURES="x86 x86_gcc2 x86_64" + +SOURCE_DIR="Pillow-$portVersion" + +PROVIDES=" + pillow = $portVersion + cmd:createfontdatachunk.py = $portVersion + cmd:enhancer.py = $portVersion + cmd:explode.py = $portVersion + cmd:gifmaker.py = $portVersion + cmd:painter.py = $portVersion + cmd:pilconvert.py = $portVersion + cmd:pildriver.py = $portVersion + cmd:pilfile.py = $portVersion + cmd:pilfont.py = $portVersion + cmd:pilprint.py = $portVersion + cmd:player.py = $portVersion + cmd:thresholder.py = $portVersion + cmd:viewer.py = $portVersion + " + +REQUIRES=" + haiku + cmd:python + #python_setuptools + lib:libfreetype + lib:libjpeg + lib:libopenjp2 + lib:libtiff + lib:libwebp + lib:libz + #cmd:tcl / tk (someday) + " + +BUILD_REQUIRES=" + haiku_devel + python_setuptools + devel:libfreetype + devel:libjpeg + devel:libopenjp2 + devel:libtiff + devel:libwebp + devel:libz + " + +BUILD_PREREQUIRES=" + cmd:gcc + cmd:ld + cmd:python + cmd:freetype_config + " + +BUILD() +{ + export INCLUDE="$(findpaths -c: B_FIND_PATH_HEADERS_DIRECTORY)" + export LIB="$(findpaths -c: B_FIND_PATH_DEVELOP_LIB_DIRECTORY)" + $portPackageLinksDir/cmd~python/bin/python setup.py build +} + +INSTALL() +{ + export INCLUDE="$(findpaths -c: B_FIND_PATH_HEADERS_DIRECTORY)" + export LIB="$(findpaths -c: B_FIND_PATH_DEVELOP_LIB_DIRECTORY)" + # GENERIC: all python_setuptools-based installs need this + export PATH="$portPackageLinksDir/cmd~python/bin:$PATH" + pythonVersion=$(python --version 2>&1 | sed 's/Python //' | head -c3) + installLocation=$prefix/lib/python$pythonVersion/vendor-packages/ + export PYTHONPATH=$installLocation:$PYTHONPATH + mkdir -p $installLocation + + python setup.py install \ + --single-version-externally-managed \ + --root=/ --prefix=$prefix +}