freebsd-ports/graphics/py-pillow/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

80 lines
3.2 KiB
Makefile

PORTNAME= pillow
PORTVERSION= 9.2.0
CATEGORIES= graphics python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= Pillow-${PORTVERSION}
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Fork of the Python Imaging Library (PIL)
WWW= https://python-pillow.org/
LICENSE= PIL
LICENSE_NAME= Standard PIL License
LICENSE_FILE= ${WRKSRC}/LICENSE
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0,1:devel/py-pytest@${PY_FLAVOR}
USES= cpe localbase python:3.7+
USE_PYTHON= autoplist concurrent distutils
CPE_VENDOR= python
OPTIONS_DEFINE= FREETYPE IMAGEQUANT JPEG JPEG2000 LCMS OLE PNG RAQM TIFF TKINTER WEBP XCB
OPTIONS_DEFAULT=FREETYPE IMAGEQUANT JPEG JPEG2000 LCMS OLE PNG RAQM TIFF TKINTER WEBP XCB
IMAGEQUANT_DESC= Image Quantization support
LCMS_DESC= Little Color Management System
OLE_DESC= Microsoft OLE2 file format support
RAQM_DESC= Complex text layout support
TKINTER_DESC= Tkinter (Tcl/Tk) BitmapImage & PhotoImage support
XCB_DESC= X11 screengrab support
FREETYPE_LIB_DEPENDS= libfreetype.so:print/freetype2
FREETYPE_VARS= PYDISTUTILS_BUILDARGS+=--enable-freetype
FREETYPE_VARS_OFF= PYDISTUTILS_BUILDARGS+=--disable-freetype
IMAGEQUANT_LIB_DEPENDS= libimagequant.so:graphics/libimagequant
IMAGEQUANT_VARS= PYDISTUTILS_BUILDARGS+=--enable-imagequant
IMAGEQUANT_VARS_OFF= PYDISTUTILS_BUILDARGS+=--disable-imagequant
JPEG_USES= jpeg
JPEG_VARS= PYDISTUTILS_BUILDARGS+=--enable-jpeg
JPEG_VARS_OFF= PYDISTUTILS_BUILDARGS+=--disable-jpeg
JPEG2000_LIB_DEPENDS= libopenjp2.so:graphics/openjpeg
JPEG2000_VARS= PYDISTUTILS_BUILDARGS+=--enable-jpeg2000
JPEG2000_VARS_OFF= PYDISTUTILS_BUILDARGS+=--disable-jpeg2000
LCMS_LIB_DEPENDS= liblcms2.so:graphics/lcms2
LCMS_VARS= PYDISTUTILS_BUILDARGS+=--enable-lcms
LCMS_VARS_OFF= PYDISTUTILS_BUILDARGS+=--disable-lcms
OLE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}olefile>=0:devel/py-olefile@${PY_FLAVOR}
PNG_VARS= PYDISTUTILS_BUILDARGS+=--enable-zlib
PNG_VARS_OFF= PYDISTUTILS_BUILDARGS+=--disable-zlib
RAQM_LIB_DEPENDS= libraqm.so:print/libraqm
RAQM_VARS= PYDISTUTILS_BUILDARGS+=--enable-raqm
RAQM_VARS_OFF= PYDISTUTILS_BUILDARGS+=--disable-raqm
TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff
TIFF_VARS= PYDISTUTILS_BUILDARGS+=--enable-tiff
TIFF_VARS_OFF= PYDISTUTILS_BUILDARGS+=--disable-tiff
TKINTER_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>=0:x11-toolkits/py-tkinter@${PY_FLAVOR}
TKINTER_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>=0:x11-toolkits/py-tkinter@${PY_FLAVOR}
TKINTER_USES= tk
TKINTER_VARS= PYDISTUTILS_BUILDARGS+="--include-dirs=${TCL_INCLUDEDIR}:${TK_INCLUDEDIR}"
WEBP_LIB_DEPENDS= libwebp.so:graphics/webp
WEBP_VARS= PYDISTUTILS_BUILDARGS+="--enable-webp --enable-webpmux"
WEBP_VARS_OFF= PYDISTUTILS_BUILDARGS+="--disable-webp --disable-webpmux"
XCB_USE= XORG=xcb
XCB_USES= xorg
XCB_VARS= PYDISTUTILS_BUILDARGS+=--enable-xcb
XCB_VARS_OFF= PYDISTUTILS_BUILDARGS+=--disable-xcb
.include <bsd.port.pre.mk>
PYDISTUTILS_BUILD_TARGET= build build_ext
PYDISTUTILS_BUILDARGS+= saveopts
post-install:
${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
do-test:
cd ${WRKSRC} && ${SETENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} ${PYTHON_CMD} selftest.py
.include <bsd.port.post.mk>