Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Feb 2016 10:54:01 +0000 (UTC)
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r409505 - head/graphics/py-pillow
Message-ID:  <201602251054.u1PAs1nx000515@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: koobs
Date: Thu Feb 25 10:54:01 2016
New Revision: 409505
URL: https://svnweb.freebsd.org/changeset/ports/409505

Log:
  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>

Modified:
  head/graphics/py-pillow/Makefile

Modified: head/graphics/py-pillow/Makefile
==============================================================================
--- head/graphics/py-pillow/Makefile	Thu Feb 25 10:48:30 2016	(r409504)
+++ head/graphics/py-pillow/Makefile	Thu Feb 25 10:54:01 2016	(r409505)
@@ -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}
 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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602251054.u1PAs1nx000515>