diff --git a/srcpkgs/widelands/files/disable-testing.patch b/srcpkgs/widelands/files/disable-testing.patch new file mode 100644 index 00000000000..6c15b249323 --- /dev/null +++ b/srcpkgs/widelands/files/disable-testing.patch @@ -0,0 +1,22 @@ +--- CMakeLists.txt 2016-11-10 08:28:01.000000000 +0100 ++++ CMakeLists.txt 2017-12-19 15:31:31.468125411 +0100 +@@ -229,18 +229,7 @@ + ) + endif (NOT DEFINED WL_VERSION) + +-# Enable testing. +-include(CTest) +-enable_testing() +- +-# Run a test after a normal compile. This magic is needed as 'make test' will +-# not rebuild tests: +-# http://stackoverflow.com/questions/733475/cmake-ctest-make-test-doesnt-build-tests +-add_custom_target(_run_all_tests ALL +- COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR} +- DEPENDS wl_tests +-) ++# No testing. + + install ( + FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION diff --git a/srcpkgs/widelands/files/widelands.sh b/srcpkgs/widelands/files/widelands.sh deleted file mode 100644 index f2b795ea566..00000000000 --- a/srcpkgs/widelands/files/widelands.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# -# Startup script for widelands to recognize the user's LANG setting, if any. - -WL_DATA="/usr/share/widelands" -WL_LOCALE="$WL_DATA/locale" -WL_LANG="$LANG" -[ -z "$WL_LANG" ] && WL_LANG="en_US.UTF-8" - -exec /usr/share/widelands/widelands --datadir="$WL_DATA" --localedir="$WL_LOCALE" --language="$WL_LANG" diff --git a/srcpkgs/widelands/template b/srcpkgs/widelands/template index 9afd77c6f26..616e8bcaff4 100644 --- a/srcpkgs/widelands/template +++ b/srcpkgs/widelands/template @@ -1,18 +1,17 @@ # Template file for 'widelands' pkgname=widelands version=19 -revision=1 +revision=2 wrksrc=${pkgname}-build${version}-src build_style=cmake configure_args=" -DOPENGL_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include - -DLUA_LIBRARY=${XBPS_CROSS_BASE}/usr/lib/liblua5.1.a - -DLUA_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include/lua5.1 - -DWL_INSTALL_DATADIR=share/widelands - -DWL_INSTALL_BINDIR=share/widelands" + -DOPTION_BUILD_WEBSITE_TOOLS=OFF + -DWL_INSTALL_DATADIR=share/widelands" hostmakedepends="python pkg-config" -makedepends="boost-devel icu-devel minizip-devel glu-devel glew-devel SDL2_gfx-devel - SDL2_image-devel SDL2_net-devel SDL2_mixer-devel SDL2_ttf-devel lua51-devel" +makedepends="boost-devel icu-devel minizip-devel gettext-devel glu-devel + glew-devel SDL2_gfx-devel SDL2_image-devel SDL2_net-devel + SDL2_mixer-devel SDL2_ttf-devel" depends="${pkgname}-data-${version}_${revision}" short_desc="A real-time strategy game" maintainer="Jürgen Buchmüller " @@ -23,11 +22,16 @@ checksum="e511f9d26828a2b71b64cdfc6674e6e847543b2da73961ab882acca36c7c01a6" CXXFLAGS="-Wno-maybe-uninitialized" -nocross="Currently can't be cross compiled due to target format binaries being executed on the host" +pre_configure() { + if [ -n "$CROSS_BUILD" ]; then + # Upstream could have defined a flag to disable tests, + # or make sure that test binaries are in host format... + patch -p0 < ${FILESDIR}/disable-testing.patch + fi +} post_install() { vinstall ${FILESDIR}/${pkgname}.desktop 644 usr/share/applications - vbin ${FILESDIR}/${pkgname}.sh ${pkgname} } widelands-data_package() {