mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
gsplus, new recipe (#10714)
This commit is contained in:
71
app-emulation/gsplus/gsplus-0.14.recipe
Normal file
71
app-emulation/gsplus/gsplus-0.14.recipe
Normal file
@@ -0,0 +1,71 @@
|
||||
SUMMARY="Modern cross-platform Apple IIgs emulator"
|
||||
DESCRIPTION="GSplus is an Apple IIgs emulator. It's an open-source project based on the KEGS and \
|
||||
GSPort emulators. It supports fullscreen, joysticks and audio through the SDL2 library across \
|
||||
platforms."
|
||||
HOMEPAGE="https://apple2.gs/plus/"
|
||||
COPYRIGHT="2003 Kent Dickey
|
||||
2010-2014 GSport contributors
|
||||
2016-2018 Dagen Brock"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
srcGitRev="480572054518112647c8fae5d7ea7046a6d6ecfb"
|
||||
SOURCE_URI="https://github.com/digarok/gsplus/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="0b5d7cc83d66625f55f2c0518ec65f697a5a02af94fca018eb692d6a7eb87d2c"
|
||||
SOURCE_DIR="gsplus-$srcGitRev"
|
||||
PATCHES="gsplus-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
gsplus = $portVersion
|
||||
cmd:GSplus = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libedit$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
lib:libSDL2_image_2.0$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libedit$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libpcap$secondaryArchSuffix
|
||||
devel:libSDL2_2.0$secondaryArchSuffix
|
||||
devel:libSDL2_image_2.0$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:perl
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:re2c
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -Bbuild -S. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$prefix \
|
||||
-DREADLINE=LIBEDIT
|
||||
make -Cbuild
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $prefix/bin $dataDir/gsplus $docDir
|
||||
cp build/bin/GSplus $prefix/bin
|
||||
cp src/assets/* $dataDir/gsplus
|
||||
# cleanup
|
||||
rm -rf $dataDir/gsplus/{*.ico,*.icns}
|
||||
cp doc/{*.pdf,README.txt} $docDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
61
app-emulation/gsplus/patches/gsplus-0.14.patchset
Normal file
61
app-emulation/gsplus/patches/gsplus-0.14.patchset
Normal file
@@ -0,0 +1,61 @@
|
||||
From 318175fb1955c08f9fd0ce6f3b812e417f78ffaf Mon Sep 17 00:00:00 2001
|
||||
From: coolcoder613eb <96163908+coolcoder613eb@users.noreply.github.com>
|
||||
Date: Fri, 19 Jul 2024 09:13:48 +0200
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 6ae49e4..250f6e9 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -256,6 +256,10 @@ if (WIN32)
|
||||
)
|
||||
endif()
|
||||
|
||||
+if (CMAKE_SYSTEM_NAME MATCHES "Haiku")
|
||||
+ target_link_libraries(GSplus network gnu)
|
||||
+endif()
|
||||
+
|
||||
if (DRIVER MATCHES "SDL")
|
||||
target_link_libraries(GSplus ${SDL2_LDFLAGS} ${FREETYPE2_LDFLAGS} SDL2_image)
|
||||
target_compile_options(GSplus PUBLIC ${SDL2_CFLAGS} ${FREETYPE2_CFLAGS} -DHAVE_SDL)
|
||||
diff --git a/src/sound.h b/src/sound.h
|
||||
index 3b5ad44..65f8029 100644
|
||||
--- a/src/sound.h
|
||||
+++ b/src/sound.h
|
||||
@@ -7,8 +7,10 @@
|
||||
|
||||
#if !defined(_WIN32) && !defined(__CYGWIN__)
|
||||
# include <sys/ipc.h>
|
||||
+#ifndef __HAIKU__
|
||||
# include <sys/shm.h>
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#define SOUND_SHM_SAMP_SIZE (32*1024)
|
||||
|
||||
diff --git a/src/unix_host_common.c b/src/unix_host_common.c
|
||||
index 30523c0..83bc2ce 100644
|
||||
--- a/src/unix_host_common.c
|
||||
+++ b/src/unix_host_common.c
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <sys/paths.h>
|
||||
#endif
|
||||
|
||||
-#ifdef __linux__
|
||||
+#if defined(__linux__) || defined(__HAIKU__)
|
||||
#include <sys/xattr.h>
|
||||
#endif
|
||||
|
||||
@@ -394,7 +394,7 @@ word32 host_set_file_info(const char *path, struct file_info *fi) {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
-#elif defined(__linux__)
|
||||
+#elif defined(__linux__) || defined(__HAIKU__)
|
||||
word32 host_set_file_info(const char *path, struct file_info *fi) {
|
||||
|
||||
if (fi->has_fi && fi->storage_type != 0x0d) {
|
||||
--
|
||||
2.45.2
|
||||
|
||||
Reference in New Issue
Block a user