Bug 202205 - math/py-matplotlib: [patch] install examples in directory using python version
Summary: math/py-matplotlib: [patch] install examples in directory using python version
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-08-09 19:47 UTC by Matthieu Volat
Modified: 2015-09-15 08:55 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (mainland)


Attachments
set EXAMPLESDIR to a python-version based name. (376 bytes, text/plain)
2015-08-09 19:47 UTC, Matthieu Volat
no flags Details
Use uniquefiles:dirs (614 bytes, patch)
2015-08-25 15:06 UTC, Matthieu Volat
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Volat 2015-08-09 19:47:33 UTC
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,
Comment 1 Geoffrey Mainland 2015-08-11 12:56:00 UTC
I approve the patch.

Cheers,
Geoff
Comment 2 Jan Beich freebsd_committer freebsd_triage 2015-08-25 09:29:39 UTC
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 ?
Comment 3 Matthieu Volat 2015-08-25 12:51:01 UTC
Would it work when the directory is copied by a post-install action?
Comment 4 Jan Beich freebsd_committer freebsd_triage 2015-08-25 14:39:48 UTC
(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.
Comment 5 Matthieu Volat 2015-08-25 15:06:56 UTC
Created attachment 160350 [details]
Use uniquefiles:dirs

Indeed, tested and checked.
Comment 6 Matthieu Volat 2015-08-28 07:53:51 UTC
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 7 Jan Beich freebsd_committer freebsd_triage 2015-08-28 10:52:42 UTC
Comment on attachment 160350 [details]
Use uniquefiles:dirs

Looks OK. Leaving for assignee to QA and commit.
Comment 8 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2015-09-05 07:43:58 UTC
Would anyone mind if I replace a couple of lines with OPTIONS_SUB=yes ?
Comment 9 Matthieu Volat 2015-09-05 09:28:42 UTC
Not, me, for sure. That will also reduce the size of the next patch to propose to add the Qt backend option.

Thanks
Comment 10 Jan Beich freebsd_committer freebsd_triage 2015-09-05 09:39:08 UTC
(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>
Comment 11 commit-hook freebsd_committer freebsd_triage 2015-09-14 10:00:20 UTC
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
Comment 12 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2015-09-15 08:55:16 UTC
Committed with major changes like converting it to OPTIONSNG