Bug 241790 - [exp-run] remove compat shims for USE_XORG and USE_GL
Summary: [exp-run] remove compat shims for USE_XORG and USE_GL
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
Depends on:
Reported: 2019-11-07 20:52 UTC by Niclas Zeising
Modified: 2019-11-29 08:10 UTC (History)
1 user (show)

See Also:

v1 (2.07 KB, patch)
2019-11-07 20:52 UTC, Niclas Zeising
no flags Details | Diff
v2 (12.00 KB, patch)
2019-11-08 22:53 UTC, Niclas Zeising
no flags Details | Diff
v3 (2.11 KB, patch)
2019-11-09 08:59 UTC, Niclas Zeising
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Niclas Zeising freebsd_committer 2019-11-07 20:52:33 UTC
Created attachment 208953 [details]

All ports are believed to have been converted to use USES=xorg and USES=gl as needed, so it is time to remove the compat shims from bsd.port.mk.
Attached patch removes those, and puts error messages about it into bsd.sanity.mk.
Please give it an exp run, with DEV_ERRORs enabled, to catch any ports where I've missed to convert them to USES=xorg USES=gl.

Thank you!
Comment 1 Tobias Kortkamp freebsd_committer 2019-11-08 15:03:58 UTC
Many of the gstreamer ports still have problems.  For example:

$ make -C multimedia/gstreamer1-plugins-libde265 check-sanity
/!\ gstreamer1-plugins-libde265-1.14.4: Makefile warnings, please consider fixing /!\

Using USE_XORG alone is deprecated, please use USES=xorg

Using USE_GL alone is deprecated, please add USES=gl.
Comment 2 Niclas Zeising freebsd_committer 2019-11-08 15:17:37 UTC
(In reply to Tobias Kortkamp from comment #1)

Thanks, I'll need to look into this, and the other examples you sent mail about.
Comment 3 Niclas Zeising freebsd_committer 2019-11-08 21:43:03 UTC
I think I have a fix, at least for the gstreamer issue.  Basically, what I do is I check both if USE_XORG is defined and if it's not empty.  It seems that some ports define USE_XORG, but to an empty string.

I think that's also what happens in gl.mk, and why the fix you suggested per mail Tobias solves the issue there.

I'm going to give this patch some more beating, then I'll update it here.
Comment 4 Niclas Zeising freebsd_committer 2019-11-08 22:53:08 UTC
Created attachment 208987 [details]

Here is an updated patch, that also checks if USE_XORG and USE_GL is not empty, just not that they are defined.
Comment 5 Tobias Kortkamp freebsd_committer 2019-11-09 04:31:01 UTC
Comment on attachment 208987 [details]

The attachment seems to be the Vim swap file of the patch.
Comment 6 Niclas Zeising freebsd_committer 2019-11-09 08:59:40 UTC
Created attachment 208992 [details]

And here is the actual patch, not the vim swap file I accidentally uploaded last night.
Comment 7 Tobias Kortkamp freebsd_committer 2019-11-16 07:20:38 UTC
(In reply to Niclas Zeising from comment #3)
Still not sure what I think about allowing empty USE_XORG and USE_GL.
Patching GStreamer ports to prevent this is possible [1] and is also
possible for Mk/Uses/gl.mk [2].

[1] https://reviews.freebsd.org/D22406
[2] https://lists.freebsd.org/pipermail/svn-ports-head/2019-November/224968.html
Comment 8 Niclas Zeising freebsd_committer 2019-11-29 08:10:27 UTC
(In reply to Tobias Kortkamp from comment #7)

I know it's possible, but this seems to be a not uncommon pattern, so it might be better to just support empty USE_FOO= variables.

I can make the change, but I still need an exp run to catch any fallout, I don't have the build power to run through all affected ports myself.