From ff091e73b6624edd6f9bd07e8cfec4c6552ad8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Sun, 17 Dec 2017 16:05:50 +0100 Subject: [PATCH] wesnoth: fix build for recent oe-core MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * use pkg-config instead of sdl-config * fix package qa by adding bash and python to RDEPENDS * add ALLOW_EMPTY_${PN}-all-campaigns = "1" * fix wsnoth-sof: Sceptre_Of_Fire was renamed to Sceptre_of_Fire * fix wsnoth-thot: The_Hammer_Of_Thursagan was renamed to The_Hammer_of_Thursagan Signed-off-by: Andreas Müller --- ...with-pkg-config-sdl-config-is-not-us.patch | 33 +++++++++++++++++++ recipes-games/wesnoth/wesnoth_1.10.7.bb | 15 ++++++--- 2 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 recipes-games/wesnoth/files/0001-Find-sdl-CFLAGS-with-pkg-config-sdl-config-is-not-us.patch diff --git a/recipes-games/wesnoth/files/0001-Find-sdl-CFLAGS-with-pkg-config-sdl-config-is-not-us.patch b/recipes-games/wesnoth/files/0001-Find-sdl-CFLAGS-with-pkg-config-sdl-config-is-not-us.patch new file mode 100644 index 0000000..561dabd --- /dev/null +++ b/recipes-games/wesnoth/files/0001-Find-sdl-CFLAGS-with-pkg-config-sdl-config-is-not-us.patch @@ -0,0 +1,33 @@ +From 84ab712dfa56afbec12d0d96332d1aa1cc7ea399 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sun, 17 Dec 2017 16:00:18 +0100 +Subject: [PATCH] Find sdl CFLAGS with pkg-config - sdl-config is not usable +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Andreas Müller +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3764aad..e08acdb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,8 +33,8 @@ find_package(X11) + + if(NOT MSVC) + #needed to get some SDL defines in... (as of rev31694 -D_GNU_SOURCE=1 is required!) +- set(SDL_CONFIG "sdl-config" CACHE STRING "Path to sdl-config script") +- exec_program(${SDL_CONFIG} ARGS "--cflags" OUTPUT_VARIABLE SDL_CFLAGS) ++ set(SDL_CONFIG "pkg-config" CACHE STRING "Path to sdl-config script") ++ exec_program(${SDL_CONFIG} ARGS "sdl --cflags" OUTPUT_VARIABLE SDL_CFLAGS) + add_definitions(${SDL_CFLAGS}) + + # Use the safer `mkstemp' instead of `tmpnam' on POSIX systems. +-- +2.9.5 + diff --git a/recipes-games/wesnoth/wesnoth_1.10.7.bb b/recipes-games/wesnoth/wesnoth_1.10.7.bb index 40b9bac..a2f8016 100644 --- a/recipes-games/wesnoth/wesnoth_1.10.7.bb +++ b/recipes-games/wesnoth/wesnoth_1.10.7.bb @@ -8,11 +8,14 @@ DEPENDS = "asio freetype libsdl-image libsdl-mixer libsdl-net libsdl-ttf zlib bo SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" -SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${PN}-${SHRT_VER}/${P}/${P}.tar.bz2" +SRC_URI = " \ + ${SOURCEFORGE_MIRROR}/${PN}/${PN}-${SHRT_VER}/${P}/${P}.tar.bz2 \ + file://0001-Find-sdl-CFLAGS-with-pkg-config-sdl-config-is-not-us.patch \ +" ARM_INSTRUCTION_SET = "arm" -inherit cmake +inherit cmake pkgconfig EXTRA_OECMAKE = "\ -DENABLE_EDITOR=ON \ @@ -42,6 +45,8 @@ DESCRIPTION_${PN}-music = "Optional music package for The Battle for ${PN}" DESCRIPTION_${PN}-data = "Mandatory data package for The Battle for ${PN}" DESCRIPTION_${PN}-server = "Optional Battle for Wesnoth server" +ALLOW_EMPTY_${PN}-all-campaigns = "1" + do_configure_prepend(){ export HOST_SYS="${HOST_SYS}" export BUILD_SYS="${BUILD_SYS}" @@ -64,6 +69,8 @@ do_install_append() { RDEPENDS_${PN} = "${PN}-data tremor" +RDEPENDS_${PN}-data = "bash python" + RDEPENDS_${PN}-editor = "${PN}-data" RDEPENDS_${PN}-all-campaigns = "${PN} \ @@ -147,7 +154,7 @@ FILES_${PN}-nr = "\ " FILES_${PN}-sof = "\ - ${datadir}/wesnoth/data/campaigns/Sceptre_Of_Fire \ + ${datadir}/wesnoth/data/campaigns/Sceptre_of_Fire \ ${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-sof.mo \ " @@ -157,7 +164,7 @@ FILES_${PN}-sotbe = "\ " FILES_${PN}-thot = "\ - ${datadir}/wesnoth/data/campaigns/The_Hammer_Of_Thursagan \ + ${datadir}/wesnoth/data/campaigns/The_Hammer_of_Thursagan \ ${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-thot.mo \ "