mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
LMMS: bump version
This commit is contained in:
98
media-sound/lmms/patches/lmms-1.2.0~rc8.patchset
Normal file
98
media-sound/lmms/patches/lmms-1.2.0~rc8.patchset
Normal file
@@ -0,0 +1,98 @@
|
||||
From 52b2bc68068317d3ecd202c5faabc9572637ce8f Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 14 Apr 2019 19:41:47 +1000
|
||||
Subject: Disable TLS for Haiku
|
||||
|
||||
|
||||
diff --git a/src/3rdparty/rpmalloc/CMakeLists.txt b/src/3rdparty/rpmalloc/CMakeLists.txt
|
||||
index 23d1551..c0af99d 100644
|
||||
--- a/src/3rdparty/rpmalloc/CMakeLists.txt
|
||||
+++ b/src/3rdparty/rpmalloc/CMakeLists.txt
|
||||
@@ -15,6 +15,12 @@ if (NOT LMMS_BUILD_WIN32)
|
||||
)
|
||||
endif()
|
||||
|
||||
+if (HAIKU)
|
||||
+ target_compile_definitions(rpmalloc
|
||||
+ PRIVATE -DENABLE_PRELOAD=1
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
# rpmalloc uses GCC builtin "__builtin_umull_overflow" with ENABLE_VALIDATE_ARGS,
|
||||
# which is only available starting with GCC 5
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 0c057df6a1904d59ad7f0b1e6a3d2605b89fad62 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 14 Apr 2019 21:46:08 +1000
|
||||
Subject: Fix settings dir
|
||||
|
||||
|
||||
diff --git a/src/core/ConfigManager.cpp b/src/core/ConfigManager.cpp
|
||||
index f52e10a..2738c12 100644
|
||||
--- a/src/core/ConfigManager.cpp
|
||||
+++ b/src/core/ConfigManager.cpp
|
||||
@@ -33,6 +33,10 @@
|
||||
#endif
|
||||
#include <QtCore/QTextStream>
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#include <FindDirectory.h>
|
||||
+#endif
|
||||
+
|
||||
#include "ConfigManager.h"
|
||||
#include "MainWindow.h"
|
||||
#include "ProjectVersion.h"
|
||||
@@ -73,7 +77,13 @@ ConfigManager::ConfigManager() :
|
||||
|
||||
if (! qgetenv("LMMS_DATA_DIR").isEmpty())
|
||||
QDir::addSearchPath("data", QString::fromLocal8Bit(qgetenv("LMMS_DATA_DIR")));
|
||||
-
|
||||
+#ifdef __HAIKU__
|
||||
+ m_workingDir = QDir::home().absolutePath() +"/config/settings/LMMS/";
|
||||
+ m_lmmsRcFile = m_workingDir +"/lmmsrc.xml";
|
||||
+ m_gigDir = m_workingDir + GIG_PATH;
|
||||
+ m_vstDir = "/system/add-ons/media/vstplugins/";
|
||||
+ m_sf2Dir = "/system/data/synth/";
|
||||
+#endif
|
||||
// If we're in development (lmms is not installed) let's get the source and
|
||||
// binary directories by reading the CMake Cache
|
||||
QDir appPath = qApp->applicationDirPath();
|
||||
@@ -114,6 +124,8 @@ ConfigManager::ConfigManager() :
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
QDir::addSearchPath("data", qApp->applicationDirPath() + "/data/");
|
||||
+#elif __HAIKU__
|
||||
+ QDir::addSearchPath("data", qApp->applicationDirPath() + "/");
|
||||
#else
|
||||
QDir::addSearchPath("data", qApp->applicationDirPath().section('/', 0, -2) + "/share/lmms/");
|
||||
#endif
|
||||
@@ -524,6 +536,22 @@ void ConfigManager::loadConfigFile( const QString & configFile )
|
||||
cfg_file.close();
|
||||
}
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+ char midiSettings[PATH_MAX] = "";
|
||||
+ if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, midiSettings, sizeof(midiSettings)) == B_OK) {
|
||||
+ strcat(midiSettings, "/Media/midi_settings");
|
||||
+ if( access( midiSettings, F_OK ) != -1 ) {
|
||||
+ FILE *inFile = fopen(midiSettings, "rt");
|
||||
+ if (inFile) {
|
||||
+ char sf2file[PATH_MAX];
|
||||
+ if (fscanf(inFile, "# Midi\n\tsoundfont \"%[^\"]\"", sf2file)) {
|
||||
+ setDefaultSoundfont( sf2file );
|
||||
+ }
|
||||
+ fclose(inFile);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
if( m_vstDir.isEmpty() || m_vstDir == QDir::separator() || m_vstDir == "/" ||
|
||||
!QDir( m_vstDir ).exists() )
|
||||
--
|
||||
2.21.0
|
||||
|
||||
Reference in New Issue
Block a user