ports: Add physfs port
This commit is contained in:
parent
fdc1daefb6
commit
dc0cccfb6c
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash ../install.sh
|
||||||
|
|
||||||
|
NAME='physfs'
|
||||||
|
VERSION='3.2.0'
|
||||||
|
DOWNLOAD_URL="https://github.com/icculus/physfs/archive/refs/tags/release-$VERSION.tar.gz#1991500eaeb8d5325e3a8361847ff3bf8e03ec89252b7915e1f25b3f8ab5d560"
|
||||||
|
TAR_CONTENT="physfs-release-$VERSION"
|
||||||
|
|
||||||
|
configure() {
|
||||||
|
$BANAN_CMAKE \
|
||||||
|
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
|
||||||
|
-B build -G Ninja --fresh . \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DPHYSFS_BUILD_TEST=ON \
|
||||||
|
-DPHYSFS_BUILD_DOCS=OFF \
|
||||||
|
|| exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
$BANAN_CMAKE --build build || exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
install() {
|
||||||
|
$BANAN_CMAKE --install build || exit 1
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
diff -ru physfs-3.2.0/src/physfs_internal.h physfs-3.2.0-banan_os/src/physfs_internal.h
|
||||||
|
--- physfs-3.2.0/src/physfs_internal.h 2022-09-30 23:13:07.000000000 +0300
|
||||||
|
+++ physfs-3.2.0-banan_os/src/physfs_internal.h 2025-10-31 22:59:41.007241749 +0200
|
||||||
|
@@ -38,7 +38,7 @@
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if defined(PHYSFS_PLATFORM_SOLARIS) || defined(PHYSFS_PLATFORM_LINUX)
|
||||||
|
+#if defined(PHYSFS_PLATFORM_SOLARIS) || defined(PHYSFS_PLATFORM_LINUX) || defined(PHYSFS_PLATFORM_BANAN_OS)
|
||||||
|
#include <alloca.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
diff -ru physfs-3.2.0/src/physfs_platforms.h physfs-3.2.0-banan_os/src/physfs_platforms.h
|
||||||
|
--- physfs-3.2.0/src/physfs_platforms.h 2022-09-30 23:13:07.000000000 +0300
|
||||||
|
+++ physfs-3.2.0-banan_os/src/physfs_platforms.h 2025-10-31 22:58:57.522454364 +0200
|
||||||
|
@@ -15,6 +15,11 @@
|
||||||
|
#if (defined __HAIKU__)
|
||||||
|
# define PHYSFS_PLATFORM_HAIKU 1
|
||||||
|
# define PHYSFS_PLATFORM_POSIX 1
|
||||||
|
+#elif (defined __banan_os__)
|
||||||
|
+# define PHYSFS_NO_CDROM_SUPPORT 1
|
||||||
|
+# define PHYSFS_PLATFORM_BANAN_OS 1
|
||||||
|
+# define PHYSFS_PLATFORM_UNIX 1
|
||||||
|
+# define PHYSFS_PLATFORM_POSIX 1
|
||||||
|
#elif ((defined __BEOS__) || (defined __beos__))
|
||||||
|
# error BeOS support was dropped since PhysicsFS 2.1. Sorry. Try Haiku!
|
||||||
|
#elif (defined _WIN32_WCE) || (defined _WIN64_WCE)
|
||||||
Loading…
Reference in New Issue