I tried to build the FreeBSD port math/py-matplotlib (svn r397069) with all the optional components turned off and observed a failure. Currently the post-install rule in Makefile unconditionally tries to strip .so's which are generated by optional components, making them effectively rather non-optional. If I understood correctly.
This hasty patch seems to fix the problem: --- Makefile.sshbak 2015-09-28 15:54:16.906945572 +0300 +++ Makefile 2015-09-28 15:54:16.910010137 +0300 @@ -78,9 +78,6 @@ 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 @@ -90,6 +87,15 @@ ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/_cntr.so ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/ft2font.so +post-install-GTKAGGBACKEND-on: + ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/backends/_gtkagg.so + +post-install-TKAGGBACKEND-on: + ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/backends/_tkagg.so + +post-install-GTKBACKEND-on: + ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/matplotlib/backends/_backend_gdk.so + post-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${CP} -R ${WRKSRC}/examples/ ${STAGEDIR}${EXAMPLESDIR}
I approve the patch.
Tomi, can you please include your patch as an attachment, and also attach QA results for: * portlint -AC * poudriere testport (or bulk -t) with OPTIONS disabled
1004:my-dev-freebsd-10.2:/usr/ports/math/py-matplotlib> portlint -AC WARN: Makefile: [61]: possible use of "${CHMOD}" found. Use @(owner,group,mode) syntax or @owner/@group operators in pkg-plist instead. WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy. WARN: Consider to set DEVELOPER=yes in /etc/make.conf 0 fatal errors and 3 warnings found. 1004:my-dev-freebsd-10.2:/usr/ports/math/py-matplotlib>
Created attachment 161518 [details] Tentative fix N.B. the filenames in the patch are questionable. Apologies.
Poudrie: I failed to set up the thing in 15 minutes and gave up. Sloppy me.
I got hit by this - let me check on my poudriere.
I made a few fixes. - Helpers were ok from the patch - WXAGGBACKEND_VARS was broken and the WX option caused a build failure - Fixed some permissions in .py files - Sorted entries in post-install - Some whitespace :) Attaching patch...
Created attachment 161796 [details] Misc. fixes
Thanks! I approve the patch.
Comment on attachment 161796 [details] Misc. fixes Over to you after for commit after QA Jimmy
Poudriere good for all options - commit on the way...
A commit references this bug: Author: olgeni Date: Wed Oct 7 12:50:43 UTC 2015 New revision: 398761 URL: https://svnweb.freebsd.org/changeset/ports/398761 Log: Unbreak math/py-matplotlib when some options are disabled (original PR). The previous version tried to ${STRIP} non-existing files. Some additional fixes: - Fix WXAGGBACKEND_VARS, which was overwritten and broke the WX build - Fix permissions in .py files - Sort entries in post-install - Whitespace fixes PR: 203417 Submitted by: Tomi Kause Reviewed by: olgeni Approved by: maintainer Changes: head/math/py-matplotlib/Makefile
Looks fixed :)