]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/python-pillow/python-pillow.mk
package/python-pillow: bump to version 4.0.0
[coffee/buildroot.git] / package / python-pillow / python-pillow.mk
1 ################################################################################
2 #
3 # python-pillow
4 #
5 ################################################################################
6
7 PYTHON_PILLOW_VERSION = 4.0.0
8 PYTHON_PILLOW_SOURCE = Pillow-$(PYTHON_PILLOW_VERSION).tar.gz
9 PYTHON_PILLOW_SITE = https://pypi.python.org/packages/8d/80/eca7a2d1a3c2dafb960f32f844d570de988e609f5fd17de92e1cf6a01b0a
10 PYTHON_PILLOW_LICENSE = PIL Software License
11 PYTHON_PILLOW_LICENSE_FILES = LICENSE
12 PYTHON_PILLOW_SETUP_TYPE = setuptools
13 PYTHON_PILLOW_BUILD_OPTS = --disable-platform-guessing
14
15 ifeq ($(BR2_PACKAGE_FREETYPE),y)
16 PYTHON_PILLOW_DEPENDENCIES += freetype
17 PYTHON_PILLOW_BUILD_OPTS += --enable-freetype
18 else
19 PYTHON_PILLOW_BUILD_OPTS += --disable-freetype
20 endif
21
22 ifeq ($(BR2_PACKAGE_JPEG),y)
23 PYTHON_PILLOW_DEPENDENCIES += jpeg
24 PYTHON_PILLOW_BUILD_OPTS += --enable-jpeg
25 else
26 PYTHON_PILLOW_BUILD_OPTS += --disable-jpeg
27 endif
28
29 ifeq ($(BR2_PACKAGE_OPENJPEG),y)
30 PYTHON_PILLOW_DEPENDENCIES += openjpeg
31 PYTHON_PILLOW_BUILD_OPTS += --enable-jpeg2000
32 else
33 PYTHON_PILLOW_BUILD_OPTS += --disable-jpeg2000
34 endif
35
36 ifeq ($(BR2_PACKAGE_TIFF),y)
37 PYTHON_PILLOW_DEPENDENCIES += tiff
38 PYTHON_PILLOW_BUILD_OPTS += --enable-tiff
39 else
40 PYTHON_PILLOW_BUILD_OPTS += --disable-tiff
41 endif
42
43 ifeq ($(BR2_PACKAGE_WEBP),y)
44 PYTHON_PILLOW_DEPENDENCIES += webp
45 PYTHON_PILLOW_BUILD_OPTS += --enable-webp
46 else
47 PYTHON_PILLOW_BUILD_OPTS += --disable-webp
48 endif
49
50 ifeq ($(BR2_PACKAGE_ZLIB),y)
51 PYTHON_PILLOW_DEPENDENCIES += zlib
52 PYTHON_PILLOW_BUILD_OPTS += --enable-zlib
53 else
54 PYTHON_PILLOW_BUILD_OPTS += --disable-zlib
55 endif
56
57 define PYTHON_PILLOW_BUILD_CMDS
58         cd $(PYTHON_PILLOW_BUILDDIR); \
59                 $(PYTHON_PILLOW_BASE_ENV) $(PYTHON_PILLOW_ENV) \
60                 $(PYTHON_PILLOW_PYTHON_INTERPRETER) setup.py build_ext \
61                 $(PYTHON_PILLOW_BASE_BUILD_OPTS) $(PYTHON_PILLOW_BUILD_OPTS)
62 endef
63
64 define PYTHON_PILLOW_INSTALL_TARGET_CMDS
65         cd $(PYTHON_PILLOW_BUILDDIR); \
66                 $(PYTHON_PILLOW_BASE_ENV) $(PYTHON_PILLOW_ENV) \
67                 $(PYTHON_PILLOW_PYTHON_INTERPRETER) setup.py build_ext \
68                 $(PYTHON_PILLOW_BUILD_OPTS) install \
69                 $(PYTHON_PILLOW_BASE_INSTALL_TARGET_OPTS) \
70                 $(PYTHON_PILLOW_INSTALL_TARGET_OPTS)
71 endef
72
73 $(eval $(python-package))