From 1661045b76036787c4b0a0d4c3213e32115fad97 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sat, 16 May 2020 10:49:44 +0200 Subject: [PATCH] SIDPlayer: build the BeOS version with GUI. - Fix the license (it's GPL v2 not v1) - Use the BeOS makefile instead of the Linux/SDL one and adjust the dependencies - Adjust some ifdefs to enable relevant code on Haiku - Intentionally not added to the Deskbar menu: this can only be used by loading files. There is nothing that can be done from the UI if not started with a file. --- .../sidplayer/patches/sidplayer-4.4.patchset | 57 +++++++++++++++++++ haiku-apps/sidplayer/sidplayer-4.4.recipe | 18 +++--- 2 files changed, 64 insertions(+), 11 deletions(-) create mode 100644 haiku-apps/sidplayer/patches/sidplayer-4.4.patchset diff --git a/haiku-apps/sidplayer/patches/sidplayer-4.4.patchset b/haiku-apps/sidplayer/patches/sidplayer-4.4.patchset new file mode 100644 index 000000000..ecf378624 --- /dev/null +++ b/haiku-apps/sidplayer/patches/sidplayer-4.4.patchset @@ -0,0 +1,57 @@ +From 8ecbf89a347696b0efd505062d758538c5e25a27 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sat, 16 May 2020 10:46:58 +0200 +Subject: Haiku support. + + +diff --git a/Makefile.BeOS b/Makefile.BeOS +index ee4c5c1..8bd5b02 100644 +--- a/Makefile.BeOS ++++ b/Makefile.BeOS +@@ -110,7 +110,7 @@ COMPILER_FLAGS = + LINKER_FLAGS = + + ## include the makefile-engine +-include /boot/develop/etc/makefile-engine ++include /system/develop/etc/makefile-engine + + # Create links to Frodo sources + src/main.cpp: src/cpu_macros.h src/cpu_opcodes.h src/prefs.h src/sid.cpp +diff --git a/src/main.cpp b/src/main.cpp +index 73f8e15..5fc1a4d 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -23,7 +23,7 @@ + #include + #include + +-#if defined(__BEOS__) ++#if defined(__BEOS__) || defined(__HAIKU__) + #include + #endif + +@@ -165,7 +165,7 @@ bool LoadPSIDFile(const char *file) + + speed_flags = read_psid_32(header, PSID_SPEED); + +-#if defined(__BEOS__) ++#if defined(__BEOS__) || defined(__HAIKU__) + int32 sl = 32, dl = 64, state = 0; + convert_to_utf8(B_ISO1_CONVERSION, (char *)(header + PSID_NAME), &sl, module_name, &dl, &state); + sl = 32, dl = 64, state = 0; +diff --git a/src/types.h b/src/types.h +index 8df6cc9..4f6e692 100644 +--- a/src/types.h ++++ b/src/types.h +@@ -25,7 +25,7 @@ + #include "config.h" + #endif + +-#if defined(__BEOS__) ++#if defined(__BEOS__) || defined(__HAIKU__) + #include + #elif defined(SDL) + #include +-- +2.26.0 + diff --git a/haiku-apps/sidplayer/sidplayer-4.4.recipe b/haiku-apps/sidplayer/sidplayer-4.4.recipe index fc56a25ff..e141b4107 100644 --- a/haiku-apps/sidplayer/sidplayer-4.4.recipe +++ b/haiku-apps/sidplayer/sidplayer-4.4.recipe @@ -6,42 +6,38 @@ SIDPlayer can be used as a stand-alone player or, under Haiku, as a plug-in \ for CL-Amp and SoundPlay." HOMEPAGE="http://sidplayer.cebix.net/" COPYRIGHT="2003 Christian Bauer" -LICENSE="GNU GPL v1" -REVISION="1" +LICENSE="GNU GPL v2" +REVISION="2" SOURCE_URI="http://sidplayer.cebix.net/downloads/SIDPlayer-4.4.tar.gz" CHECKSUM_SHA256="fd1f73047abeb8234f850975786c805262678e77013835a8e621dcfd237624d7" SOURCE_DIR="SIDPlayer-$portVersion" +PATCHES="sidplayer-$portVersion.patchset" ARCHITECTURES="x86_gcc2 !x86 !x86_64" PROVIDES=" sidplayer = $portVersion - cmd:sidplayer = $portVersion + app:sidplayer = $portVersion " REQUIRES=" haiku - lib:libsdl " BUILD_REQUIRES=" haiku_devel - devel:libsdl " BUILD_PREREQUIRES=" + makefile_engine cmd:gcc cmd:make - cmd:autoreconf - cmd:aclocal " BUILD() { - autoreconf -vfi - runConfigure ./configure - make + make -f Makefile.BeOS } INSTALL() { - make install + make -f Makefile.BeOS install INSTALL_DIR=$appsDir }