2016-06-29 22:50:56 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# python-pillow
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2018-05-28 20:18:05 +02:00
|
|
|
PYTHON_PILLOW_VERSION = 5.1.0
|
2016-06-29 22:50:56 +02:00
|
|
|
PYTHON_PILLOW_SOURCE = Pillow-$(PYTHON_PILLOW_VERSION).tar.gz
|
2018-05-28 20:18:05 +02:00
|
|
|
PYTHON_PILLOW_SITE = https://files.pythonhosted.org/packages/89/b8/2f49bf71cbd0e9485bb36f72d438421b69b7356180695ae10bd4fd3066f5
|
2016-06-29 22:50:56 +02:00
|
|
|
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
|
|
|
|
|
2016-07-06 15:47:32 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_TIFF),y)
|
2016-06-29 22:50:56 +02:00
|
|
|
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
|
|
|
|
|
2016-07-06 22:07:57 +02:00
|
|
|
define PYTHON_PILLOW_BUILD_CMDS
|
|
|
|
cd $(PYTHON_PILLOW_BUILDDIR); \
|
2016-06-29 22:50:56 +02:00
|
|
|
$(PYTHON_PILLOW_BASE_ENV) $(PYTHON_PILLOW_ENV) \
|
|
|
|
$(PYTHON_PILLOW_PYTHON_INTERPRETER) setup.py build_ext \
|
|
|
|
$(PYTHON_PILLOW_BASE_BUILD_OPTS) $(PYTHON_PILLOW_BUILD_OPTS)
|
2016-07-06 22:07:57 +02:00
|
|
|
endef
|
2016-06-29 22:50:56 +02:00
|
|
|
|
2016-07-06 22:07:57 +02:00
|
|
|
define 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_BUILD_OPTS) install \
|
|
|
|
$(PYTHON_PILLOW_BASE_INSTALL_TARGET_OPTS) \
|
|
|
|
$(PYTHON_PILLOW_INSTALL_TARGET_OPTS)
|
|
|
|
endef
|
2016-06-29 22:50:56 +02:00
|
|
|
|
|
|
|
$(eval $(python-package))
|