package/ogre: remove libglu dependency
PATCH 1/4 package/ogre: remove libglu dependency
"The inclusion of GLU is historical. [...] 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
Add -DGLEW_NO_GLU to get rid of the libglu dependency.
--- package/ogre/Config.in | 1 - package/ogre/ogre.mk | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-)
package/ogre/Config.in +0 -1
@@ -10,7 +10,6 @@ config BR2_PACKAGE_OGRE depends on BR2_USE_WCHAR # use wchar_t select BR2_PACKAGE_FREETYPE select BR2_PACKAGE_LIBFREEIMAGE - select BR2_PACKAGE_LIBGLU # GL/glu.h select BR2_PACKAGE_SDL2 select BR2_PACKAGE_SDL2_OPENGL select BR2_PACKAGE_SDL2_X11 # use wmInfo.info.x11
package/ogre/ogre.mk +6 -3
@@ -15,7 +15,6 @@ OGRE_DEPENDENCIES = host-pkgconf \ freetype \ libfreeimage \ libgl \ - libglu \ sdl2 \ xlib_libX11 \ xlib_libXaw \
@@ -23,12 +22,16 @@ OGRE_DEPENDENCIES = host-pkgconf \ xlib_libXrandr \ zziplib +OGRE_CXX_FLAGS = $(TARGET_CXXFLAGS) -DGLEW_NO_GLU + # Unbundle freetype and zziplib. # Disable java and nvidia cg support. OGRE_CONF_OPTS = -DOGRE_BUILD_DEPENDENCIES=OFF \ -DOGRE_BUILD_COMPONENT_JAVA=OFF \ -DOGRE_BUILD_PLUGIN_CG=OFF \ - -DOGRE_INSTALL_DOCS=OFF + -DOGRE_INSTALL_DOCS=OFF \ + -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -DGLEW_NO_GLU" \ + -DCMAKE_CXX_FLAGS="$(OGRE_CXX_FLAGS)" # Enable optional python component if python interpreter is present on the target. ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)
@@ -41,7 +44,7 @@ endif # Uses __atomic_fetch_add_8 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) -OGRE_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic" +OGRE_CXXFLAGS += -latomic endif $(eval $(cmake-package))
Signature · 1 line
2.26.2
PATCH 2/4 package/supertux: remove libglu dependency
"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.
--- package/supertux/Config.in | 1 - package/supertux/supertux.mk | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-)
package/supertux/Config.in +0 -1
@@ -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
package/supertux/supertux.mk +2 -1
@@ -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 \
Signature · 1 line
2.26.2
PATCH 3/4 package/libglew: do not depend on libglu
In reply to Bernd Kuhls"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
This patch prevents libglu being added to the "Requires:" section of glew.pc fixing libglew detection in the supertuxkart package
-- Checking for module 'glew>=2.1'
-- Package 'glu', required by 'glew', not found
after libglu is removed as dependency of supertuxkart.
Supertuxkart already uses -DGLEW_NO_GLU:
https://github.com/supertuxkart/stk-code/blob/master/CMakeLists.txt#L224
--- package/libglew/libglew.mk | 3 +++ 1 file changed, 3 insertions(+)
package/libglew/libglew.mk +3 -0
@@ -15,6 +15,7 @@ LIBGLEW_DEPENDENCIES = libgl xlib_libX11 xlib_libXext xlib_libXi xlib_libXmu # using $TARGET_CONFIGURE_OPTS breaks compilation define LIBGLEW_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + GLEW_NO_GLU="-DGLEW_NO_GLU" \ GLEW_DEST="/usr" LIBDIR="/usr/lib" \ AR="$(TARGET_AR)" CC="$(TARGET_CC)" \ LD="$(TARGET_CC)" STRIP="$(TARGET_STRIP)" \
@@ -23,12 +24,14 @@ endef define LIBGLEW_INSTALL_STAGING_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + GLEW_NO_GLU="-DGLEW_NO_GLU" \ GLEW_DEST="$(STAGING_DIR)/usr" LIBDIR="$(STAGING_DIR)/usr/lib" \ $(TARGET_CONFIGURE_OPTS) install endef define LIBGLEW_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + GLEW_NO_GLU="-DGLEW_NO_GLU" \ GLEW_DEST="$(TARGET_DIR)/usr" LIBDIR="$(TARGET_DIR)/usr/lib" \ $(TARGET_CONFIGURE_OPTS) install endef
Signature · 1 line
2.26.2
PATCH 4/4 package/supertuxkart: remove libglu dependency
In reply to Bernd Kuhls"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
Supertuxkart already uses -DGLEW_NO_GLU:
https://github.com/supertuxkart/stk-code/blob/master/CMakeLists.txt#L224
This patch only removes the dependency to libglu and depends on the previous patch of this series which removes glu from glew.pc.
--- package/supertuxkart/Config.in | 1 - package/supertuxkart/supertuxkart.mk | 1 - 2 files changed, 2 deletions(-)
package/supertuxkart/Config.in +0 -1
@@ -16,7 +16,6 @@ config BR2_PACKAGE_SUPERTUXKART select BR2_PACKAGE_LIBCURL select BR2_PACKAGE_LIBFRIBIDI select BR2_PACKAGE_LIBGLEW - select BR2_PACKAGE_LIBGLU select BR2_PACKAGE_LIBOGG select BR2_PACKAGE_LIBPNG select BR2_PACKAGE_LIBSQUISH
package/supertuxkart/supertuxkart.mk +0 -1
@@ -24,7 +24,6 @@ SUPERTUXKART_DEPENDENCIES = \ libfribidi \ libgl \ libglew \ - libglu \ libogg \ libpng \ libsquish \
Signature · 1 line
2.26.2
PATCH 4/4 package/supertuxkart: remove libglu dependency
Quoted 6 lines · Bernd Kuhls
"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
Quoted 6 lines
Supertuxkart already uses -DGLEW_NO_GLU:
https://github.com/supertuxkart/stk-code/blob/master/CMakeLists.txt#L224This patch only removes the dependency to libglu and depends on the previous patch of this series which removes glu from glew.pc.
LGTM. If it builds, it ships!
Thanks for the patch.
Ezequiel
Quoted 33 lines
Signed-off-by Bernd Kuhls <[email protected]>--- package/supertuxkart/Config.in | 1 - package/supertuxkart/supertuxkart.mk | 1 - 2 files changed, 2 deletions(-)package/supertuxkart/Config.in +0
-1@@ -16,7 +16,6 @@ config BR2_PACKAGE_SUPERTUXKART select BR2_PACKAGE_LIBCURL select BR2_PACKAGE_LIBFRIBIDI select BR2_PACKAGE_LIBGLEW - select BR2_PACKAGE_LIBGLU select BR2_PACKAGE_LIBOGG select BR2_PACKAGE_LIBPNG select BR2_PACKAGE_LIBSQUISHpackage/supertuxkart/supertuxkart.mk +0
-2@@ -24,7 +24,6 @@ SUPERTUXKART_DEPENDENCIES = \ libfribidi \ libgl \ libglew \ - libglu \ libogg \ libpng \ libsquish \ --2.26.2
PATCH 1/4 package/ogre: remove libglu dependency
In reply to Bernd KuhlsOn 2020-05-03 19:12 +0200, Bernd Kuhls spake thusly:
Quoted 8 lines
"The inclusion of GLU is historical. [...] 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-411641657Add -DGLEW_NO_GLU to get rid of the libglu dependency.
Signed-off-by Bernd Kuhls <[email protected]>---
[--SNIP--]
package/ogre/ogre.mk OGRE_DEPENDENCIES = host-pkgconf \ · line 25
Quoted 5 lines
package/ogre/ogre.mk +1
-0@@ -23,12 +22,16 @@ OGRE_DEPENDENCIES = host-pkgconf \ xlib_libXrandr \ zziplib +OGRE_CXX_FLAGS = $(TARGET_CXXFLAGS) -DGLEW_NO_GLU
Here, OGRE_CXX_FLAGS.
package/ogre/ogre.mk OGRE_DEPENDENCIES = host-pkgconf \ · line 34
Quoted 9 lines
package/ogre/ogre.mk +3
-1# Unbundle freetype and zziplib. # Disable java and nvidia cg support. OGRE_CONF_OPTS = -DOGRE_BUILD_DEPENDENCIES=OFF \ -DOGRE_BUILD_COMPONENT_JAVA=OFF \ -DOGRE_BUILD_PLUGIN_CG=OFF \ - -DOGRE_INSTALL_DOCS=OFF + -DOGRE_INSTALL_DOCS=OFF \ + -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -DGLEW_NO_GLU" \ + -DCMAKE_CXX_FLAGS="$(OGRE_CXX_FLAGS)"
Ditto here: OGRE_CXX_FLAGS.
package/ogre/ogre.mk endif · line 47
Quoted 8 lines
package/ogre/ogre.mk +1
-1# Enable optional python component if python interpreter is present on the target. ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)@@ -41,7 +44,7 @@ endif # Uses __atomic_fetch_add_8 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) -OGRE_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic" +OGRE_CXXFLAGS += -latomic
But here: OGRE_CXXFLAGS.
The last one looks like the better name, though, so please use that.
Regards,
Yann E. MORIN.
Quoted 10 lines
package/ogre/ogre.mk +0
-0endif $(eval $(cmake-package))Signature · 6 lines
2.26.2 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/4 package/ogre: remove libglu dependency
In reply to Bernd KuhlsBernd, All,
On 2020-05-03 19:12 +0200, Bernd Kuhls spake thusly:
Quoted 7 lines
"The inclusion of GLU is historical. [...] 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-411641657Add -DGLEW_NO_GLU to get rid of the libglu dependency.
Signed-off-by Bernd Kuhls <[email protected]>
Series applied to master, with the fixes already reported about the ogre CXXFLAGS mismatch.
Regards,
Yann E. MORIN.
Quoted 63 lines
--- package/ogre/Config.in | 1 - package/ogre/ogre.mk | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-)package/ogre/Config.in +0
-1@@ -10,7 +10,6 @@ config BR2_PACKAGE_OGRE depends on BR2_USE_WCHAR # use wchar_t select BR2_PACKAGE_FREETYPE select BR2_PACKAGE_LIBFREEIMAGE - select BR2_PACKAGE_LIBGLU # GL/glu.h select BR2_PACKAGE_SDL2 select BR2_PACKAGE_SDL2_OPENGL select BR2_PACKAGE_SDL2_X11 # use wmInfo.info.x11package/ogre/ogre.mk +6
-3@@ -15,7 +15,6 @@ OGRE_DEPENDENCIES = host-pkgconf \ freetype \ libfreeimage \ libgl \ - libglu \ sdl2 \ xlib_libX11 \ xlib_libXaw \@@ -23,12 +22,16 @@ OGRE_DEPENDENCIES = host-pkgconf \ xlib_libXrandr \ zziplib +OGRE_CXX_FLAGS = $(TARGET_CXXFLAGS) -DGLEW_NO_GLU + # Unbundle freetype and zziplib. # Disable java and nvidia cg support. OGRE_CONF_OPTS = -DOGRE_BUILD_DEPENDENCIES=OFF \ -DOGRE_BUILD_COMPONENT_JAVA=OFF \ -DOGRE_BUILD_PLUGIN_CG=OFF \ - -DOGRE_INSTALL_DOCS=OFF + -DOGRE_INSTALL_DOCS=OFF \ + -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -DGLEW_NO_GLU" \ + -DCMAKE_CXX_FLAGS="$(OGRE_CXX_FLAGS)" # Enable optional python component if python interpreter is present on the target. ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)@@ -41,7 +44,7 @@ endif # Uses __atomic_fetch_add_8 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) -OGRE_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic" +OGRE_CXXFLAGS += -latomic endif $(eval $(cmake-package))Signature · 6 lines
2.26.2 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'