Page MenuHomeFreeBSD

games/*cube*: convert to option helpers and dep fixes
ClosedPublic

Authored by jbeich on Feb 12 2015, 10:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 17, 7:55 PM
Unknown Object (File)
Wed, Jul 17, 4:25 AM
Unknown Object (File)
Mon, Jul 8, 6:09 AM
Unknown Object (File)
Mon, Jul 8, 5:31 AM
Unknown Object (File)
Sat, Jul 6, 11:22 AM
Unknown Object (File)
Wed, Jul 3, 6:37 PM
Unknown Object (File)
Jun 24 2024, 4:19 PM
Unknown Object (File)
May 31 2024, 9:11 AM
Subscribers

Details

Reviewers
AMDmi3
bapt
Summary

Improve style, consistency and fix minor issues in Cube-based ports

  • Convert to option helpers
  • Drop unused libGLU dependency (except for games/cube)
  • Track direct dependency on libX11 (for XFetchBytes)
  • Drop redundant MKDIR before COPYTREE_* macros [1]
  • Wrap cd related commands with parentheses [1]
  • Wrap lines exceeding 80 characters
  • Bump PORTREVISION to pick up changes in dependencies, plist (assaultcube) and catch regressions early [1]
  • games/assaultcube: CLIENT uses openal/vorbisfile *instead* of SDL_mixer
  • games/assaultcube: drop unused gettext-tools dependency [1]
  • games/assaultcube: convert to PLIST_DIRS [1]
  • games/assaultcube: add patch for source/src/bot/bot_waypoint.cpp file to fix "invalid source encoding" warning [1]
  • games/{cube,bloodfrontier}: MASTER or SERVER don't need libX11
  • games/redeclipse: tell how large the package is in IGNORE message
  • games/redeclipse: use PORTDATA to hold list of dirs for COPYTREE_SHARE

nReviewed by: acm, amdmi3, bapt, lightside@gmx.com (maintainers)
Submitted by: lightside@gmx.com [1]
Requested by: lightside@gmx.com [1]
Approved by: bapt (mentor)

IMPORTANT: The first item is the most complex by trying to eliminate some .if conditionals.
Test Plan

Diff Detail

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

Event Timeline

jbeich retitled this revision from to games/*cube*: convert to option helpers and dep fixes.
jbeich updated this object.
jbeich edited the test plan for this revision. (Show Details)
jbeich added reviewers: bapt, AMDmi3.

Two reviewers have no phabric account. I wonder if the whole diff should have been in bugzilla instead.

I'll review it tomorrow. If it's good, PR will only be required for assaultcube. Of other ports two are mine, one unmaintained and one belongs acm@ who is generally inactive so bapt@ OK'd to commit for him.

Drop implicit USE_SDL=sdl (see _REQUIRES_xxx in bsd.sdl.mk)

Please don't. As long as the game explicitly links with -lSDL, there should be explicit USE_SDL=sdl.

In D1831#4, @AMDmi3 wrote:

Drop implicit USE_SDL=sdl (see _REQUIRES_xxx in bsd.sdl.mk)

Please don't. As long as the game explicitly links with -lSDL, there should be explicit USE_SDL=sdl.

Even though any valid non-empty USE_SDL= adds libSDL.so or libSDL2.so to LIB_DEPENDS ? This is similar how many ports with USE_GNOME=gtk20 actually mean USE_GNOME=glib20 gtk20. Explicit dependencies are only useful if there's a way to avoid them and I don't mean indirect linking.

@mva: Can SDL libs be used standalone? For example, SDL_image without SDL itself.

In D1831#5, @jbeich wrote:
In D1831#4, @AMDmi3 wrote:

Drop implicit USE_SDL=sdl (see _REQUIRES_xxx in bsd.sdl.mk)

Please don't. As long as the game explicitly links with -lSDL, there should be explicit USE_SDL=sdl.

Even though any valid non-empty USE_SDL= adds libSDL.so or libSDL2.so to LIB_DEPENDS ? This is similar how many ports with USE_GNOME=gtk20 actually mean USE_GNOME=glib20 gtk20. Explicit dependencies are only useful if there's a way to avoid them and I don't mean indirect linking.

@mva: Can SDL libs be used standalone? For example, SDL_image without SDL itself.

No. All (official) SDL_XXX libs also have a -lSDL linker target in their .pc and .la files. And all of them require a call to the SDL_Init() function.

Even though any valid non-empty USE_SDL= adds libSDL.so or libSDL2.so to LIB_DEPENDS ?

Yes. Actually, this may not even be correct, or may be changed in future.
What matters though is not what ports framework implicitly assumes, but what port actually uses. As long as it calls sdl_config or links with -lSDL, which belong to SDL, it should explicitly depend on SDL. Same with gnome stuff.

No. All (official) SDL_XXX libs also have a -lSDL linker target in their .pc and .la files. And all of them require a call to the SDL_Init() function.

That is not correct. At least SDL2_ttf does need SDL_Init and its documentation explicitly says so.

In D1831#8, @AMDmi3 wrote:

Even though any valid non-empty USE_SDL= adds libSDL.so or libSDL2.so to LIB_DEPENDS ?

Yes. Actually, this may not even be correct, or may be changed in future.
What matters though is not what ports framework implicitly assumes, but what port actually uses. As long as it calls sdl_config or links with -lSDL, which belong to SDL, it should explicitly depend on SDL. Same with gnome stuff.

No. All (official) SDL_XXX libs also have a -lSDL linker target in their .pc and .la files. And all of them require a call to the SDL_Init() function.

That is not correct. At least SDL2_ttf does need SDL_Init and its documentation explicitly says so.

I did not say anything different. Please reread, what I wrote - we are on the same page.

jbeich edited edge metadata.
  • Add back USE_SDL=sdl
  • Incorporate and extend some changes by lightside@gmx.com [1]
  • Wrap lines exceeding 80 characters
I can't seem to figure out how to update Summary/Test Plan via arc diff --update.
In D1831#8, @AMDmi3 wrote:

Even though any valid non-empty USE_SDL= adds libSDL.so or libSDL2.so to LIB_DEPENDS ?

Yes. Actually, this may not even be correct, or may be changed in future.

D1831#7 has a rationale for "now". SDL_* libs are similar to plugins, except they aren't dlopened. When the "future" arrives surely there'd be an -exp run just before.

What matters though is not what ports framework implicitly assumes, but what port actually uses. As long as it calls sdl_config or links with -lSDL, which belong to SDL, it should explicitly depend on SDL. Same with gnome stuff.

SDL_Init() or -lSDL cannot be avoided when using any -lSDL_foo. I'll take ambivalent route by leaving ports using both styles as is. Not enough justification to convert to either side.

jbeich edited the test plan for this revision. (Show Details)
jbeich updated this object.
jbeich edited the test plan for this revision. (Show Details)

Restore changes by games/assaultcube's maintainer I excluded in hope to not bump PORTREVISION.

  • Bump PORTREVISION to pick up changes in dependencies, plist and catch regressions early [1]
  • games/assaultcube: add patch for source/src/bot/bot_waypoint.cpp file to fix "invalid source encoding" warning

Requested by: lightside@gmx.com [1]

bapt edited edge metadata.

very good !

This revision is now accepted and ready to land.Feb 16 2015, 7:56 AM
AMDmi3 edited edge metadata.