summaryrefslogtreecommitdiffstats
path: root/package/python-pillow/python-pillow.mk
diff options
context:
space:
mode:
authorAngelo Compagnucci <angelo.compagnucci@gmail.com>2016-06-29 22:50:56 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-07-05 23:23:34 +0200
commit509ac32be6f61d9c3283a1845c715db816000198 (patch)
tree52a460ec85c2eb9bf3dcca60df91efc6fb0ba29b /package/python-pillow/python-pillow.mk
parent563c693fdce1363ea6a66af9b8f73987de8b6ff9 (diff)
downloadbuildroot-509ac32be6f61d9c3283a1845c715db816000198.tar.gz
buildroot-509ac32be6f61d9c3283a1845c715db816000198.zip
package/python-pillow: new package
This patch adds python pillow, the friendly python image library fork, it includes a backported patch to disable configuration platfom guessing. Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com> [Thomas: - Rewrap Config.in help text. - As suggested by Bernd Kuhls, bump the version to 3.3.0 and drop the patch that has been applied upstream. - Rework the optional dependency handling to follow what we do in most Buildroot packages. - Add licensing information.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/python-pillow/python-pillow.mk')
-rw-r--r--package/python-pillow/python-pillow.mk64
1 files changed, 64 insertions, 0 deletions
diff --git a/package/python-pillow/python-pillow.mk b/package/python-pillow/python-pillow.mk
new file mode 100644
index 0000000000..878fdadd70
--- /dev/null
+++ b/package/python-pillow/python-pillow.mk
@@ -0,0 +1,64 @@
+################################################################################
+#
+# python-pillow
+#
+################################################################################
+
+PYTHON_PILLOW_VERSION = 3.3.0
+PYTHON_PILLOW_SOURCE = Pillow-$(PYTHON_PILLOW_VERSION).tar.gz
+PYTHON_PILLOW_SITE = https://pypi.python.org/packages/e0/27/f61098a12f14690689924de93ffdd101463083a80bf8ff3e0c218addf05b
+PYTHON_PILLOW_LICENSE = PIL Software License
+PYTHON_PILLOW_LICENSE_FILES = LICENSE
+PYTHON_PILLOW_SETUP_TYPE = setuptools
+PYTHON_PILLOW_BUILD_OPTS = --disable-platform-guessing
+
+ifeq ($(BR2_PACKAGE_FREETYPE),y)
+PYTHON_PILLOW_DEPENDENCIES += freetype
+PYTHON_PILLOW_BUILD_OPTS += --enable-freetype
+else
+PYTHON_PILLOW_BUILD_OPTS += --disable-freetype
+endif
+
+ifeq ($(BR2_PACKAGE_JPEG),y)
+PYTHON_PILLOW_DEPENDENCIES += jpeg
+PYTHON_PILLOW_BUILD_OPTS += --enable-jpeg
+else
+PYTHON_PILLOW_BUILD_OPTS += --disable-jpeg
+endif
+
+ifeq ($(BR2_PACKAGE_OPENJPEG),y)
+PYTHON_PILLOW_DEPENDENCIES += openjpeg
+PYTHON_PILLOW_BUILD_OPTS += --enable-jpeg2000
+else
+PYTHON_PILLOW_BUILD_OPTS += --disable-jpeg2000
+endif
+
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+PYTHON_PILLOW_DEPENDENCIES += tiff
+PYTHON_PILLOW_BUILD_OPTS += --enable-tiff
+else
+PYTHON_PILLOW_BUILD_OPTS += --disable-tiff
+endif
+
+ifeq ($(BR2_PACKAGE_WEBP),y)
+PYTHON_PILLOW_DEPENDENCIES += webp
+PYTHON_PILLOW_BUILD_OPTS += --enable-webp
+else
+PYTHON_PILLOW_BUILD_OPTS += --disable-webp
+endif
+
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+PYTHON_PILLOW_DEPENDENCIES += zlib
+PYTHON_PILLOW_BUILD_OPTS += --enable-zlib
+else
+PYTHON_PILLOW_BUILD_OPTS += --disable-zlib
+endif
+
+PYTHON_PILLOW_BUILD_CMDS = cd $(PYTHON_PILLOW_BUILDDIR); \
+ $(PYTHON_PILLOW_BASE_ENV) $(PYTHON_PILLOW_ENV) \
+ $(PYTHON_PILLOW_PYTHON_INTERPRETER) setup.py build_ext \
+ $(PYTHON_PILLOW_BASE_BUILD_OPTS) $(PYTHON_PILLOW_BUILD_OPTS)
+
+PYTHON_PILLOW_INSTALL_TARGET_CMDS = $(PYTHON_PILLOW_BUILD_CMDS) install
+
+$(eval $(python-package))
OpenPOWER on IntegriCloud