Page MenuHomeFreeBSD

Use PYTHON_PKGNAMEPREFIX in DOCSDIR and EXAMPLESDIR
Needs RevisionPublic

Authored by mva on Oct 10 2014, 6:21 PM.

Details

Reviewers
rm
antoine
sbz
Group Reviewers
portmgr
Python
Summary

Use PYTHON_PKGNAMEPREFIX in DOCSDIR and EXAMPLESDIR to avoid the tedious usage of

DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}

in numerous Makefiles. This also is needed to avoid excessive usage of

USE_PYTHON= concurrent  # or
USES= uniquefiles:dirs

for the sake of getting examples or documentation installed.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

mva retitled this revision from to Use PYTHON_PKGNAMEPREFIX in DOCSDIR and EXAMPLESDIR.
mva updated this object.
mva edited the test plan for this revision. (Show Details)
mva added reviewers: Python, portmgr, rm.
antoine requested changes to this revision.Oct 10 2014, 6:30 PM
antoine added a reviewer: antoine.
antoine added a subscriber: antoine.

So, ports using python:build will have pyXX-foo for their DOCSDIR? this doesn't look right...

This revision now requires changes to proceed.Oct 10 2014, 6:30 PM

For some ports that run depend on python like devel/glib20, it doesn't make sense either.
People expect to find the docs in a place like share/doc/glib, not share/doc/pyXX-glib

Oh my, I completely forgot about the non-Python world, when doing this. Let me think about those cases once more and how to identify the ports. A quick solution that comes to my mind would be something along the lines

.if  ${PKGNAMEPREFIX} == ${PYTHON_PKGNAMEPREFIX}
DOCSDIR= ...
EXAMPLESDIR= ...
.endif
In D934#15986, @mva wrote:
.if  ${PKGNAMEPREFIX} == ${PYTHON_PKGNAMEPREFIX}
DOCSDIR= ...
EXAMPLESDIR= ...
.endif

@mva Can you update the revision with your suggested code above?