Created attachment 159702 [details] set EXAMPLESDIR to a python-version based name. Hi, Installing py-matplotlib in multiple python variants results in failure if examples are to be installed because ${EXAMPLESDIR} is not instantiated with a unique name depending on the python version selected. Here's a simple patch to fix the issue, if the team would be as kind as to look at it. Regards,
I approve the patch. Cheers, Geoff
Comment on attachment 159702 [details] set EXAMPLESDIR to a python-version based name. >-EXAMPLESDIR= ${PREFIX}/share/examples/py-${PORTNAME} >+EXAMPLESDIR= ${PREFIX}/share/examples/py${PYTHON_SUFFIX}-${PORTNAME} Why not replace with either USES=uniquefiles:dirs or USE_PYTHON=concurrent ?
Would it work when the directory is copied by a post-install action?
(In reply to Matthieu Volat from comment #3) > Would it work when the directory is copied by a post-install action? Why not? make(1) uses lazy evaluation for variables. post-install is called (vs. defined) from bsd.port.post.mk after Mk/Uses/uniquefiles.mk was already included assigning new EXAMPLESDIR value. Try comparing |make makeplist| output.
Created attachment 160350 [details] Use uniquefiles:dirs Indeed, tested and checked.
Sorry to bump the issue, but is the patch ok for commit? I am preparing another request (to enable Qt) and would not bury myself in open PR...
Comment on attachment 160350 [details] Use uniquefiles:dirs Looks OK. Leaving for assignee to QA and commit.
Would anyone mind if I replace a couple of lines with OPTIONS_SUB=yes ?
Not, me, for sure. That will also reduce the size of the next patch to propose to add the Qt backend option. Thanks
(In reply to Muhammad Moinur Rahman from comment #8) Why stop with only a few lines? It's possible to convert more per /usr/ports/CHANGES from 20150828, from 20150701 and eventually kill .include <bsd.port.options.mk>
A commit references this bug: Author: bofh Date: Mon Sep 14 10:00:03 UTC 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] Changes: head/math/py-matplotlib/Makefile head/math/py-matplotlib/files/patch-setup.cfg
Committed with major changes like converting it to OPTIONSNG