You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.0 KiB

  1. #
  2. # Copyright © 1997-2011 by Secret Labs AB
  3. # Copyright © 1995-2011 by Fredrik Lundh
  4. # Copyright © 2016 by Alex Clark and contributors
  5. #
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=pillow
  8. PKG_VERSION:=6.2.0
  9. PKG_RELEASE:=1
  10. PKG_SOURCE:=Pillow-$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/P/Pillow
  12. PKG_HASH:=4548236844327a718ce3bb182ab32a16fa2050c61e334e959f554cac052fb0df
  13. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-Pillow-$(PKG_VERSION)
  14. PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  15. PKG_LICENSE:=HPND
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_CPE_ID:=cpe:/a:python:pillow
  18. include $(INCLUDE_DIR)/package.mk
  19. include ../python-package.mk
  20. include ../python3-package.mk
  21. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  22. define Package/python-pillow/Default
  23. SUBMENU:=Python
  24. SECTION:=lang
  25. CATEGORY:=Languages
  26. TITLE:=The friendly PIL fork
  27. URL:=https://python-pillow.org/
  28. DEPENDS:=+libfreetype +libjpeg +libtiff +zlib
  29. endef
  30. define Package/python-pillow
  31. $(call Package/python-pillow/Default)
  32. DEPENDS+=+PACKAGE_python-pillow:python
  33. VARIANT:=python
  34. endef
  35. define Package/python-pillow/description
  36. The friendly PIL fork
  37. endef
  38. define Package/python3-pillow
  39. $(call Package/python-pillow/Default)
  40. DEPENDS+=+PACKAGE_python3-pillow:python3
  41. VARIANT:=python3
  42. endef
  43. define Package/python3-pillow/description
  44. $(call Package/python-pillow/description)
  45. .
  46. (Variant for Python3)
  47. endef
  48. PYTHON3_PKG_SETUP_GLOBAL_ARGS += build_ext \
  49. --enable-zlib \
  50. --enable-jpeg \
  51. --enable-tiff \
  52. --enable-freetype \
  53. --disable-lcms \
  54. --disable-webp \
  55. --disable-webpmux \
  56. --disable-jpeg2000 \
  57. --disable-imagequant \
  58. --disable-platform-guessing
  59. PYTHON_PKG_SETUP_GLOBAL_ARGS:=$(PYTHON3_PKG_SETUP_GLOBAL_ARGS)
  60. $(eval $(call PyPackage,python-pillow))
  61. $(eval $(call BuildPackage,python-pillow))
  62. $(eval $(call BuildPackage,python-pillow-src))
  63. $(eval $(call Py3Package,python3-pillow))
  64. $(eval $(call BuildPackage,python3-pillow))
  65. $(eval $(call BuildPackage,python3-pillow-src))