Source: dustrac
Version: 2.0.1-1
Severity: important
Tags: patch

https://buildd.debian.org/status/package.php?p=dustrac&suite=sid

...
-- Compiling for OpenGL 2.1
-- Using QOpenGLFunctions
CMake Error at 
/usr/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenGL (missing: OPENGL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:377 
(_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.9/Modules/FindOpenGL.cmake:170 
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:98 (find_package)


-- Configuring incomplete, errors occurred!



It builds with the attached change plus the following change:

--- debian/rules.old    2018-01-28 06:38:11.280174490 +0000
+++ debian/rules        2018-01-28 06:45:40.960601539 +0000
@@ -1,16 +1,23 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
+
 export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
 
 %:
        dh $@ --buildsystem cmake
 
+ifneq (,$(filter $(DEB_HOST_ARCH), armel armhf))
+    GLES = -DGLES=on
+endif
+
 override_dh_auto_configure:
        dh_auto_configure -Scmake -- \
          -DReleaseBuild=ON \
          -DBIN_PATH=/usr/games/ \
          -DDOC_PATH=/usr/share/doc/dustracing2d/ \
-         -DDATA_PATH=/usr/share/games/dustracing2d/
+         -DDATA_PATH=/usr/share/games/dustracing2d/ \
+         ${GLES}
 
 ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
 override_dh_auto_test:
Description: Fix the GLES build
Author: Adrian Bunk <b...@debian.org>

--- dustrac-2.0.1.orig/src/game/MiniCore/src/Graphics/MCGLEW
+++ dustrac-2.0.1/src/game/MiniCore/src/Graphics/MCGLEW
@@ -13,6 +13,6 @@
       #include <GL/glext.h>
     #endif
   #else
-    #include <GLES/gl.h>
+    #include <QtOpenGL>
   #endif
 #endif
--- dustrac-2.0.1.orig/src/game/MiniCore/src/Graphics/mcglscene.cc
+++ dustrac-2.0.1/src/game/MiniCore/src/Graphics/mcglscene.cc
@@ -127,7 +127,9 @@ void MCGLScene::initialize()
     glEnable(GL_CULL_FACE);
     glCullFace(GL_BACK);
     glDepthFunc(GL_LEQUAL);
+#ifndef __MC_GLES__
     glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
+#endif
     glClearColor(0.0, 0.0, 0.0, 0.0);
 #ifndef __MC_GLES__
     glShadeModel(GL_SMOOTH);

Reply via email to