Page MenuHomeFreeBSD

Change the way opt_USE is worked on, so that it is not evaluated too early.
ClosedPublic

Authored by mat on Oct 7 2016, 7:03 AM.

Details

Reviewers
brnrd
Group Reviewers
portmgr
Commits
rP423859: Change the way opt_USE is parsed.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mat updated this revision to Diff 21131.Oct 7 2016, 7:03 AM
mat retitled this revision from to Change the way opt_USE is worked on, so that it is not evaluated too early..
mat updated this object.
mat edited the test plan for this revision. (Show Details)
mat added a reviewer: portmgr.Oct 7 2016, 8:15 AM
jrm added a subscriber: jrm.Oct 7 2016, 3:30 PM
jrm added inline comments.Oct 7 2016, 3:33 PM
Mk/bsd.options.mk
500 ↗(On Diff #21131)

Would a check here and on line 550 be useful to determine if USE_${_u:tu} already contains _u?

For example,

OPT1_USE= ldconfig=${PREFIX}/lib/blah/lib
OPT2_USE= ldconfig=${PREFIX}/lib/blah/lib

results in USE_LDCONFIG containing the same path twice.

brnrd added a reviewer: brnrd.Oct 7 2016, 7:12 PM
brnrd accepted this revision.Oct 7 2016, 7:21 PM
brnrd edited edge metadata.

Tested this and it results in the same behavior as an empty USE_LDCONFIG= .

This revision is now accepted and ready to land.Oct 7 2016, 7:21 PM
mat added inline comments.Oct 12 2016, 10:31 AM
Mk/bsd.options.mk
500 ↗(On Diff #21131)

Well, in this case, you are asking for it to be put twice.

What you want to do is:

.if ${PORT_OPTIONS:MOPT1} || ${PORT_OPTIONS:MOPT2}
USE_LDCONFIG+= ${PREFIX}/lib/blah/lib
.endif

This revision was automatically updated to reflect the committed changes.