Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Sep 2015 10:00:02 +0000 (UTC)
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r396886 - in head/math/py-matplotlib: . files
Message-ID:  <201509141000.t8EA02Pg084089@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bofh
Date: Mon Sep 14 10:00:02 2015
New Revision: 396886
URL: https://svnweb.freebsd.org/changeset/ports/396886

Log:
  math/py-matplotlib: Add uniquefiles:dirs for version specific files [1]
  
  - Convert to OPTIONSNG
  - Convert patch files to be 'make makepatch' compatible
  - Depreciate bsd.port.options.mk
  - Add STRIP_CMD for shared objects
  
  PR:		202205 [1]
  Submitted by:	mazhe@alkumuna.eu [1]

Modified:
  head/math/py-matplotlib/Makefile
  head/math/py-matplotlib/files/patch-setup.cfg

Modified: head/math/py-matplotlib/Makefile
==============================================================================
--- head/math/py-matplotlib/Makefile	Mon Sep 14 08:28:57 2015	(r396885)
+++ head/math/py-matplotlib/Makefile	Mon Sep 14 10:00:02 2015	(r396886)
@@ -20,78 +20,44 @@ RUN_DEPENDS=	${PYNUMPY} \
 		${PYTHON_PKGNAMEPREFIX}pytz>=0:${PORTSDIR}/devel/py-pytz \
 		${PYTHON_PKGNAMEPREFIX}parsing>=0:${PORTSDIR}/devel/py-parsing
 
-USES=		pkgconfig shebangfix python
-USE_PYTHON=	distutils autoplist
+USES=		pkgconfig python shebangfix uniquefiles:dirs
+USE_PYTHON=	autoplist distutils
 CFLAGS+=	-I${LOCALBASE}/include
 
 OPTIONS_DEFINE=	EXAMPLES GTKBACKEND GTKAGGBACKEND TKAGGBACKEND WXAGGBACKEND
 OPTIONS_DEFAULT=	GTKBACKEND GTKAGGBACKEND TKAGGBACKEND
+OPTIONS_SUB=		yes
 GTKBACKEND_DESC=	GTK backend support
+GTKBACKEND_VARS=	GTK_BACKEND=True
+GTKBACKEND_VARS_OFF=	GTK_BACKEND=False
+GTKBACKEND_USE=		GNOME=gtk20,pygtk2
 GTKAGGBACKEND_DESC=	GTKAgg backend support
+GTKAGGBACKEND_USE=	GNOME=gtk20,pygtk2
+GTKAGGBACKEND_VARS=	GTKAGG_BACKEND=True
+GTKAGGBACKEND_VARS_OFF=	GTKAGG_BACKEND=False
 TKAGGBACKEND_DESC=	TKAgg backend support
+TKAGGBACKEND_BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}tkinter>0:${PORTSDIR}/x11-toolkits/py-tkinter
+TKAGGBACKEND_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}tkinter>0:${PORTSDIR}/x11-toolkits/py-tkinter
+TKAGGBACKEND_USES=	tk:run
+TKAGGBACKEND_VARS=	TKAGG_BACKEND=True
+TKAGGBACKEND_VARS_OFF=	TKAGG_BACKEND=False
 WXAGGBACKEND_DESC=	WXAgg backend support
+WXAGGBACKEND_USE=	WX=2.8+
+WXAGGBACKEND_VARS=	WX_COMPS=python:lib,WX_UNICODE=yes
+WXAGGBACKEND_CONFIGURE_ENV=	WX_CONFIG="${WX_CONFIG}"
+WXAGGBACKEND_VARS=	WXAGG_BACKEND=True
+WXAGGBACKEND_VARS_OFF=	WXAGG_BACKEND=False
 
 PORTEXAMPLES=	*
+UNIQUENAME=	${PORTNAME}
 
-.include <bsd.port.options.mk>
-
-.if defined(PACKAGE_BUILDING) && \
-    ( ${PORT_OPTIONS:MGTKBACKEND} || ${PORT_OPTIONS:MGTKAGGBACKEND} || \
-    ${PORT_OPTIONS:MTKAGGBACKEND} || ${PORT_OPTIONS:MWXAGGBACKEND} )
-BUILD_DEPENDS+=	Xvfb:${PORTSDIR}/x11-servers/xorg-vfbserver
-.endif
-
-.if ${PORT_OPTIONS:MGTKBACKEND} || ${PORT_OPTIONS:MGTKAGGBACKEND}
-USE_GNOME=	gtk20 pygtk2
-.endif
-
-.if ${PORT_OPTIONS:MGTKBACKEND}
-GTK_BACKEND=	True
-
-PLIST_SUB+=	GTKBACKEND=""
-.else
-GTK_BACKEND=	False
-
-PLIST_SUB+=	GTKBACKEND="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MGTKAGGBACKEND}
-GTKAGG_BACKEND=	True
-
-PLIST_SUB+=	GTKAGGBACKEND=""
-.else
-GTKAGG_BACKEND=	False
-
-PLIST_SUB+=	GTKAGGBACKEND="@comment "
+.if defined(PACKAGE_BUILDING)
+GTKBACKEND_BUILD_DEPENDS=	Xvfb:${PORTSDIR}/x11-servers/xorg-vfbserver
+GTKAGGBACKEND_BUILD_DEPENDS=	Xvfb:${PORTSDIR}/x11-servers/xorg-vfbserver
+TKAGGBACKEND_BUILD_DEPENDS=	Xvfb:${PORTSDIR}/x11-servers/xorg-vfbserver
+WXAGGBACKEND_BUILD_DEPENDS=	Xvfb:${PORTSDIR}/x11-servers/xorg-vfbserver
 .endif
 
-.if ${PORT_OPTIONS:MTKAGGBACKEND}
-BUILD_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}tkinter>0:${PORTSDIR}/x11-toolkits/py-tkinter
-RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}tkinter>0:${PORTSDIR}/x11-toolkits/py-tkinter
-
-USES+=		tk:run
-
-TKAGG_BACKEND=	True
-
-PLIST_SUB+=	TKAGGBACKEND=""
-.else
-TKAGG_BACKEND=	False
-
-PLIST_SUB+=	TKAGGBACKEND="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MWXAGGBACKEND}
-USE_WX=		2.8+
-WX_COMPS=	python:lib
-WX_UNICODE=	yes
-CONFIGURE_ENV+=	WX_CONFIG="${WX_CONFIG}"
-
-WXAGG_BACKEND=	True
-.else
-WXAGG_BACKEND=	False
-.endif
-
-EXAMPLESDIR=	${PREFIX}/share/examples/py-${PORTNAME}
 post-extract:
 	${CHMOD} -R ga+r ${WRKDIR}
 
@@ -110,10 +76,23 @@ post-patch:
 			 -e 's|%%WXAGG_BACKEND%%|${WXAGG_BACKEND}|g' \
 		${WRKSRC}/setup.cfg
 
-.if ${PORT_OPTIONS:MEXAMPLES}
 post-install:
+	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/_image.so
+	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/backends/_backend_agg.so
+	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/backends/_gtkagg.so
+	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/backends/_tkagg.so
+	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/backends/_backend_gdk.so
+	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/_qhull.so
+	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/ttconv.so
+	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/_delaunay.so
+	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/_png.so
+	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/_tri.so
+	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/_path.so
+	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/_cntr.so
+	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/ft2font.so
+
+post-install-EXAMPLES-on:
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
 	${CP} -R ${WRKSRC}/examples/ ${STAGEDIR}${EXAMPLESDIR}
-.endif
 
 .include <bsd.port.mk>

Modified: head/math/py-matplotlib/files/patch-setup.cfg
==============================================================================
--- head/math/py-matplotlib/files/patch-setup.cfg	Mon Sep 14 08:28:57 2015	(r396885)
+++ head/math/py-matplotlib/files/patch-setup.cfg	Mon Sep 14 10:00:02 2015	(r396886)
@@ -1,5 +1,5 @@
---- setup.cfg	1969-12-31 19:00:00.000000000 -0500
-+++ setup.cfg	2010-07-06 10:44:15.000000000 -0400
+--- setup.cfg.orig	2015-09-05 07:46:40 UTC
++++ setup.cfg
 @@ -0,0 +1,83 @@
 +# Rename this file to setup.cfg to modify matplotlib's
 +# build options.



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