widelands: fix cross

This commit is contained in:
John 2020-07-19 19:59:38 +02:00
parent 6157a25357
commit ca56858c10
2 changed files with 20 additions and 1 deletions

View file

@ -0,0 +1,16 @@
upstream: no
reason: Our SDL2-devel package has a for cross broken sdl2-config.cmake,
this patches switched back to a find module cmake script
---
--- CMakeLists.txt 2020-07-19 19:54:00.744509368 +0200
+++ - 2020-07-19 19:57:03.761863497 +0200
@@ -110,7 +110,7 @@
find_package(PNG REQUIRED)
find_package(Threads REQUIRED)
-find_package(SDL2 CONFIG)
+find_package(SDL2 REQUIRED MODULE)
if(SDL2_FOUND)
message(STATUS "Found SDL2 configuration file")
if(TARGET SDL2::SDL2)

View file

@ -17,7 +17,6 @@ license="GPL-2.0-or-later"
homepage="http://www.widelands.org/"
distfiles="https://github.com/widelands/widelands/archive/build${version}.tar.gz>${pkgname}-${version}.tar.gz"
checksum=601e0e4c6f91b3fb0ece2cd1b83ecfb02344a1b9194fbb70ef3f70e06994e357
nocross="Cmake does not find cross SDL2 header files because it looks into /usr/include/SDL2"
CXXFLAGS="-DU_USING_ICU_NAMESPACE=1"
@ -25,6 +24,10 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" libexecinfo-devel"
fi
if [ "$CROSS_BUILD" ]; then
configure_args+=" -DOPTION_BUILD_TESTS=OFF"
fi
post_install() {
# For some reason the binary is installed as /usr/widelands - move it
vmkdir usr/bin