include $(TOPDIR)/rules.mk
PKG_NAME:=pillow
-PKG_VERSION:=10.1.0
+PKG_VERSION:=12.1.1
PKG_RELEASE:=1
PYPI_NAME:=Pillow
-PKG_HASH:=e6bf8de6c36ed96c86ea3b6e1d5273c53f46ef518a062464cd7ef5dd2cf92e38
+PYPI_SOURCE_NAME:=pillow
+PKG_HASH:=9ad8fa5937ab05218e2b6a4cff30295ad35afd2f83ac592e68c0d871bb0fdbc4
-PKG_BUILD_DEPENDS:=python-setuptools-scm/host
+PKG_BUILD_DEPENDS:=python-setuptools/host python-pybind11/host
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=HPND
endef
PYTHON3_PKG_BUILD_CONFIG_SETTINGS += \
- --build-option=build_ext \
- --build-option=--enable-zlib \
- --build-option=--enable-jpeg \
- --build-option=--enable-webp \
- --build-option=--enable-webpmux \
- --build-option=--enable-tiff \
- --build-option=--enable-freetype \
- --build-option=--disable-lcms \
- --build-option=--disable-jpeg2000 \
- --build-option=--disable-imagequant \
- --build-option=--disable-platform-guessing
+ zlib=enable \
+ jpeg=enable \
+ webp=enable \
+ tiff=enable \
+ freetype=enable \
+ lcms=disable \
+ jpeg2000=disable \
+ imagequant=disable \
+ platform-guessing=disable
$(eval $(call Py3Package,python3-pillow))
$(eval $(call BuildPackage,python3-pillow))
python3 - << EOF
import sys
-from PIL import Image, ImageDraw
+from PIL import Image, ImageDraw, features
if (Image.__version__ != "$2"):
print("Wrong version: " + Image.__version__)
sys.exit(1)
-from PIL import Image, ImageDraw
+# Check format/codec support
+for feature, name in [
+ ("webp", "WebP"),
+ ("libjpeg_turbo", "JPEG"),
+ ("libtiff", "TIFF"),
+ ("freetype2", "FreeType"),
+]:
+ if not features.check(feature):
+ print(f"{name} support not available")
+ sys.exit(1)
+
img = Image.new('RGB', (100, 30), color = (73, 109, 137))
d = ImageDraw.Draw(img)
d.text((10,10), "Hello World", fill=(255,255,0))