diff --git a/srcpkgs/widelands/patches/cmake-cross.patch b/srcpkgs/widelands/patches/cmake-cross.patch new file mode 100644 index 00000000000..f146395bd9c --- /dev/null +++ b/srcpkgs/widelands/patches/cmake-cross.patch @@ -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) diff --git a/srcpkgs/widelands/template b/srcpkgs/widelands/template index 211db3729bb..f8b35faaedc 100644 --- a/srcpkgs/widelands/template +++ b/srcpkgs/widelands/template @@ -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