package/supertux: remove libglu dependency
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sun, 3 May 2020 17:12:25 +0000 (19:12 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sun, 3 May 2020 17:46:12 +0000 (19:46 +0200)
"The inclusion of GLU is historical. [...] It's not needed for GLEW to
 build or run, but it's opt-out that reason. I'd recommend using
 -DGLEW_NO_GLU since GLU is rarely seen in modern codebases nowadays."
https://github.com/nigels-com/glew/issues/192#issuecomment-411641657

Each package using glew.h has to decide whether to use the opt-out for
glu or not. Since supertux does not need libglu we can safely remove
the dependency by adding -DGLEW_NO_GLU to TARGET_CXXFLAGS.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/supertux/Config.in
package/supertux/supertux.mk

index c77d1ae2bd2927a9e166321fa700f7edba3cbde3..5cacdd658eaa21814970c2bbcefa3c3348afa02a 100644 (file)
@@ -17,7 +17,6 @@ config BR2_PACKAGE_SUPERTUX
        select BR2_PACKAGE_FREETYPE
        select BR2_PACKAGE_LIBCURL
        select BR2_PACKAGE_LIBGLEW
-       select BR2_PACKAGE_LIBGLU # GL/glu.h
        select BR2_PACKAGE_LIBOGG
        select BR2_PACKAGE_LIBPNG
        select BR2_PACKAGE_LIBVORBIS
index 5842b17ba470021605032eb401002ac22ca4bdb7..e4a4630918bf9ea0e3a326ae08cd323bec6fac6a 100644 (file)
@@ -15,7 +15,7 @@ SUPERTUX_LICENSE_FILES = LICENSE.txt data/AUTHORS
 
 # Use bundled squirrel, tinygettext sexp-cpp packages which are hardcoded in
 # the CMake build system.
-SUPERTUX_DEPENDENCIES = host-pkgconf boost freetype libcurl libgl libglew libglu \
+SUPERTUX_DEPENDENCIES = host-pkgconf boost freetype libcurl libgl libglew \
        libogg libpng libvorbis openal physfs sdl2 sdl2_image
 
 # CMAKE_BUILD_TYPE=Release: disable profiling code (-pg)
@@ -30,6 +30,7 @@ SUPERTUX_DEPENDENCIES = host-pkgconf boost freetype libcurl libgl libglew libglu
 # ENABLE_OPENGLES2=OFF: Disable opengles2 for now.
 SUPERTUX_CONF_OPTS += \
        -DCMAKE_BUILD_TYPE=Release \
+       -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -DGLEW_NO_GLU" \
        -DENABLE_BOOST_STATIC_LIBS=OFF \
        -DBUILD_DOCUMENTATION=OFF \
        -DENABLE_OPENGL=ON \