diff --git a/build20-libGL.patch b/build20-libGL.patch new file mode 100644 index 0000000..47c1275 --- /dev/null +++ b/build20-libGL.patch @@ -0,0 +1,12 @@ +diff -ur widelands-build20/CMakeLists.txt widelands-build20_fix/CMakeLists.txt +--- widelands-build20/CMakeLists.txt 2019-05-02 07:23:39.000000000 +0200 ++++ widelands-build20_fix/CMakeLists.txt 2019-07-10 21:43:46.945029296 +0200 +@@ -181,7 +181,7 @@ + + # This is set to avoid linker errors when using GLVND-libs on Linux + if("${OpenGL_GL_PREFERENCE}" STREQUAL "GLVND") +- set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lGL") ++ link_libraries("GL") + add_compile_definitions(WL_USE_GLVND) + message(STATUS "Adding linker flags for GLVND.") + endif() diff --git a/widelands.changes b/widelands.changes index 42a437c..ad743c1 100644 --- a/widelands.changes +++ b/widelands.changes @@ -4,6 +4,7 @@ Wed Jul 10 16:50:24 UTC 2019 - Dirk Stoecker - update to build 20 Changelog see https://www.widelands.org/changelog/ Drop patch widelands-build19-fix-build-icu.patch (included upstream) + Add build20-libGL.patch to fix build order ------------------------------------------------------------------- Tue Oct 9 08:25:07 UTC 2018 - Guillaume GARDET diff --git a/widelands.spec b/widelands.spec index 5876cbd..9df73f0 100644 --- a/widelands.spec +++ b/widelands.spec @@ -24,6 +24,8 @@ License: GPL-2.0-or-later Group: Amusements/Games/Strategy/Other Url: http://www.widelands.org Source: https://launchpad.net/%{name}/%{version}/%{version}/+download/%{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM properly add -lGL as library for correct argument order +Patch1: build20-libGL.patch BuildRequires: SDL2_gfx-devel BuildRequires: SDL2_image-devel BuildRequires: SDL2_mixer-devel @@ -83,6 +85,7 @@ operation. %prep %setup -q +%patch1 -p1 sed -i '/wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=uninitialized")/d' CMakeLists.txt sed -i 's/\(install(TARGETS ${NAME} DESTINATION \)"."\( COMPONENT ExecutableFiles)\)/\1bin\2/' cmake/WlFunctions.cmake