Skip to contentSkip to conversation

python-pillow: new package

PATCH New Angelo Compagnucci 2 participants 6 messages Apr 25, 2016 – Jun 9, 2016

lore
Share & tools
lore
#0 lore raw

v2 cover python-pillow: new package

This patch add python-pillow the friendly python fork and bumps openjpeg to version 2.1 required to correctly compile. Bumping openjpeg to version 2.1 makes poppler unhappy so fixing it.

*** BLURB HERE ***

Angelo Compagnucci (3):
package/openjpeg: bump to version 2.1 package/poppler: enable autodetection of openjpeg package/python-pillow: new package

 package/Config.in                                  |   1 +
 package/openjpeg/openjpeg.hash                     |   2 +-
 package/openjpeg/openjpeg.mk                       |  34 +----
 package/poppler/poppler.mk                         |   2 +-
 ...y-add-option-to-disable-platform-guessing.patch | 169 +++++++++++++++++++++
 package/python-pillow/Config.in                    |  12 ++
 package/python-pillow/python-pillow.hash           |   2 +
 package/python-pillow/python-pillow.mk             |  39 +++++
 8 files changed, 232 insertions(+), 29 deletions(-)
 create mode 100644 package/python-pillow/0001-setup.py-add-option-to-disable-platform-guessing.patch
 create mode 100644 package/python-pillow/Config.in
 create mode 100644 package/python-pillow/python-pillow.hash
 create mode 100644 package/python-pillow/python-pillow.mk
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/3 package/openjpeg: bump to version 2.1

This patch:
* bumps openjpeg to version 2.1
* changes download location to github
* converts the package to use cmake

---
 package/openjpeg/openjpeg.hash |  2 +-
 package/openjpeg/openjpeg.mk   | 34 +++++++---------------------------
 2 files changed, 8 insertions(+), 28 deletions(-)
package/openjpeg/openjpeg.hash +1 -1
index a8695c1..35d4fbd 100644
@@ -1,2 +1,2 @@
 # Locally computed:
-sha256	15df7b194a5d8dba0052cd21c17a4dc761149a770a907d73fffb972078c28a87  openjpeg-1.5.2.tar.gz
+sha256	4afc996cd5e0d16360d71c58216950bcb4ce29a3272360eb29cadb1c8bce4efc  openjpeg-2.1.tar.gz
package/openjpeg/openjpeg.mk +7 -27
index c613ba8..bf12526 100644
@@ -4,35 +4,15 @@
 #
 ################################################################################
 
-OPENJPEG_VERSION = 1.5.2
-OPENJPEG_SITE = http://downloads.sourceforge.net/project/openjpeg.mirror/$(OPENJPEG_VERSION)
+OPENJPEG_VERSION = 2.1
+OPENJPEG_SITE = $(call github,uclouvain,openjpeg,version.$(OPENJPEG_VERSION))
 OPENJPEG_LICENSE = BSD-2c
 OPENJPEG_LICENSE_FILES = LICENSE
-# tarball does not contain the generated files
-OPENJPEG_AUTORECONF = YES
 OPENJPEG_INSTALL_STAGING = YES
-OPENJPEG_DEPENDENCIES = host-pkgconf
-OPENJPEG_CONF_OPTS = --disable-lcms1
 
-ifeq ($(BR2_PACKAGE_LIBPNG),y)
-OPENJPEG_DEPENDENCIES += libpng
-OPENJPEG_CONF_OPTS += --enable-png
-else
-OPENJPEG_CONF_OPTS += --disable-png
-endif
+OPENJPEG_DEPENDENCIES += $(if $(BR2_PACKAGE_ZLIB),zlib)
+OPENJPEG_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBPNG),libpng)
+OPENJPEG_DEPENDENCIES += $(if $(BR2_PACKAGE_TIFF),tiff)
+OPENJPEG_DEPENDENCIES += $(if $(BR2_PACKAGE_LCMS2),lcms2)
 
-ifeq ($(BR2_PACKAGE_TIFF),y)
-OPENJPEG_DEPENDENCIES += tiff
-OPENJPEG_CONF_OPTS += --enable-tiff
-else
-OPENJPEG_CONF_OPTS += --disable-tiff
-endif
-
-ifeq ($(BR2_PACKAGE_LCMS2),y)
-OPENJPEG_DEPENDENCIES += lcms2
-OPENJPEG_CONF_OPTS += --enable-lcms2
-else
-OPENJPEG_CONF_OPTS += --disable-lcms2
-endif
-
-$(eval $(autotools-package))
+$(eval $(cmake-package))
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 1/3 package/openjpeg: bump to version 2.1

Hello,

Quoted 10 lines · Angelo Compagnucci

This patch:
* bumps openjpeg to version 2.1
* changes download location to github
* converts the package to use cmake

---
 package/openjpeg/openjpeg.hash |  2 +-
 package/openjpeg/openjpeg.mk   | 34 +++++++---------------------------
 2 files changed, 8 insertions(+), 28 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v2 2/3 package/poppler: enable autodetection of openjpeg

In reply to Angelo Compagnucci

This patch enables autodetection for installed openjpeg library. Previously we were forcing to version 1.

---
 package/poppler/poppler.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/poppler/poppler.mk +1 -1
index 1113e4b..c6cd2eb 100644
@@ -75,7 +75,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_OPENJPEG),y)
 POPPLER_DEPENDENCIES += openjpeg
-POPPLER_CONF_OPTS += --enable-libopenjpeg=openjpeg1
+POPPLER_CONF_OPTS += --enable-libopenjpeg
 else
 POPPLER_CONF_OPTS += --enable-libopenjpeg=none
 endif
Signature · 1 line
1.9.1
#4 lore raw

PATCH v2 2/3 package/poppler: enable autodetection of openjpeg

Hello,

Quoted 7 lines · Angelo Compagnucci

This patch enables autodetection for installed openjpeg library. Previously we were forcing to version 1.

---
 package/poppler/poppler.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH v2 3/3 package/python-pillow: new package

In reply to Angelo Compagnucci

This patch adds python pillow, the friendly python fork. The accompaining patch to disable platform guessing was submitted upstream for inclusion.

---
 package/Config.in                                  |   1 +
 ...y-add-option-to-disable-platform-guessing.patch | 169 +++++++++++++++++++++
 package/python-pillow/Config.in                    |  12 ++
 package/python-pillow/python-pillow.hash           |   2 +
 package/python-pillow/python-pillow.mk             |  39 +++++
 5 files changed, 223 insertions(+)
 create mode 100644 package/python-pillow/0001-setup.py-add-option-to-disable-platform-guessing.patch
 create mode 100644 package/python-pillow/Config.in
 create mode 100644 package/python-pillow/python-pillow.hash
 create mode 100644 package/python-pillow/python-pillow.mk
package/Config.in +1 -0
index 5103621..8dc13f4 100644
@@ -690,6 +690,7 @@ menu "External python modules"
 	source "package/python-pam/Config.in"
 	source "package/python-paramiko/Config.in"
 	source "package/python-pexpect/Config.in"
+	source "package/python-pillow/Config.in"
 	source "package/python-posix-ipc/Config.in"
 	source "package/python-protobuf/Config.in"
 	source "package/python-psutil/Config.in"
package/python-pillow/0001-setup.py-add-option-to-disable-platform-guessing.patch new file +169 -0

169 lines not on this page · raw message

package/python-pillow/Config.in new file +12 -0
new file mode 100644
index 0000000..d5c3809
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_PYTHON_PILLOW
+	bool "python-pillow"
+	help
+	  Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is
+	  the Python Imaging Library by Fredrik Lundh and Contributors.
+
+	  Pillow relies on external libraries to provide support various
+	  image formats. Select the corresponding package(s) to get this
+	  support. Pillow can use jpeg, zlib (for PNG), tiff, freetype, webp,
+	  and openjpeg (JPEG-2000).
+
+	  https://pypi.python.org/pypi/Pillow/
package/python-pillow/python-pillow.hash new file +2 -0
new file mode 100644
index 0000000..0fc349c
@@ -0,0 +1,2 @@
+https://pypi.python.org/pypi?:action=show_md5&digest=7cfd093c11205d9e2ebe3c51dfcad510
+md5 7cfd093c11205d9e2ebe3c51dfcad510  Pillow-3.2.0.tar.gz
package/python-pillow/python-pillow.mk new file +39 -0
new file mode 100644
index 0000000..f186ab6
@@ -0,0 +1,39 @@
+################################################################################
+#
+# python-pillow
+#
+################################################################################
+
+PYTHON_PILLOW_VERSION = 3.2.0
+PYTHON_PILLOW_SOURCE = Pillow-$(PYTHON_PILLOW_VERSION).tar.gz
+PYTHON_PILLOW_SITE = https://pypi.python.org/packages/source/P/Pillow
+PYTHON_PILLOW_SETUP_TYPE = setuptools
+PYTHON_PILLOW_DEPENDENCIES = $(if $(BR2_PACKAGE_JPEG),jpeg) \
+      $(if $(BR2_PACKAGE_ZLIB),zlib) \
+      $(if $(BR2_PACKAGE_TIFF),tiff) \
+      $(if $(BR2_PACKAGE_FREETYPE),freetype) \
+      $(if $(BR2_PACKAGE_WEBP),webp) \
+      $(if $(BR2_PACKAGE_OPENJPEG),openjpeg)
+
+PYTHON_PILLOW_BUILD_OPTS += --disable-platform-guessing
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_JPEG),--enable-jpeg,--disable-jpeg)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_ZLIB),--enable-zlib,--disable-zlib)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_TIFF),--enable-tiff,--disable-tiff)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_FREETYPE),--enable-freetype,--disable-freetype)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_WEBP),--enable-webp,--disable-webp)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_OPENJPEG),--enable-jpeg2000,--disable-jpeg2000)
+
+PYTHON_PILLOW_INSTALL_TARGET_OPTS += $(PYTHON_PILLOW_BUILD_OPTS)
+
+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 = (cd $(PYTHON_PILLOW_BUILDDIR); \
+		$(PYTHON_PILLOW_BASE_ENV) $(PYTHON_PILLOW_ENV) \
+		$(PYTHON_PILLOW_PYTHON_INTERPRETER) setup.py build_ext \
+		$(PYTHON_PILLOW_INSTALL_TARGET_OPTS) install \
+		$(PYTHON_PILLOW_BASE_INSTALL_TARGET_OPTS))
+
+$(eval $(python-package))
Signature · 1 line
1.9.1