From e4c1a3596a680ba83de5b899e4980d3891f368bf Mon Sep 17 00:00:00 2001 From: Peppersawce <157759066+Peppersawce@users.noreply.github.com> Date: Thu, 10 Apr 2025 13:13:36 +0000 Subject: [PATCH] Recipe for xoreos (#12127) --- .../xoreos/additional-files/xoreos.rdef.in | 67 +++++++++++ .../xoreos/patches/xoreos-0.0.7~git.patchset | 22 ++++ games-engines/xoreos/xoreos-0.0.7~git.recipe | 109 ++++++++++++++++++ 3 files changed, 198 insertions(+) create mode 100644 games-engines/xoreos/additional-files/xoreos.rdef.in create mode 100644 games-engines/xoreos/patches/xoreos-0.0.7~git.patchset create mode 100644 games-engines/xoreos/xoreos-0.0.7~git.recipe diff --git a/games-engines/xoreos/additional-files/xoreos.rdef.in b/games-engines/xoreos/additional-files/xoreos.rdef.in new file mode 100644 index 000000000..4eb28bebe --- /dev/null +++ b/games-engines/xoreos/additional-files/xoreos.rdef.in @@ -0,0 +1,67 @@ +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = @MINOR@, + + variety = B_APPV_DEVELOPMENT, + internal = 0, + + short_info = "xoreos", + long_info = "@LONG_INFO@" +}; + +resource app_signature "application/x-vnd.xoreos"; + +resource large_icon array { + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFF05050505050504FFFFFFFFFFFFFFFFFFFFFF05050505050505FFFFFF" + $"FFFFFFFF050505050505050504FFFFFFFFFFFFFF050505050505050505FFFFFF" + $"FFFFFFFF05050505050505050505FFFFFFFF0505050505050505050505FFFFFF" + $"FFFFFFFF0505050505050505050505FFFF050505050505050505050505FFFFFF" + $"FFFFFFFF050505050505050505050505050505050505050505050505FFFFFFFF" + $"FFFFFFFFFFFFFFFFFF0505050505050505050505050505FFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFF05050505050505050505FFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFF0505050505050505FFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFF05050505050505FFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFF050505050505FFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFF050505050505FFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFF0505050505FFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFF0505050505FFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFF040505050504FFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFF050505050505FFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFF050505050505FFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFF0505050505050505FFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFF05050505050505050505FFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFF050505050505050505050505FFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFF050505050505050505050505050505050505050505040505FFFFFFFF" + $"FFFFFFFF0505050505050505050505FFFF050505050505050505050505FFFFFF" + $"FFFFFFFF05050505050505050505FFFFFFFF0405050505050505050505FFFFFF" + $"FFFFFFFF050505050505050505FFFFFFFFFFFF05050505050505050505FFFFFF" + $"FFFFFFFF05050505050505FFFFFFFFFFFFFFFFFFFF0405050505050505FFFFFF" + $"FFFFFFFF050505FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF050505FFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" +}; + +resource mini_icon array { + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + $"FF05050505FFFFFFFFFFFF05050505FF" + $"FF050505050504FFFFFF0505050505FF" + $"FF0505050505050504050505050505FF" + $"FFFFFFFFFF05050505050505FFFFFFFF" + $"FFFFFFFFFFFF05050505FFFFFFFFFFFF" + $"FFFFFFFFFFFF05050505FFFFFFFFFFFF" + $"FFFFFFFFFFFFFF0505FFFFFFFFFFFFFF" + $"FFFFFFFFFFFFFF0505FFFFFFFFFFFFFF" + $"FFFFFFFFFFFF05050504FFFFFFFFFFFF" + $"FFFFFFFFFFFF05050505FFFFFFFFFFFF" + $"FFFFFFFFFF050505050505FFFFFFFFFF" + $"FF0405050505050505050505050505FF" + $"FF050505050505FFFF050505050505FF" + $"FF05050505FFFFFFFFFFFF05050505FF" + $"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" +}; diff --git a/games-engines/xoreos/patches/xoreos-0.0.7~git.patchset b/games-engines/xoreos/patches/xoreos-0.0.7~git.patchset new file mode 100644 index 000000000..ca39ce2b2 --- /dev/null +++ b/games-engines/xoreos/patches/xoreos-0.0.7~git.patchset @@ -0,0 +1,22 @@ +From 44106018368a79429ab0a355904b5d1aec1228c8 Mon Sep 17 00:00:00 2001 +From: Peppersawce +Date: Thu, 10 Apr 2025 12:33:03 +0200 +Subject: Fix finding SDL2 in CMake + + +diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake +index b6658fe..3367db4 100644 +--- a/cmake/FindSDL2.cmake ++++ b/cmake/FindSDL2.cmake +@@ -29,7 +29,7 @@ if(WIN32) + find_library(SDL2_LIBRARY NAMES SDL2 PATHS $ENV{PROGRAMFILES}/SDL2/lib DOC "The SDL2 library") + + else(WIN32) +- find_path(SDL2_INCLUDE_DIR SDL.h HINTS /usr/include/SDL2 /usr/local/include/SDL2 /opt/local/include/SDL2 /opt/homebrew/include/SDL2 DOC "The directory where SDL.h resides") ++ find_path(SDL2_INCLUDE_DIR SDL.h HINTS /usr/include/SDL2 /usr/local/include/SDL2 /opt/local/include/SDL2 /opt/homebrew/include/SDL2 /boot/system/develop/headers/SDL2 /boot/system/develop/headers/x86/SDL2 DOC "The directory where SDL.h resides") + find_library(SDL2_LIBRARY NAMES SDL2 DOC "The SDL2 library") + + endif(WIN32) +-- +2.48.1 + diff --git a/games-engines/xoreos/xoreos-0.0.7~git.recipe b/games-engines/xoreos/xoreos-0.0.7~git.recipe new file mode 100644 index 000000000..dc654d10c --- /dev/null +++ b/games-engines/xoreos/xoreos-0.0.7~git.recipe @@ -0,0 +1,109 @@ +SUMMARY="Early reimplementation of BioWare's Aurora engine" +DESCRIPTION="xoreos is an open source implementation of BioWare's Aurora engine and its derivatives, licensed under \ +the terms of the GNU General Public License version 3 (or later). + +The goal is to have all games using this engine working in a portable manner, starting from \ +Neverwinter Nights and ending with Dragon Age II. + +Game data for at least one of the supported games is required. +This project is at its early stages, all supported games run but no actual gameplay is implemented. + +No link is provided to the binaries as they're meant to be used via command-line and the user needs to specify \ +either the path or the game to run. +Examples: 'xoreos -p/path/to/game/' 'xoreos nwn' \ + +The engine creates its own configuration files in ~/config/settings/xoreos, check the documentation provided \ +with the package, especially the sample configuration, to add game-specific paths to it and use the engine's other features." +HOMEPAGE="https://xoreos.org/" +COPYRIGHT="2010-2025 xoreos Team" +LICENSE="GNU GPL v3" +REVISION="1" +srcGitRev="374f800c8def04bc9780fa6c4a0c55bcf6138e05" +SOURCE_URI="https://github.com/xoreos/xoreos/archive/$srcGitRev.zip" +CHECKSUM_SHA256="bdb531e9727430830704c4ad885027abe64765485849cc531bf2cdba71f20c67" +SOURCE_DIR="xoreos-$srcGitRev" +PATCHES="xoreos-$portVersion.patchset" +ADDITIONAL_FILES="xoreos.rdef.in" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + xoreos$secondaryArchSuffix = $portVersion + cmd:xoreos + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libboost_system$secondaryArchSuffix + lib:libfaad$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + lib:libgl$secondaryArchSuffix + lib:libglu$secondaryArchSuffix + lib:libglew$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + lib:liblzma$secondaryArchSuffix + lib:libmad$secondaryArchSuffix + lib:libogg$secondaryArchSuffix + lib:libopenal$secondaryArchSuffix + lib:libSDL2_2.0$secondaryArchSuffix + lib:libvorbis$secondaryArchSuffix + lib:libvorbisfile$secondaryArchSuffix + lib:libvpx$secondaryArchSuffix + lib:libxml2$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libboost_system$secondaryArchSuffix + devel:libfaad$secondaryArchSuffix + devel:libfreetype$secondaryArchSuffix + devel:libglew$secondaryArchSuffix + devel:libiconv$secondaryArchSuffix + devel:liblzma$secondaryArchSuffix + devel:libmad$secondaryArchSuffix + devel:libogg$secondaryArchSuffix + devel:libopenal$secondaryArchSuffix + devel:libSDL2_2.0$secondaryArchSuffix + devel:libvorbis$secondaryArchSuffix + devel:libvorbisfile$secondaryArchSuffix + devel:libvpx$secondaryArchSuffix + devel:libxml2$secondaryArchSuffix + devel:libz$secondaryArchSuffix + #xvidcore is optional and we don't have it (yet) + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + headersdir=$(finddir B_SYSTEM_HEADERS_DIRECTORY) + + cmake -Bbuild -S. $cmakeDirArgs \ + -DCMAKE_BUILD_TYPE=Release + + make -C build $jobArgs +} + +INSTALL() +{ + make -C build install + + # Generate the rdef + local MAJOR="`echo "$portVersion" | cut -b1`" + local MIDDLE="`echo "$portVersion" | cut -b3`" + local MINOR="`echo "$portVersion" | cut -b5`" + local LONG_INFO="$SUMMARY" + sed \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + -e "s|@LONG_INFO@|$LONG_INFO|" \ + $portDir/additional-files/xoreos.rdef.in > xoreos.rdef + + addResourcesToBinaries xoreos.rdef $prefix/bin/xoreos +}