mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
232 lines
7.6 KiB
Plaintext
232 lines
7.6 KiB
Plaintext
From 95ad550d41fdaa174da0d595b22cab2ff6e4c8ee Mon Sep 17 00:00:00 2001
|
|
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
|
Date: Thu, 13 Jul 2023 21:10:12 +1000
|
|
Subject: Fix build for haiku
|
|
|
|
|
|
diff --git a/3rdparty/openmpt/include/genie/build/gmake.linux/genie.make b/3rdparty/openmpt/include/genie/build/gmake.linux/genie.make
|
|
index 88c81a4..92ac36c 100644
|
|
--- a/3rdparty/openmpt/include/genie/build/gmake.linux/genie.make
|
|
+++ b/3rdparty/openmpt/include/genie/build/gmake.linux/genie.make
|
|
@@ -62,7 +62,7 @@ ifeq ($(config),release)
|
|
LIBDEPS +=
|
|
LDDEPS +=
|
|
LDRESP =
|
|
- LIBS += $(LDDEPS) -ldl -lm
|
|
+ LIBS += $(LDDEPS) -lm
|
|
EXTERNAL_LIBS +=
|
|
LINKOBJS = $(OBJECTS)
|
|
LINKCMD = $(CC) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
|
@@ -149,7 +149,7 @@ ifeq ($(config),debug)
|
|
LIBDEPS +=
|
|
LDDEPS +=
|
|
LDRESP =
|
|
- LIBS += $(LDDEPS) -ldl -lm
|
|
+ LIBS += $(LDDEPS) -lm
|
|
EXTERNAL_LIBS +=
|
|
LINKOBJS = $(OBJECTS)
|
|
LINKCMD = $(CC) -o $(TARGET) $(LINKOBJS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
|
diff --git a/3rdparty/openmpt/include/premake/Bootstrap.mak b/3rdparty/openmpt/include/premake/Bootstrap.mak
|
|
index 1ee29ba..f4450f5 100644
|
|
--- a/3rdparty/openmpt/include/premake/Bootstrap.mak
|
|
+++ b/3rdparty/openmpt/include/premake/Bootstrap.mak
|
|
@@ -78,7 +78,7 @@ linux: $(SRC)
|
|
$(SILENT) rm -rf ./build
|
|
$(SILENT) rm -rf ./obj
|
|
mkdir -p build/bootstrap
|
|
- $(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $? -lm -ldl -lrt
|
|
+ $(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $? -lm
|
|
./build/bootstrap/premake_bootstrap embed
|
|
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake2
|
|
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)
|
|
diff --git a/3rdparty/unrar/os.hpp b/3rdparty/unrar/os.hpp
|
|
index 21488a8..f3455e5 100644
|
|
--- a/3rdparty/unrar/os.hpp
|
|
+++ b/3rdparty/unrar/os.hpp
|
|
@@ -212,6 +212,12 @@
|
|
#endif
|
|
#endif
|
|
|
|
+#if defined(__HAIKU__)
|
|
+ #ifndef BIG_ENDIAN
|
|
+ #define BIG_ENDIAN
|
|
+ #endif
|
|
+#endif
|
|
+
|
|
#endif
|
|
|
|
typedef const char* MSGID;
|
|
diff --git a/apps/zxtune-qt/ui/preferences/Makefile b/apps/zxtune-qt/ui/preferences/Makefile
|
|
index 0deee8b..cd7cff0 100644
|
|
--- a/apps/zxtune-qt/ui/preferences/Makefile
|
|
+++ b/apps/zxtune-qt/ui/preferences/Makefile
|
|
@@ -5,7 +5,7 @@ source_dirs := .
|
|
|
|
ui_files = aym mixer mixing plugins sound saa sid z80 interface preferencesdialog
|
|
|
|
-ui_files += sound_alsa sound_dsound sound_oss sound_sdl sound_win32
|
|
+#ui_files += sound_alsa sound_dsound sound_oss sound_sdl sound_win32
|
|
|
|
ts_files := ui_preferences
|
|
|
|
diff --git a/apps/zxtune-qt/ui/preferences/sound.cpp b/apps/zxtune-qt/ui/preferences/sound.cpp
|
|
index bccfb94..9875cc3 100644
|
|
--- a/apps/zxtune-qt/ui/preferences/sound.cpp
|
|
+++ b/apps/zxtune-qt/ui/preferences/sound.cpp
|
|
@@ -11,11 +11,13 @@
|
|
// local includes
|
|
#include "sound.h"
|
|
#include "sound.ui.h"
|
|
+#ifndef __HAIKU__
|
|
#include "sound_alsa.h"
|
|
#include "sound_dsound.h"
|
|
#include "sound_oss.h"
|
|
#include "sound_sdl.h"
|
|
#include "sound_win32.h"
|
|
+#endif
|
|
#include "supp/options.h"
|
|
#include "ui/tools/parameters_helpers.h"
|
|
#include "ui/utils.h"
|
|
@@ -99,13 +101,15 @@ namespace
|
|
{
|
|
backendsList->addItem(ToQString(id));
|
|
}
|
|
+#ifndef __HAIKU__
|
|
AddPage(&UI::AlsaSettingsWidget::Create);
|
|
AddPage(&UI::DirectSoundSettingsWidget::Create);
|
|
AddPage(&UI::OssSettingsWidget::Create);
|
|
AddPage(&UI::SdlSettingsWidget::Create);
|
|
AddPage(&UI::Win32SettingsWidget::Create);
|
|
+#endif
|
|
}
|
|
-
|
|
+#ifndef __HAIKU__
|
|
void AddPage(UI::BackendSettingsWidget* (*factory)(QWidget&))
|
|
{
|
|
std::unique_ptr<UI::BackendSettingsWidget> wid(factory(*backendGroupBox));
|
|
@@ -117,7 +121,7 @@ namespace
|
|
SetupPages[id] = wid.release();
|
|
}
|
|
}
|
|
-
|
|
+#endif
|
|
void SetFrequency(uint_t val)
|
|
{
|
|
const uint_t* const frq = std::find(FREQUENCES, std::end(FREQUENCES), val);
|
|
diff --git a/make/compilers/gcc.mak b/make/compilers/gcc.mak
|
|
index 171a1e5..fc987aa 100644
|
|
--- a/make/compilers/gcc.mak
|
|
+++ b/make/compilers/gcc.mak
|
|
@@ -62,7 +62,7 @@ LDFLAGS = $(LD_MODE_FLAGS) $($(platform).ld.flags) $($(platform).$(arch).ld.flag
|
|
|
|
#specify endpoint commands
|
|
build_obj_cmd_nodeps = $(tools.cxx) $(CXXFLAGS) -c $$(realpath $1) -o $2
|
|
-build_obj_cmd = $(build_obj_cmd_nodeps) -MMD
|
|
+build_obj_cmd = $(build_obj_cmd_nodeps) -MMD -std=c++17
|
|
build_obj_cmd_cc = $(tools.cc) $(CCFLAGS) -c $$(realpath $1) -o $2 -MMD
|
|
build_lib_cmd = $(tools.ar) $(ARFLAGS) $2 $1
|
|
link_cmd = $(tools.ld) $(LDFLAGS) -o $@ $(OBJECTS) $(RESOURCES) \
|
|
@@ -118,4 +118,4 @@ symbolstree: $(target).syms.json
|
|
websymbolstree: $(target).syms.json
|
|
(cd $(bloat_dir) && $(tools.python) $(tools_dir)/server.py /bloat.json=$(abspath $^))
|
|
endif
|
|
-endif
|
|
\ No newline at end of file
|
|
+endif
|
|
diff --git a/make/features.mak b/make/features.mak
|
|
index bd54710..440f91c 100644
|
|
--- a/make/features.mak
|
|
+++ b/make/features.mak
|
|
@@ -8,10 +8,11 @@ support_ogg = 1
|
|
support_flac = 1
|
|
support_curl = 1
|
|
else ifneq ($(findstring $(platform),linux),)
|
|
-support_oss = 1
|
|
-support_alsa = 1
|
|
+#support_oss = 1
|
|
+#support_alsa = 1
|
|
#support_sdl = 1
|
|
-support_pulseaudio = 1
|
|
+#support_pulseaudio = 1
|
|
+support_openal = 1
|
|
support_mp3 = 1
|
|
support_ogg = 1
|
|
support_flac = 1
|
|
diff --git a/src/sound/backends/Makefile b/src/sound/backends/Makefile
|
|
index f11401d..f9b4b85 100644
|
|
--- a/src/sound/backends/Makefile
|
|
+++ b/src/sound/backends/Makefile
|
|
@@ -28,11 +28,11 @@ source_files += $(1)_stub.cpp
|
|
endif
|
|
endef
|
|
|
|
-$(eval $(call declare_native_backend,waveout,win32))
|
|
-$(eval $(call declare_native_backend,directsound,dsound))
|
|
-$(eval $(call declare_native_backend,alsa,alsa))
|
|
-$(eval $(call declare_native_backend,sdl,sdl))
|
|
-$(eval $(call declare_native_backend,pulseaudio,paudio))
|
|
+#$(eval $(call declare_native_backend,waveout,win32))
|
|
+#$(eval $(call declare_native_backend,directsound,dsound))
|
|
+#$(eval $(call declare_native_backend,alsa,alsa))
|
|
+#$(eval $(call declare_native_backend,sdl,sdl))
|
|
+#$(eval $(call declare_native_backend,pulseaudio,paudio))
|
|
$(eval $(call declare_native_backend,openal,openal))
|
|
|
|
ifdef support_aylpt
|
|
@@ -41,11 +41,11 @@ else
|
|
source_files += aylpt_stub.cpp
|
|
endif
|
|
|
|
-ifdef support_oss
|
|
-source_files += oss_backend.cpp
|
|
-else
|
|
+#ifdef support_oss
|
|
+#source_files += oss_backend.cpp
|
|
+#else
|
|
source_files += oss_stub.cpp
|
|
-endif
|
|
+#endif
|
|
|
|
$(eval $(call declare_thirdparty_backend,flac))
|
|
$(eval $(call declare_thirdparty_backend,mp3))
|
|
diff --git a/src/sound/backends/backends_list.h b/src/sound/backends/backends_list.h
|
|
index 867e91d..84a19cc 100644
|
|
--- a/src/sound/backends/backends_list.h
|
|
+++ b/src/sound/backends/backends_list.h
|
|
@@ -31,12 +31,14 @@ namespace Sound
|
|
|
|
inline void RegisterSystemBackends(BackendsStorage& storage)
|
|
{
|
|
+#ifndef __HAIKU__
|
|
RegisterOssBackend(storage);
|
|
RegisterAlsaBackend(storage);
|
|
RegisterPulseAudioBackend(storage);
|
|
RegisterDirectSoundBackend(storage);
|
|
RegisterWin32Backend(storage);
|
|
RegisterSdlBackend(storage);
|
|
+#endif
|
|
RegisterOpenAlBackend(storage);
|
|
RegisterAyLptBackend(storage);
|
|
}
|
|
diff --git a/src/sound/backends/gates/openal_api.h b/src/sound/backends/gates/openal_api.h
|
|
index f49eadc..a5dab63 100644
|
|
--- a/src/sound/backends/gates/openal_api.h
|
|
+++ b/src/sound/backends/gates/openal_api.h
|
|
@@ -13,8 +13,13 @@
|
|
// std includes
|
|
#include <memory>
|
|
// platform-dependent includes
|
|
+#ifdef __HAIKU__
|
|
+#include <AL/al.h>
|
|
+#include <AL/alc.h>
|
|
+#else
|
|
#include <OpenAL/al.h>
|
|
#include <OpenAL/alc.h>
|
|
+#endif
|
|
|
|
namespace Sound::OpenAl
|
|
{
|
|
--
|
|
2.37.3
|
|
|