Skip to content
Snippets Groups Projects
Commit 24368f3e authored by alpterry's avatar alpterry Committed by Rasmus Thomsen
Browse files

community/supertux: upgrade to 0.6.2

parent d96cd1ab
1 merge request!7915community/supertux: upgrade to 0.6.2
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)
# Contributor: alpterry <alpterry@protonmail.com>
# Maintainer: alpterry <alpterry@protonmail.com>
pkgname=supertux
pkgver=0.6.1
pkgrel=4
pkgver=0.6.2
pkgrel=0
pkgdesc="Open-source classic 2D jump'n run sidescroller game"
url="https://www.supertux.org/"
arch="all !s390x !mips !mips64" # build fails
......@@ -11,16 +11,14 @@ 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
1152743f0bd369b4e1d3ff822e9d309fc7dac3e2.patch
"
source="https://github.com/SuperTux/supertux/releases/download/v$pkgver/SuperTux-v$pkgver-Source.tar.gz"
builddir="$srcdir/SuperTux-v$pkgver-Source"
build() {
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake \
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
......@@ -28,12 +26,12 @@ build() {
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DINSTALL_SUBDIR_BIN=bin \
${CMAKE_CROSSOPTS} .
make
$CMAKE_CROSSOPTS
cmake --build build
}
package() {
make DESTDIR="$pkgdir" install
DESTDIR="$pkgdir" cmake --build build --target install
}
data() {
......@@ -43,5 +41,4 @@ data() {
mv "$pkgdir"/usr/share/games "$subpkgdir"/usr/share/games
}
sha512sums="38a1da2a0546aa7fb98ece307b35a7e03a154b018d4b732592d3a718fd6c8ba827f3f8d99f0df777b7f438c0294c1838185ea7e60cc08f8cdb6f9a46b440e860 SuperTux-v0.6.1-Source.tar.gz
0683b6c6ec8cf9d78ea0c973405a4ef26ab85cd72619483d0e5aef4bc0650d23a7e4b8a2484b5e3447433560a1d42225a61fb224b1fae6c2f0effb4ca622ec84 1152743f0bd369b4e1d3ff822e9d309fc7dac3e2.patch"
sha512sums="5baa783ee589b42a9bbce3740659dbb7b617ebfcc00c0a038c03d31b56700e3923c8548700ccebe42b325ca03bd85186bc5edef9f6580d93dc48d8aca88cbf74 SuperTux-v0.6.2-Source.tar.gz"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment