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]
This commit is contained in:
parent
dafc3395c8
commit
a2b4ecec50
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=396886
@ -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
|
||||
.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: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 "
|
||||
.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>
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user