sthen ed91e60e6c update to py-Pillow 6.2.2, build DEBUG_PACKAGES and use MODPY_PYTEST while there.
Pillow 7.0.0 is out now but it now requires Python 3.x and several ports that
depend on this still use py2:

games/fretsonfire	games/hypatia	games/mnemosyne
geo/gmapcatcher		geo/mapproxy	geo/tilecache
graphics/asymptote	graphics/comix	graphics/py-pyx
graphics/sk1		net/deluge	print/hplip
print/scribus		productivity/impressive
security/volatility	textproc/calibre
2020-01-03 14:42:18 +00:00

46 lines
1.0 KiB
Makefile

# $OpenBSD: Makefile,v 1.31 2020/01/03 14:42:18 sthen Exp $
COMMENT= Python Imaging Library (maintained fork of PIL)
MODPY_EGG_VERSION= 6.2.2
DISTNAME= Pillow-${MODPY_EGG_VERSION}
PKGNAME= py-${DISTNAME}
CATEGORIES= graphics
HOMEPAGE= https://python-pillow.org/
# PIL Software License
# Permission to use, copy, modify and distribute freely.
PERMIT_PACKAGE= Yes
FLAVORS= python3
FLAVOR?=
MODPY_PI = Yes
WANTLIB= freetype openjp2 jpeg lcms2 pthread tiff webp z \
webpdemux webpmux \
${MODPY_WANTLIB}
MODULES= lang/python
MODPY_PYTEST= Yes
MODPY_SETUPTOOLS= Yes
DEBUG_PACKAGES= ${BUILD_PACKAGES}
LIB_DEPENDS= graphics/lcms2 \
graphics/openjp2>=2.3.0p0 \
graphics/libwebp
TEST_DEPENDS= ${FULLPKGNAME}:${BUILD_PKGPATH}
SUBST_VARS+= INCL_DIR MODPY_FLAVOR
INCL_DIR= ${MODPY_INCDIR:S/${LOCALBASE}\///}
pre-test:
cd ${WRKSRC}; ${MODPY_BIN} ./selftest.py
post-install:
${INSTALL_DATA_DIR} ${WRKINST}${MODPY_INCDIR}
${INSTALL_DATA} ${WRKSRC}/src/libImaging/{ImPlatform,Imaging}.h ${WRKINST}${MODPY_INCDIR}
.include <bsd.port.mk>