From ee679ffd6776aabcce4bc5ecb5731df0ea584127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Wed, 16 Mar 2022 22:34:23 +0100 Subject: [PATCH] wesnoth: Fix build errors in latest oe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid breaking on changes made elsewhere by not overwriting buildflags conditionally Signed-off-by: Andreas Müller --- .../0003-Do-not-adjust-compiler-flags.patch | 63 +++++++++++++++++++ recipes-games/wesnoth/wesnoth_1.16.2.bb | 5 +- 2 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 recipes-games/wesnoth/files/0003-Do-not-adjust-compiler-flags.patch diff --git a/recipes-games/wesnoth/files/0003-Do-not-adjust-compiler-flags.patch b/recipes-games/wesnoth/files/0003-Do-not-adjust-compiler-flags.patch new file mode 100644 index 0000000..08de3e4 --- /dev/null +++ b/recipes-games/wesnoth/files/0003-Do-not-adjust-compiler-flags.patch @@ -0,0 +1,63 @@ +From a87ebed70e1d50097bad3b118e513830bb33a3c2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Wed, 16 Mar 2022 22:15:30 +0100 +Subject: [PATCH] Do not adjust compiler flags +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Just guesswork: +Something ha changed elsewhere causing the if-condition pass as seen for broken +build: + +CMake compiler flags set to »-Wall -Wextra -Werror... - long but missing includes + +Fixes build errors as: +| <..>/wesnoth-1.16.2/src/color.hpp:17:10: fatal error: algorithm: No such file or directory +| <..>/1.16.2-r0/wesnoth-1.16.2/src/tstring.hpp:18:10: fatal error: memory: No such file or directory + +Upstream-Status: Inappropriate Inappropriate [oe specific] + +Signed-off-by: Andreas Müller +--- + CMakeLists.txt | 16 ++-------------- + 1 file changed, 2 insertions(+), 14 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aaf6923..04efa09 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -218,20 +218,8 @@ if(NOT WIN32) + set(COMPILER_FLAGS "${COMPILER_FLAGS} -fno-omit-frame-pointer -fno-optimize-sibling-calls") + endif() + +-### Set the final compiler flags. + +- set(COMPILER_FLAGS "${COMPILER_FLAGS} ${CXX_FLAGS_USER}") +- +- if(NOT "${CMAKE_CXX_FLAGS}" STREQUAL "${COMPILER_FLAGS}") +- MESSAGE(STATUS "CMake compiler flags set to »${COMPILER_FLAGS}«") +- set(CMAKE_CXX_FLAGS +- "${COMPILER_FLAGS}" +- CACHE +- STRING +- "Global flags used by the CXX compiler during all builds." +- FORCE +- ) +- endif() ++# do not align compiler flag suggested by oe + + # # + # Determine optimization level +@@ -416,7 +404,7 @@ if(NOT WIN32) + # End setting profiler build options + # # + else() +- set(CMAKE_CXX_FLAGS "/W3 /WX /wd4503 /wd4351 /wd4250 /wd4244 /wd4267 /we4239 /wd4275 /EHsc /utf-8" CACHE STRING "Global flags used by the CXX compiler during all builds." FORCE) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /WX /wd4503 /wd4351 /wd4250 /wd4244 /wd4267 /we4239 /wd4275 /EHsc /utf-8" CACHE STRING "Global flags used by the CXX compiler during all builds." FORCE) + add_definitions(-D_WIN32_WINNT=_WIN32_WINNT_WIN7 -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -DNOMINMAX) + + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG_LUA") +-- +2.34.1 + diff --git a/recipes-games/wesnoth/wesnoth_1.16.2.bb b/recipes-games/wesnoth/wesnoth_1.16.2.bb index 0a447c1..27bfd6b 100644 --- a/recipes-games/wesnoth/wesnoth_1.16.2.bb +++ b/recipes-games/wesnoth/wesnoth_1.16.2.bb @@ -12,6 +12,7 @@ SRC_URI = " \ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-${SHRT_VER}/${BP}/${BP}.tar.bz2 \ file://0001-Find-sdl-CFLAGS-with-pkg-config-sdl-config-is-not-us.patch \ file://0002-Do-not-do-the-ar-ranlib-configure-dance-it-won-t-wor.patch \ + file://0003-Do-not-adjust-compiler-flags.patch \ " SRC_URI[sha256sum] = "729fd0903a28af502240d08c0a27b9ff50e534677644b639d8fd33823a7a9799" @@ -50,10 +51,6 @@ ALLOW_EMPTY:${PN}-all-campaigns = "1" ALLOW_EMPTY:${PN}-all = "1" do_configure:prepend() { - export HOST_SYS="${HOST_SYS}" - export BUILD_SYS="${BUILD_SYS}" - export STAGING_LIBDIR="${STAGING_LIBDIR}" - export STAGING_INCDIR="${STAGING_INCDIR}" rm -f ${S}/cmake/FindBoost.cmake }