mirror of
https://github.com/void-linux/void-packages.git
synced 2025-09-23 20:25:14 +02:00
widelands: update to 21
This commit is contained in:
parent
b004bdab8f
commit
1d1d25bb49
5 changed files with 61 additions and 83 deletions
|
@ -1,22 +0,0 @@
|
||||||
--- 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
|
|
|
@ -1,28 +0,0 @@
|
||||||
--- src/logic/backtrace.cc 2016-11-10 08:28:01.000000000 +0100
|
|
||||||
+++ src/logic/backtrace.cc 2017-12-19 07:58:01.659673467 +0100
|
|
||||||
@@ -22,15 +22,17 @@
|
|
||||||
#ifndef _WIN32
|
|
||||||
#ifndef __APPLE__
|
|
||||||
#include <cstdlib>
|
|
||||||
-
|
|
||||||
+#if defined(__GLIBC__)
|
|
||||||
#include <execinfo.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
std::string get_backtrace() {
|
|
||||||
std::string result("Backtrace:\n");
|
|
||||||
#ifndef _WIN32
|
|
||||||
#ifndef __APPLE__
|
|
||||||
+#ifdef __GLIBC__
|
|
||||||
#define BACKTRACE_STACKSIZE 24
|
|
||||||
|
|
||||||
void* stack[BACKTRACE_STACKSIZE];
|
|
||||||
@@ -43,5 +45,6 @@
|
|
||||||
free(list);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
+#endif
|
|
||||||
return result;
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
This fixes linker errors with glvnd.
|
|
||||||
|
|
||||||
--- CMakeLists.txt
|
|
||||||
+++ CMakeLists.txt
|
|
||||||
@@ -181,7 +181,7 @@ endif(OPTION_ASAN)
|
|
||||||
|
|
||||||
# This is set to avoid linker errors when using GLVND-libs on Linux
|
|
||||||
if("${OpenGL_GL_PREFERENCE}" STREQUAL "GLVND")
|
|
||||||
- set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lGL")
|
|
||||||
+ link_libraries("GL")
|
|
||||||
add_compile_definitions(WL_USE_GLVND)
|
|
||||||
message(STATUS "Adding linker flags for GLVND.")
|
|
||||||
endif()
|
|
43
srcpkgs/widelands/patches/musl-execinfo.patch
Normal file
43
srcpkgs/widelands/patches/musl-execinfo.patch
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
--- CMakeLists.txt 2020-07-12 21:33:44.000000000 +0200
|
||||||
|
+++ CMakeLists.txt 2020-07-19 08:28:28.360260489 +0200
|
||||||
|
@@ -312,19 +312,14 @@
|
||||||
|
endif (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||||
|
endif (WIN32)
|
||||||
|
|
||||||
|
-# on BSD this must be explicitly linked
|
||||||
|
-if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||||
|
- # Not needed on Debian GNU/kFreeBSD..
|
||||||
|
- if (NOT CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
|
||||||
|
- find_library(EXECINFO_LIBRARY NAMES execinfo)
|
||||||
|
- endif (NOT CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
|
||||||
|
+# Find libexecinfo for musl
|
||||||
|
+find_library(EXECINFO_LIBRARY NAMES execinfo)
|
||||||
|
|
||||||
|
- # OpenBSD needs the X11 include directory in order to find GL/glu.h
|
||||||
|
- if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||||
|
- find_package(X11 REQUIRED)
|
||||||
|
- include_directories(${X11_INCLUDE_DIR})
|
||||||
|
- endif ()
|
||||||
|
-endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||||
|
+# OpenBSD needs the X11 include directory in order to find GL/glu.h
|
||||||
|
+if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||||
|
+ find_package(X11 REQUIRED)
|
||||||
|
+ include_directories(${X11_INCLUDE_DIR})
|
||||||
|
+endif ()
|
||||||
|
|
||||||
|
if (NOT DEFINED WL_VERSION)
|
||||||
|
include (${CMAKE_SOURCE_DIR}/cmake/BzrRevision.cmake)
|
||||||
|
--- src/CMakeLists.txt 2020-07-12 21:33:44.000000000 +0200
|
||||||
|
+++ src/CMakeLists.txt 2020-07-19 08:28:57.894258728 +0200
|
||||||
|
@@ -140,9 +140,9 @@
|
||||||
|
logic_filesystem_constants
|
||||||
|
)
|
||||||
|
|
||||||
|
-if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||||
|
+if (EXECINFO_LIBRARY)
|
||||||
|
target_link_libraries(widelands_ball_of_mud ${EXECINFO_LIBRARY})
|
||||||
|
-endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
||||||
|
+endif (EXECINFO_LIBRARY)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
target_link_libraries(widelands_ball_of_mud wsock32)
|
|
@ -1,39 +1,37 @@
|
||||||
# Template file for 'widelands'
|
# Template file for 'widelands'
|
||||||
pkgname=widelands
|
pkgname=widelands
|
||||||
version=20
|
version=21
|
||||||
revision=4
|
revision=1
|
||||||
wrksrc="${pkgname}-build${version}"
|
wrksrc="${pkgname}-build${version}"
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="
|
configure_args="-DOPENGL_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include
|
||||||
-DOPENGL_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include
|
-DOPTION_BUILD_WEBSITE_TOOLS=OFF -DWL_INSTALL_DATADIR=/usr/share/widelands"
|
||||||
-DOPTION_BUILD_WEBSITE_TOOLS=OFF
|
hostmakedepends="python3 pkg-config gettext"
|
||||||
-DWL_INSTALL_DATADIR=/usr/share/widelands"
|
makedepends="boost-devel icu-devel minizip-devel gettext-devel
|
||||||
hostmakedepends="python pkg-config gettext"
|
glu-devel glew-devel SDL2-devel SDL2_gfx-devel SDL2_image-devel
|
||||||
makedepends="boost-devel icu-devel minizip-devel gettext-devel glu-devel
|
SDL2_net-devel SDL2_mixer-devel SDL2_ttf-devel"
|
||||||
glew-devel SDL2_gfx-devel SDL2_image-devel SDL2_net-devel
|
|
||||||
SDL2_mixer-devel SDL2_ttf-devel"
|
|
||||||
depends="${pkgname}-data-${version}_${revision}"
|
depends="${pkgname}-data-${version}_${revision}"
|
||||||
short_desc="Real-time strategy game"
|
short_desc="Real-time strategy game"
|
||||||
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
||||||
license="GPL-2.0-or-later"
|
license="GPL-2.0-or-later"
|
||||||
homepage="http://www.widelands.org/"
|
homepage="http://www.widelands.org/"
|
||||||
distfiles="https://launchpad.net/${pkgname}/build${version}/build${version}/+download/${pkgname}-build${version}.tar.bz2"
|
distfiles="https://github.com/widelands/widelands/archive/build${version}.tar.gz>${pkgname}-${version}.tar.gz"
|
||||||
checksum=38594d98c74f357d4c31dd8ee2b056bfe921f42935935af915d11b792677bcb2
|
checksum=601e0e4c6f91b3fb0ece2cd1b83ecfb02344a1b9194fbb70ef3f70e06994e357
|
||||||
|
nocross="Cmake does not find cross SDL2 header files because it looks into /usr/include/SDL2"
|
||||||
|
|
||||||
CXXFLAGS="-Wno-maybe-uninitialized -DU_USING_ICU_NAMESPACE=1"
|
CXXFLAGS="-DU_USING_ICU_NAMESPACE=1"
|
||||||
|
|
||||||
pre_configure() {
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
||||||
if [ "$CROSS_BUILD" ]; then
|
makedepends+=" libexecinfo-devel"
|
||||||
# Upstream could have defined a flag to disable tests,
|
fi
|
||||||
# or make sure that test binaries are in host format...
|
|
||||||
patch -p0 < ${FILESDIR}/disable-testing.patch
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
# For some reason the binary is installed as /usr/widelands - move it
|
# For some reason the binary is installed as /usr/widelands - move it
|
||||||
vmkdir usr/bin
|
vmkdir usr/bin
|
||||||
mv ${DESTDIR}/usr/${pkgname} ${DESTDIR}/usr/bin
|
mv ${DESTDIR}/usr/${pkgname} ${DESTDIR}/usr/bin
|
||||||
|
vmkdir usr/share
|
||||||
|
mv ${DESTDIR}/share/* ${DESTDIR}/usr/share/
|
||||||
|
rmdir ${DESTDIR}/share
|
||||||
|
|
||||||
# Remove files not needed in the package
|
# Remove files not needed in the package
|
||||||
rm -f ${DESTDIR}/usr/COPYING ${DESTDIR}/usr/CREDITS ${DESTDIR}/usr/ChangeLog ${DESTDIR}/usr/VERSION
|
rm -f ${DESTDIR}/usr/COPYING ${DESTDIR}/usr/CREDITS ${DESTDIR}/usr/ChangeLog ${DESTDIR}/usr/VERSION
|
||||||
|
|
Loading…
Add table
Reference in a new issue