aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/supertux/1152743f0bd369b4e1d3ff822e9d309fc7dac3e2.patch29
-rw-r--r--testing/supertux/APKBUILD9
2 files changed, 35 insertions, 3 deletions
diff --git a/testing/supertux/1152743f0bd369b4e1d3ff822e9d309fc7dac3e2.patch b/testing/supertux/1152743f0bd369b4e1d3ff822e9d309fc7dac3e2.patch
new file mode 100644
index 0000000000..e977e42f81
--- /dev/null
+++ b/testing/supertux/1152743f0bd369b4e1d3ff822e9d309fc7dac3e2.patch
@@ -0,0 +1,29 @@
+From 1152743f0bd369b4e1d3ff822e9d309fc7dac3e2 Mon Sep 17 00:00:00 2001
+From: Reiner Herrmann <reiner@reiner-h.de>
+Date: Fri, 3 Jan 2020 14:27:15 +0000
+Subject: [PATCH] Fix detection of system physfs (#1312)
+
+check_symbol_exists checks if compilation succeeds with the specified
+symbol and header, but also fails if linking is not successful.
+To detect the system library correctly, ask it to link against
+${PHYSFS_LIBRARY} (which is set by find_package).
+---
+ CMakeLists.txt | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 36bf4a67ac..3b8959a0fe 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -221,7 +221,10 @@ include_directories(SYSTEM ${VORBIS_INCLUDE_DIR})
+ include(CheckSymbolExists)
+
+ find_package(PhysFS)
+-check_symbol_exists("PHYSFS_getPrefDir" "${PHYSFS_INCLUDE_DIR}/physfs.h" HAVE_PHYSFS_GETPREFDIR)
++if(PHYSFS_LIBRARY)
++ set(CMAKE_REQUIRED_LIBRARIES ${PHYSFS_LIBRARY})
++ check_symbol_exists("PHYSFS_getPrefDir" "${PHYSFS_INCLUDE_DIR}/physfs.h" HAVE_PHYSFS_GETPREFDIR)
++endif()
+ if(HAVE_PHYSFS_GETPREFDIR)
+ set(USE_SYSTEM_PHYSFS ON CACHE BOOL "Use preinstalled physfs (must support getPrefDir)")
+ else(HAVE_PHYSFS_GETPREFDIR)
diff --git a/testing/supertux/APKBUILD b/testing/supertux/APKBUILD
index 0b3b42f778..2fecd82ecd 100644
--- a/testing/supertux/APKBUILD
+++ b/testing/supertux/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: alpterry <alpterry@protonmail.com>
pkgname=supertux
pkgver=0.6.1
-pkgrel=1
+pkgrel=2
pkgdesc="Open-source classic 2D jump'n run sidescroller game"
url="https://www.supertux.org/"
arch="all !s390x" # build fails
@@ -11,7 +11,9 @@ depends="$pkgname-data"
makedepends="boost-dev cmake curl-dev freetype-dev glew-dev libpng-dev libvorbis-dev openal-soft-dev physfs-dev sdl2-dev sdl2_image-dev"
subpackages="$pkgname-doc $pkgname-data::noarch"
options="!check" # no test suite
-source="https://github.com/SuperTux/supertux/releases/download/v$pkgver/SuperTux-v$pkgver-Source.tar.gz"
+source="https://github.com/SuperTux/supertux/releases/download/v$pkgver/SuperTux-v$pkgver-Source.tar.gz
+ 1152743f0bd369b4e1d3ff822e9d309fc7dac3e2.patch
+ "
builddir="$srcdir/SuperTux-v$pkgver-Source"
build() {
@@ -41,4 +43,5 @@ data() {
mv "$pkgdir"/usr/share/games "$subpkgdir"/usr/share/games
}
-sha512sums="38a1da2a0546aa7fb98ece307b35a7e03a154b018d4b732592d3a718fd6c8ba827f3f8d99f0df777b7f438c0294c1838185ea7e60cc08f8cdb6f9a46b440e860 SuperTux-v0.6.1-Source.tar.gz"
+sha512sums="38a1da2a0546aa7fb98ece307b35a7e03a154b018d4b732592d3a718fd6c8ba827f3f8d99f0df777b7f438c0294c1838185ea7e60cc08f8cdb6f9a46b440e860 SuperTux-v0.6.1-Source.tar.gz
+0683b6c6ec8cf9d78ea0c973405a4ef26ab85cd72619483d0e5aef4bc0650d23a7e4b8a2484b5e3447433560a1d42225a61fb224b1fae6c2f0effb4ca622ec84 1152743f0bd369b4e1d3ff822e9d309fc7dac3e2.patch"