aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-11-22 18:57:00 +0100
committerLeo <thinkabit.ukim@gmail.com>2019-11-24 18:23:42 +0100
commitc2da269432e9f3a48f77413d318c534fdc3ea975 (patch)
treeaae9cea3d71c6d329ad0d055d4da93409b8290e1 /testing
parenta29fdeeaca380a18ac51c4321c97ccd3e8a69e67 (diff)
downloadaports-c2da269432e9f3a48f77413d318c534fdc3ea975.tar.bz2
aports-c2da269432e9f3a48f77413d318c534fdc3ea975.tar.xz
testing/widelands: new aport
http://www.widelands.org Real-time strategy game inspired by The Settlers II
Diffstat (limited to 'testing')
-rw-r--r--testing/widelands/APKBUILD49
-rw-r--r--testing/widelands/fix-execinfo.patch28
-rw-r--r--testing/widelands/fix_nl_msg_cat_cntr.patch24
-rw-r--r--testing/widelands/search-for-libintl.patch12
-rw-r--r--testing/widelands/widelands.desktop22
5 files changed, 135 insertions, 0 deletions
diff --git a/testing/widelands/APKBUILD b/testing/widelands/APKBUILD
new file mode 100644
index 0000000000..c04e81644e
--- /dev/null
+++ b/testing/widelands/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Leo <thinkabit.ukim@gmail.com>
+# Maintainer: Leo <thinkabit.ukim@gmail.com>
+pkgname=widelands
+pkgver=20
+pkgrel=0
+pkgdesc="Real-time strategy game inspired by The Settlers II"
+url="http://www.widelands.org"
+arch="all"
+license="GPL-2.0-or-later"
+makedepends="cmake python3 boost-dev icu-dev minizip-dev gettext-dev glu-dev
+ glew-dev sdl2_ttf-dev sdl2_mixer-dev sdl2_net-dev sdl2_image-dev sdl2-dev"
+options="!check" # no tests
+source="https://launchpad.net/widelands/build$pkgver/build$pkgver/+download/widelands-build$pkgver.tar.bz2
+ fix_nl_msg_cat_cntr.patch
+ fix-execinfo.patch
+ widelands.desktop
+ search-for-libintl.patch
+ "
+builddir="$srcdir/widelands-build$pkgver"
+
+export LDFLAGS="$LDFLAGS -lintl" CXXFLAGS="$CXXFLAGS -DU_USING_ICU_NAMESPACE=1"
+
+build() {
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ mkdir build && cd build
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ -DWL_INSTALL_DATADIR=/usr/share/widelands \
+ ${CMAKE_CROSSOPTS} ..
+ make
+}
+
+package() {
+ make -C build DESTDIR="$pkgdir" install
+
+ install -Dm0644 "$srcdir"/widelands.desktop -t "$pkgdir"/usr/share/applications
+}
+
+sha512sums="25280db6a57adeb37d13db35ce9eb41a5478534b04772240f6228c180f5a41a55fc414dab66e724945442985cbbba7a8a59a582291aca176e0bd8ae6c08760e5 widelands-build20.tar.bz2
+1254437952230b90db23d1fd7dd285a1d8a5b24483316065bfc96e01450cbb6f164d7ffc6fe48a96e5e5e2a9501cd6df5d1ba53c6d2b8c3a76dd47263b495e6b fix_nl_msg_cat_cntr.patch
+90d3068c822d021f7323db7f1e6a92ee8defce7f0b9ead4d11a248fb1396e49f565fa3e351ffbaa3df56f8ba976c90becc28fb2da016317d9a8ff0a3d697840c fix-execinfo.patch
+2c45958bd7f5af273663431e02c8e2f1a6cc389c174d427032dca707cfc938181c95614d1feb743dd4c677ecb442feffb2fb7d3d41e856c5bdc12033c7d2c0d8 widelands.desktop
+8b2fb971bc282bacaa2727cdf49b55d0bee3697d02fdb2b9f7d0cad5bd1ffe6467e865515d0c13b7efff2fb1f257d91ef073ae935e9c062d8dc5aade0713feb1 search-for-libintl.patch"
diff --git a/testing/widelands/fix-execinfo.patch b/testing/widelands/fix-execinfo.patch
new file mode 100644
index 0000000000..4b4b35d44f
--- /dev/null
+++ b/testing/widelands/fix-execinfo.patch
@@ -0,0 +1,28 @@
+--- a/src/logic/backtrace.cc 2016-11-10 08:28:01.000000000 +0100
++++ b/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;
+ }
diff --git a/testing/widelands/fix_nl_msg_cat_cntr.patch b/testing/widelands/fix_nl_msg_cat_cntr.patch
new file mode 100644
index 0000000000..97a95d5011
--- /dev/null
+++ b/testing/widelands/fix_nl_msg_cat_cntr.patch
@@ -0,0 +1,24 @@
+--- a/src/base/i18n.cc 2016-11-10 08:28:01.000000000 +0100
++++ b/src/base/i18n.cc 2017-12-19 07:16:43.225723387 +0100
+@@ -45,7 +45,9 @@
+ #endif
+ #endif
+
++#if defined(__GLIBC__)
+ extern int _nl_msg_cat_cntr;
++#endif
+
+ namespace i18n {
+
+@@ -302,9 +304,11 @@
+ locale = lang;
+ }
+
++#if defined(__GLIBC__)
+ /* Finally make changes known. */
+ ++_nl_msg_cat_cntr;
+ #endif
++#endif
+
+ SETLOCALE(LC_ALL, ""); // call to libintl
+
diff --git a/testing/widelands/search-for-libintl.patch b/testing/widelands/search-for-libintl.patch
new file mode 100644
index 0000000000..a12bc15be5
--- /dev/null
+++ b/testing/widelands/search-for-libintl.patch
@@ -0,0 +1,12 @@
+Search for libintl since musl doesn't bundle it
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -110,6 +110,7 @@
+ else()
+ find_package(GLEW REQUIRED)
+ endif()
++find_package(intl REQUIRED)
+
+ if (APPLE OR WIN32 OR
+ CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR
+
diff --git a/testing/widelands/widelands.desktop b/testing/widelands/widelands.desktop
new file mode 100644
index 0000000000..5eb5337e52
--- /dev/null
+++ b/testing/widelands/widelands.desktop
@@ -0,0 +1,22 @@
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Type=Application
+Name=Widelands
+GenericName=Strategy Game
+GenericName[af]=Strategie-spel
+GenericName[ca]=Joc d'estrategia
+GenericName[de]=Strategiespiel
+GenericName[dk]=Strategi-spil
+GenericName[eu]=Estrategiako jokoa
+GenericName[fr]=Jeu de stratégie
+GenericName[he]=משחק אסטרטגיה
+GenericName[hu]=Stratégia
+GenericName[ru]=Стратегическая игра
+GenericName[sk]=Strategická hra
+Comment=A a real-time build-up strategy game
+Comment[de]=Echtzeitbasiertes Aufbau-Strategiespiel
+Icon=/usr/share/widelands/pics/wl-ico-128.png
+TryExec=/usr/bin/widelands
+Exec=/usr/bin/widelands --datadir=/usr/share/widelands
+Categories=Application;Game;StrategyGame;