From dc0cccfb6cb4afeb8e410b0075a3de5620b4f715 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sun, 2 Nov 2025 21:15:34 +0200 Subject: [PATCH] ports: Add physfs port --- ports/physfs/build.sh | 25 +++++++++++++++++ .../patches/0001-add-banan_os-support.patch | 27 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100755 ports/physfs/build.sh create mode 100644 ports/physfs/patches/0001-add-banan_os-support.patch diff --git a/ports/physfs/build.sh b/ports/physfs/build.sh new file mode 100755 index 00000000..550a3cd6 --- /dev/null +++ b/ports/physfs/build.sh @@ -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 +} diff --git a/ports/physfs/patches/0001-add-banan_os-support.patch b/ports/physfs/patches/0001-add-banan_os-support.patch new file mode 100644 index 00000000..5ecb05df --- /dev/null +++ b/ports/physfs/patches/0001-add-banan_os-support.patch @@ -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 + #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 + #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)