openlierox fails to build without media-libs/libsdl[joystick]: CMakeFiles/openlierox.dir/src/client/CInput.o: In function `updateAxisStates()': CInput.cpp:(.text+0x13e): undefined reference to `SDL_JoystickGetAxis' CInput.cpp:(.text+0x156): undefined reference to `SDL_JoystickGetAxis' CInput.cpp:(.text+0x16e): undefined reference to `SDL_JoystickGetAxis' CInput.cpp:(.text+0x186): undefined reference to `SDL_JoystickGetAxis' CInput.cpp:(.text+0x19b): undefined reference to `SDL_JoystickGetAxis' Reproducible: Always Steps to Reproduce:
Märt, thanks for reporting! Albert, anything we can do to not make it require joystick?
I wonder that it compiles fine but fails to link. So libsdl[-joystick] still contains all the joystick headers, i.e. defines unavailable functions? That seem to be another bug in libsdl[-joystick] then. I don't know if there is some C preprocessor macro or something by SDL which states that joystick support was not compiled in (but as the headers already seem wrong, I guess there is not - or the libsdl ebuild is really messed up). I see two options: 1. I add a custom preprocessor makro check into the OLX source, where you can disable joystick support. Then we can just pass this to CMake. 2. Or we just patch the source directly via the ebuild in case of no joystick. Btw., another problem: In what case do you want to have joystick support? If that USE flag is set right now or if it was set for libsdl?
Or something like this: joystick? (libsdl[joystick]) !joystick? (libsdl) But it all will get messed up a bit... I wonder if it is worth or if we maybe just make it depending on libsdl[joystick] in all cases?
(In reply to comment #2) > 1. I add a custom preprocessor makro check into the OLX source, where you can > disable joystick support. Then we can just pass this to CMake. That would be cool for the next release. Any plans on a date yet? > 2. Or we just patch the source directly via the ebuild in case of no joystick. That would be cool before the next release unless that's coming around the corner in the next say 5 days. > Btw., another problem: In what case do you want to have joystick support? If > that USE flag is set right now or if it was set for libsdl? There's a global use flag "joystick". As you say, this is the way to: joystick? ( media-libs/libsdl[joystick] ) !joystick? ( media-libs/libsdl ) Always depending on media-libs/libsdl[joystick] is a no-go as it makes some people recompile SDL for nothing.
It's unprobable that we make a new release in the next 5 days. (Not impossible though.) Anyway, you can just take this patch (just applied to Git): http://openlierox.git.sourceforge.net/git/gitweb.cgi?p=openlierox/openlierox;a=patch;h=cb6fec84b098472fb3a132f892de1be0080ad576;hp=089ba5b8b78d58050bd40e2739d7f732540af82a I didn't added an option to CMake yet but you can just directly add it via CXX_FLAGS. Or should I add also a CMake option for it?
Anything that keeps the ebuild clean would be cool. Putting it into CPPFLAGS/CXXFLAGS dirtier than necessary IMHO. Thanks for working on it.
Then take also this patch. This one adds the option to CMake. Just pass DISABLE_JOYSTICK=Yes to it to disable it. http://openlierox.git.sourceforge.net/git/gitweb.cgi?p=openlierox/openlierox;a=patch;h=6b4e0a3ebcc2f43e1918ff84ddb25f87accbcd78
Thanks! All integrated now, closing. Please re-open if needed.