aboutsummaryrefslogtreecommitdiff
path: root/graphics/py-pillow
diff options
context:
space:
mode:
authorKubilay Kocak <koobs@FreeBSD.org>2016-02-25 10:54:01 +0000
committerKubilay Kocak <koobs@FreeBSD.org>2016-02-25 10:54:01 +0000
commit62e4094cce5d9c1bea50db3f2309ba35fb9becda (patch)
tree6d099ff647dbfeccc1029b4d8214792df8d00758 /graphics/py-pillow
parent7caa20f1c85f8c0cfb218ecba0ae8e56523a1db6 (diff)
downloadports-62e4094cce5d9c1bea50db3f2309ba35fb9becda.tar.gz
ports-62e4094cce5d9c1bea50db3f2309ba35fb9becda.zip
graphics/py-pillow: Fix OPT_VARS, Enable WEBP by default
After converting if PORT_OPTIONS:MOPTION PYDISTUTILS_BUILDARGS to OPTION_VARS=PYDISTUTILS_BUILDARGS in r409464 [1], it was reported that the port failed to build with the following error: ValueError: --enable-tcl requested but tcl not found Investigation revealed that only the first of the TKINTER_VARS{_OFF} values was being assigned. The root cause appears to be that OPTIONS_VARS=VAR=<value> does not support multiple space-separated values, unless: a) Values are quoted: OPTION_VARS=VAR="value1 value1", OR b) Multiple assignments are made: OPTION_VAR=VAR+=value1 VAR+=value2 This change wraps the assign for TKINTER_VARS{_OFF} in quotes. It's probably worth improving the OPTION_VARS mechanism to support (a) in Mk/bsd.options.mk instead in the long term. While I'm here: - Use the 'saveopts' command to save all PYDISTUTILS_BUILDARGS in setup.cfg so they are used in the install stage, fixing certain errors - Enable WEBP option by default (Hi pkg users!) [1] https://svnweb.freebsd.org/changeset/ports/409464 PR: 207470 Reported by: olgeni Reported by: Vladimir Omelchuk <admin vladiom com ua> Reported by: Oliver Hartmann <ohartman zedat fu-berlin de>
Notes
Notes: svn path=/head/; revision=409505
Diffstat (limited to 'graphics/py-pillow')
-rw-r--r--graphics/py-pillow/Makefile17
1 files changed, 10 insertions, 7 deletions
diff --git a/graphics/py-pillow/Makefile b/graphics/py-pillow/Makefile
index 4a35ca952824..729bd69eb587 100644
--- a/graphics/py-pillow/Makefile
+++ b/graphics/py-pillow/Makefile
@@ -15,7 +15,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
OPTIONS_DEFINE= FREETYPE JPEG LCMS PNG TIFF TKINTER WEBP
-OPTIONS_DEFAULT= FREETYPE JPEG PNG TKINTER
+OPTIONS_DEFAULT= FREETYPE JPEG PNG TKINTER WEBP
LCMS_DESC= Little Color Management System
TKINTER_DESC= Tkinter (Tcl/Tk) BitmapImage & PhotoImage support
@@ -39,11 +39,11 @@ TIFF_LIB_DEPENDS= libtiff.so:${PORTSDIR}/graphics/tiff
TIFF_VARS= PYDISTUTILS_BUILDARGS+=--enable-tiff
TIFF_VARS_OFF= PYDISTUTILS_BUILDARGS+=--disable-tiff
-TKINTER_USES= tk:build
+TKINTER_USES= tk
TKINTER_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>0:${PORTSDIR}/x11-toolkits/py-tkinter
TKINTER_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>0:${PORTSDIR}/x11-toolkits/py-tkinter
-TKINTER_VARS= PYDISTUTILS_BUILDARGS+=--enable-tcl --enable-tk --include-dirs=${TCL_INCLUDEDIR}:${TK_INCLUDEDIR}
-TKINTER_VARS_OFF= PYDISTUTILS_BUILDARGS+=--disable-tcl --disable-tk
+TKINTER_VARS= PYDISTUTILS_BUILDARGS+="--enable-tcl --enable-tk --include-dirs=${TCL_INCLUDEDIR}:${TK_INCLUDEDIR}"
+TKINTER_VARS_OFF= PYDISTUTILS_BUILDARGS+="--disable-tcl --disable-tk"
WEBP_LIB_DEPENDS= libwebp.so:${PORTSDIR}/graphics/webp
WEBP_VARS= PYDISTUTILS_BUILDARGS+=--enable-webp
@@ -54,13 +54,16 @@ USE_GITHUB= yes
USES= python
USE_PYTHON= autoplist concurrent distutils
-PYDISTUTILS_BUILD_TARGET= build build_ext
-
GH_ACCOUNT= python-${PORTNAME}
GH_PROJECT= ${PORTNAME:C/p/P/}
CONFLICTS_INSTALL= py*-imaging-*
+.include <bsd.port.pre.mk>
+
+PYDISTUTILS_BUILD_TARGET= build build_ext
+PYDISTUTILS_BUILDARGS+= saveopts
+
post-install:
${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/PIL/*.so
@@ -70,4 +73,4 @@ do-test:
${PYTHON_CMD} selftest.py && \
${PYTHON_CMD} -m nose -vx Tests/test_*.py
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>