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.
This commit is contained in:
Adrien Destugues
2020-05-16 10:49:44 +02:00
parent 1b2801e932
commit 1661045b76
2 changed files with 64 additions and 11 deletions

View File

@@ -0,0 +1,57 @@
From 8ecbf89a347696b0efd505062d758538c5e25a27 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
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 <stdio.h>
#include <string.h>
-#if defined(__BEOS__)
+#if defined(__BEOS__) || defined(__HAIKU__)
#include <support/UTF8.h>
#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 <support/SupportDefs.h>
#elif defined(SDL)
#include <SDL_types.h>
--
2.26.0

View File

@@ -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." for CL-Amp and SoundPlay."
HOMEPAGE="http://sidplayer.cebix.net/" HOMEPAGE="http://sidplayer.cebix.net/"
COPYRIGHT="2003 Christian Bauer" COPYRIGHT="2003 Christian Bauer"
LICENSE="GNU GPL v1" LICENSE="GNU GPL v2"
REVISION="1" REVISION="2"
SOURCE_URI="http://sidplayer.cebix.net/downloads/SIDPlayer-4.4.tar.gz" SOURCE_URI="http://sidplayer.cebix.net/downloads/SIDPlayer-4.4.tar.gz"
CHECKSUM_SHA256="fd1f73047abeb8234f850975786c805262678e77013835a8e621dcfd237624d7" CHECKSUM_SHA256="fd1f73047abeb8234f850975786c805262678e77013835a8e621dcfd237624d7"
SOURCE_DIR="SIDPlayer-$portVersion" SOURCE_DIR="SIDPlayer-$portVersion"
PATCHES="sidplayer-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 !x86 !x86_64" ARCHITECTURES="x86_gcc2 !x86 !x86_64"
PROVIDES=" PROVIDES="
sidplayer = $portVersion sidplayer = $portVersion
cmd:sidplayer = $portVersion app:sidplayer = $portVersion
" "
REQUIRES=" REQUIRES="
haiku haiku
lib:libsdl
" "
BUILD_REQUIRES=" BUILD_REQUIRES="
haiku_devel haiku_devel
devel:libsdl
" "
BUILD_PREREQUIRES=" BUILD_PREREQUIRES="
makefile_engine
cmd:gcc cmd:gcc
cmd:make cmd:make
cmd:autoreconf
cmd:aclocal
" "
BUILD() BUILD()
{ {
autoreconf -vfi make -f Makefile.BeOS
runConfigure ./configure
make
} }
INSTALL() INSTALL()
{ {
make install make -f Makefile.BeOS install INSTALL_DIR=$appsDir
} }