summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeteros2020-05-22 19:59:58 +0100
committerTeteros2020-05-22 19:59:58 +0100
commit33e931ca581a48425f9f8e82475113a7293f111d (patch)
treea60f52beb27ff72876dd5342d247e0b8e62d8a48
parent8fdcc9d3525e79a88859292aa6cc2d38a5ba5d7d (diff)
downloadaur-33e931ca581a48425f9f8e82475113a7293f111d.tar.gz
5.9.98-2
-rw-r--r--.SRCINFO32
-rw-r--r--0001-Internal-Various-compilation-fixes-plus-assert-that-.patch280
-rw-r--r--0001-Linux-Macosx-Fix-compiling-with-newer-bdf.h.patch (renamed from 0003-Linux-Macosx-Fix-compiling-with-newer-bdf.h.patch)8
-rw-r--r--0002-Build-Add-RADIUM_VST2SDK_PATH-environment-variable.patch (renamed from use-system-vstsdk.patch)81
-rw-r--r--0002-Sequencer-Fix-program-sometimes-crashing-in-debug-mo.patch39
-rw-r--r--0003-Editor-Fix-assertion-window-popping-up-when-assignin.patch27
-rw-r--r--0004-MIDI-Don-t-apply-channel-to-MIDI-system-messages-0xf.patch26
-rw-r--r--0005-Sequencer-Fix-vertical-seqtrack-scrollbar-not-always.patch67
-rw-r--r--0006-Blocks-Fix-undo-delete-insert-block.-It-messed-up-th.patch60
-rw-r--r--0007-Linux-Only-use-included-libxcb-if-the-system-version.patch189
-rw-r--r--0008-Build-Allow-skipping-libxcb-compile-with-env-vars.patch53
-rw-r--r--0009-Build-Switch-to-clang-to-build-libpd-master.patch24
-rw-r--r--PKGBUILD51
-rw-r--r--use-system-libxcb.patch112
14 files changed, 550 insertions, 499 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 84a5e12f0691..2eb651bfa6d2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,13 @@
pkgbase = radium
pkgdesc = A graphical music editor. A next generation tracker.
pkgver = 5.9.98
- pkgrel = 1
+ pkgrel = 2
url = https://users.notam02.no/~kjetism/radium
arch = i686
arch = x86_64
license = GPL2
makedepends = boost
+ makedepends = clang
makedepends = cmake
makedepends = ladspa
makedepends = libxcursor
@@ -33,19 +34,28 @@ pkgbase = radium
depends = ttf-lato
optdepends = calf-ladspa: Default chorus plugin
optdepends = ladspa-plugins: Package group for default radium plugins included in binary releases
+ optdepends = python: Used for scheme scripting
options = !strip
source = https://github.com/kmatheussen/radium/archive/5.9.98.tar.gz
- source = 0001-Internal-Various-compilation-fixes-plus-assert-that-.patch
- source = 0002-Sequencer-Fix-program-sometimes-crashing-in-debug-mo.patch
- source = 0003-Linux-Macosx-Fix-compiling-with-newer-bdf.h.patch
- source = use-system-libxcb.patch
- source = use-system-vstsdk.patch
+ source = 0001-Linux-Macosx-Fix-compiling-with-newer-bdf.h.patch
+ source = 0002-Build-Add-RADIUM_VST2SDK_PATH-environment-variable.patch
+ source = 0003-Editor-Fix-assertion-window-popping-up-when-assignin.patch
+ source = 0004-MIDI-Don-t-apply-channel-to-MIDI-system-messages-0xf.patch
+ source = 0005-Sequencer-Fix-vertical-seqtrack-scrollbar-not-always.patch
+ source = 0006-Blocks-Fix-undo-delete-insert-block.-It-messed-up-th.patch
+ source = 0007-Linux-Only-use-included-libxcb-if-the-system-version.patch
+ source = 0008-Build-Allow-skipping-libxcb-compile-with-env-vars.patch
+ source = 0009-Build-Switch-to-clang-to-build-libpd-master.patch
sha256sums = 3b1b5b9f72536d79561f602f278611979fbc9a8720cd3064c001998a22de9e90
- sha256sums = c658253e13eb5e5dbe44d5e968634da4ea474885bd4ea33b4d7c586b8aa58cc2
- sha256sums = eb6641f77506799eab7f3fadccd5e129fc3a5f1a4cefd099d97dd1918aaa26d8
- sha256sums = b0841d5979936a87b179a5ac8a61f326493b50ddcdb79b10da27870af1b204ab
- sha256sums = 6c29e825e06d1c3aec4afd915718b8c46da705d1411a94f7c0f777b888a9b50d
- sha256sums = a1ee3635dd9338e2ea2fc76cddf670fcb046afeba553a12b73158cf0b51a52f6
+ sha256sums = cd8a424cbe379ab38eb705d6b56a1e65b67879fee1eb87f7e226b944af9ad3de
+ sha256sums = 83d90f5418ca7429ed4e3c7ba9392b3bb4191528c2681f076f56ffe6f7617eef
+ sha256sums = 9baab8d625955070dbf92b37095c34b8b3c7fa80c1838e651f2f1430b5221a34
+ sha256sums = 4642e56d315d65a8a60f5bc57fabcee5daa1a7fc45feca88a472d8d3cfedda36
+ sha256sums = 34f9d7e75978e8dffcb4c1f56b0d7f69376037c7c04daa44b8a7cf6b90cb0342
+ sha256sums = e3e1ab4936ddbbc37eb4d0da6f6d6b8013aca22afa5944c0148675325a7760b0
+ sha256sums = 0be52efa89ba74c9f90cdfd5fcc29dbfbeb1f9bae12f59def113f682de84d7f6
+ sha256sums = f64abc5bd3eb9373f62702dd58e047e6cad7e5c3774f5a7c1045cc58e05a5111
+ sha256sums = d8610fb4e104ea6763777001c614f35ff109da046b9d47b4955a014397368fdf
pkgname = radium
diff --git a/0001-Internal-Various-compilation-fixes-plus-assert-that-.patch b/0001-Internal-Various-compilation-fixes-plus-assert-that-.patch
deleted file mode 100644
index 28b68eef2c2e..000000000000
--- a/0001-Internal-Various-compilation-fixes-plus-assert-that-.patch
+++ /dev/null
@@ -1,280 +0,0 @@
-From 94af14231e09e9b4dbe462622b7d5eb97896de59 Mon Sep 17 00:00:00 2001
-From: Kjetil Matheussen <k.s.matheussen@notam02.no>
-Date: Thu, 5 Mar 2020 12:52:37 +0100
-Subject: [PATCH 1/3] Internal: Various compilation fixes, plus assert that we
- are not trying to free a memory object with finalization
-
----
- OpenGL/Widget.cpp | 4 ++--
- Qt/Qt_Main.cpp | 4 +++-
- Qt/Qt_MainWindow.cpp | 4 ++++
- Qt/Qt_settings.cpp | 2 +-
- api/s7_types_generator.scm | 3 +++
- audio/SoundProducer.cpp | 14 ++++++++++++-
- common/memory.c | 20 +++++++++++++++++--
- common/nsmtracker.h | 9 +++++++++
- common/sequencer.cpp | 40 ++++++++++++++++++++++++++++++++++----
- 9 files changed, 89 insertions(+), 11 deletions(-)
-
-diff --git a/OpenGL/Widget.cpp b/OpenGL/Widget.cpp
-index 90f97b751..5a8dc15ef 100644
---- a/OpenGL/Widget.cpp
-+++ b/OpenGL/Widget.cpp
-@@ -2541,7 +2541,7 @@ bool GL_check_compatibility(void){
- SETTINGS_write_bool("show_vsync_warning_during_startup", false);
- }
- }
--
-+
- if (is_opengl_certainly_too_old_questionmark()){
- GFX_Message(NULL,
- "Your version of OpenGL is too old. Radium can not run.\n"
-@@ -2551,7 +2551,7 @@ bool GL_check_compatibility(void){
- //exit(-1);
- return false;
- }
--
-+
- if (!is_opengl_version_recent_enough_questionmark()){
- vector_t v = {};
- VECTOR_push_back(&v,"Try to run anywyay"); // (but please don't send a bug report if Radium crashes)");
-diff --git a/Qt/Qt_Main.cpp b/Qt/Qt_Main.cpp
-index 65798d9c3..afa6f5a01 100755
---- a/Qt/Qt_Main.cpp
-+++ b/Qt/Qt_Main.cpp
-@@ -3723,7 +3723,9 @@ int main(int argc, char **argv){
- #endif
-
- #if defined(FOR_WINDOWS)
-+#if defined(RELEASE)
- DWORD progress_pid = atoi(argv[2]);
-+#endif
- GC_set_no_dls(1);
- #endif
-
-@@ -3874,7 +3876,7 @@ int main(int argc, char **argv){
- //QPixmap pixmap(QPixmap(OS_get_full_program_file_path("/home/kjetil/radium/pictures/logo_big.png")).scaled(QSize(256,256), Qt::KeepAspectRatioByExpanding));
- GFX_OpenProgress("Please wait, starting program");
-
--#if defined(FOR_WINDOWS)
-+#if defined(RELEASE) && defined(FOR_WINDOWS)
- {
- auto handle = OpenProcess(PROCESS_ALL_ACCESS, TRUE, progress_pid);
- if (handle != NULL)
-diff --git a/Qt/Qt_MainWindow.cpp b/Qt/Qt_MainWindow.cpp
-index 8884892d9..1387ccc6e 100644
---- a/Qt/Qt_MainWindow.cpp
-+++ b/Qt/Qt_MainWindow.cpp
-@@ -26,7 +26,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
- #include <QApplication>
- //#include <QSplitter>
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wnull-dereference"
- #include <QCloseEvent>
-+#pragma GCC diagnostic pop
-+
- #include <QStatusBar>
- #include <QMenuBar>
- #include <QUrl>
-diff --git a/Qt/Qt_settings.cpp b/Qt/Qt_settings.cpp
-index 7a7c80a81..b7df29d52 100644
---- a/Qt/Qt_settings.cpp
-+++ b/Qt/Qt_settings.cpp
-@@ -104,7 +104,7 @@ wchar_t *STRING_create(const QString s, bool use_gc_alloc){
-
- bool is_main_thread = THREADING_is_main_thread();
- if (is_main_thread==false)
-- R_ASSERT(use_gc_alloc==false);
-+ R_ASSERT_NON_RELEASE(use_gc_alloc==false);
-
- if (is_main_thread==false || use_gc_alloc==false){
- array = (wchar_t*)malloc(size);
-diff --git a/api/s7_types_generator.scm b/api/s7_types_generator.scm
-index 29b706eb9..77bff8fb5 100755
---- a/api/s7_types_generator.scm
-+++ b/api/s7_types_generator.scm
-@@ -68,8 +68,11 @@ exec guile -e main -s $0 $*
- (<->
- " const wchar_t* o = val.id==NULL ? NULL : wcsdup(val.id);\n")
- (<->
-+ "#pragma GCC diagnostic push\n"
-+ "#pragma GCC diagnostic ignored \"-Wint-to-pointer-cast\"\n"
- " if (sizeof(" c-type ") <= sizeof(void*))\n"
- " return s7_make_c_object(s7, g_" type "_type_tag, (void*)(val.id));\n"
-+ "#pragma GCC diagnostic pop\n"
- "\n"
- " " c-type " *o = (" c-type "*)malloc(sizeof(" c-type "));\n"
- " *o = val.id;\n"))
-diff --git a/audio/SoundProducer.cpp b/audio/SoundProducer.cpp
-index b30ccb693..3b021d921 100644
---- a/audio/SoundProducer.cpp
-+++ b/audio/SoundProducer.cpp
-@@ -309,6 +309,12 @@ public:
- if (source_ch==0 && target_ch==0){
-
- SoundPlugin *plugin = SP_get_plugin(source);
-+#if !defined(RELEASE)
-+ if(plugin==NULL){ // silence "null-dereference" warning.
-+ abort();
-+ return false;
-+ }
-+#endif
- const SoundPluginType *type = plugin->type;
- int effect_num = type->num_effects + EFFNUM_BUS1 + _bus_num;
-
-@@ -340,7 +346,13 @@ public:
- if (_is_bus_link){
-
- SoundPlugin *plugin = SP_get_plugin(source);
-- const SoundPluginType *type = plugin->type;
-+#if !defined(RELEASE)
-+ if(plugin==NULL){ // silence "null-dereference" warning.
-+ abort();
-+ return 0;
-+ }
-+#endif
-+ const SoundPluginType *type = plugin->type;
- int effect_num = type->num_effects + EFFNUM_BUS1 + _bus_num;
-
- //printf("Setting bus volume for %d to %f\n", bus_num, volume);
-diff --git a/common/memory.c b/common/memory.c
-index ebbf38109..08d54900c 100755
---- a/common/memory.c
-+++ b/common/memory.c
-@@ -66,10 +66,26 @@ void init_memory(void){
- return;
- }
-
-+#if !defined(RELEASE)
-+#ifndef DISABLE_BDWGC
-+static void dummy_finalizer(void *actual_mem_start, void *user_data){
-+}
-+#endif
-+#endif
-
- void tfree(void *element){
-- ASSERT_IS_NONRT_MAIN_THREAD_NON_RELEASE()
--
-+ ASSERT_IS_NONRT_MAIN_THREAD_NON_RELEASE();
-+
-+#if !defined(RELEASE)
-+#ifndef DISABLE_BDWGC
-+ // Check that element has no finalizer.
-+ GC_finalization_proc old = NULL;
-+ GC_register_finalizer(element, dummy_finalizer, NULL, &old, NULL);
-+ if (old!=NULL)
-+ abort();
-+#endif
-+#endif
-+
- #ifdef DISABLE_BDWGC
-
- if(element==NULL){
-diff --git a/common/nsmtracker.h b/common/nsmtracker.h
-index eff912ad4..eb92f9c22 100755
---- a/common/nsmtracker.h
-+++ b/common/nsmtracker.h
-@@ -145,9 +145,14 @@ static_assert (sizeof(long long int) >= 8, "sizof(long long int) must be 8 or hi
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wshorten-64-to-32"
-
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wnull-dereference"
-+
- #include <QList>
- #include <QMap>
-
-+#pragma GCC diagnostic pop
-+
- #pragma clang diagnostic pop
-
- #if !defined(__clang__)
-@@ -3285,6 +3290,10 @@ struct SeqBlock{
-
- float envelope_db; // db version of envelope_volume
-
-+#if !defined(RELEASE)
-+ int64_t gcfinalizerdebuggingvariable;
-+#endif
-+
- struct SeqblockAutomation *automations[NUM_SATS];
-
- struct StretchspeedTimeConversionTable conversion_table;
-diff --git a/common/sequencer.cpp b/common/sequencer.cpp
-index 66989672c..ff2616678 100644
---- a/common/sequencer.cpp
-+++ b/common/sequencer.cpp
-@@ -386,12 +386,35 @@ void SONG_call_me_before_starting_to_play_song(int64_t seqtime){
- gotit.wait_for_all_future_signals();
- }
-
--
-+#if !defined(RELEASE)
-+static int g_finalizer_num = 0;
-+namespace{
-+struct WithNum{
-+ int num = g_finalizer_num++;
-+ bool has_been_finalized = false;
-+};
-+}
-+#define MAGIC_FINALIZER_NUM 19340834513
-+#endif
-+
-+#if 1
-+
- static void seqblockgcfinalizer(void *actual_mem_start, void *user_data){
- struct SeqBlock *seqblock = (struct SeqBlock*)actual_mem_start;
- //printf("=============================FINALIZING seqblock\n");
- //abort();
- //getchar();
-+
-+#if !defined(RELEASE)
-+ WithNum *withnum = (WithNum*)user_data;
-+ if (withnum->num<0 || withnum->has_been_finalized==true)
-+ abort();
-+ withnum->has_been_finalized=true;
-+ printf(" Seqblock finalizing %d\n", withnum->num);
-+
-+ if (seqblock->gcfinalizerdebuggingvariable != MAGIC_FINALIZER_NUM)
-+ abort();
-+#endif
-
- for(int i = 0 ; i < NUM_SATS; i++)
- SEQBLOCK_AUTOMATION_free(seqblock->automations[i]);
-@@ -401,7 +424,7 @@ static void seqblockgcfinalizer(void *actual_mem_start, void *user_data){
-
- SEQBLOCK_STRETCHSPEED_call_me_when_seqblock_is_released(seqblock);
- }
--
-+#endif
- static int64_t get_default_duration_from_num_samples(const struct SeqTrack *seqtrack, struct SeqBlock *seqblock, int64_t num_samples){
- R_ASSERT_RETURN_IF_FALSE2(seqblock->block==NULL, pc->pfreq);
- R_ASSERT_RETURN_IF_FALSE2(seqtrack->patch!=NULL, pc->pfreq);
-@@ -512,12 +535,21 @@ void SEQBLOCK_init(const struct SeqTrack *seqtrack, struct SeqBlock *seqblock, s
- }
- }
-
--
-+ /*
-+ static vector_t temp = {};
-+ VECTOR_push_back(&temp, seqblock);
-+ */
-+
- seqblock->fade_in_envelope = new radium::Envelope(FADE_LINEAR, 1.0, true);
- seqblock->fade_out_envelope = new radium::Envelope(FADE_LINEAR, 1.0, false);
-
-+#if defined(RELEASE)
- GC_register_finalizer(seqblock, seqblockgcfinalizer, NULL, NULL, NULL);
--
-+#else
-+ seqblock->gcfinalizerdebuggingvariable = MAGIC_FINALIZER_NUM;
-+ GC_register_finalizer(seqblock, seqblockgcfinalizer, (void*)new WithNum, NULL, NULL);
-+#endif
-+
- }else{
-
- // Happens when starting to play block.
---
-2.25.1
-
diff --git a/0003-Linux-Macosx-Fix-compiling-with-newer-bdf.h.patch b/0001-Linux-Macosx-Fix-compiling-with-newer-bdf.h.patch
index acba206a87f5..e85764662bf7 100644
--- a/0003-Linux-Macosx-Fix-compiling-with-newer-bdf.h.patch
+++ b/0001-Linux-Macosx-Fix-compiling-with-newer-bdf.h.patch
@@ -1,14 +1,14 @@
-From 37df0d0a2c5263c4be22c56ba6ddcbd65ef16371 Mon Sep 17 00:00:00 2001
+From 3247072ca0edabd0bfb2523efc19d14e22bbe467 Mon Sep 17 00:00:00 2001
From: Kjetil Matheussen <k.s.matheussen@notam02.no>
Date: Fri, 6 Mar 2020 14:19:16 +0100
-Subject: [PATCH 3/3] Linux/Macosx: Fix compiling with newer bdf.h
+Subject: [PATCH 1/9] Linux/Macosx: Fix compiling with newer bdf.h
---
crashreporter/backtrace-symbols.c | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/crashreporter/backtrace-symbols.c b/crashreporter/backtrace-symbols.c
-index 0ee3a43fc..393703584 100644
+index 0ee3a43f..39370358 100644
--- a/crashreporter/backtrace-symbols.c
+++ b/crashreporter/backtrace-symbols.c
@@ -57,6 +57,16 @@ Downloaded from http://opensource.apple.com/source/X11libs/X11libs-40.2/cairo/ca
@@ -65,5 +65,5 @@ index 0ee3a43fc..393703584 100644
&filename, &functionname, &line);
}
--
-2.25.1
+2.26.2
diff --git a/use-system-vstsdk.patch b/0002-Build-Add-RADIUM_VST2SDK_PATH-environment-variable.patch
index c790aa679204..20d43fb91d41 100644
--- a/use-system-vstsdk.patch
+++ b/0002-Build-Add-RADIUM_VST2SDK_PATH-environment-variable.patch
@@ -1,44 +1,65 @@
-diff -aur --no-dereference radium-5.9.98.pristine/check_dependencies.sh radium-5.9.98.new/check_dependencies.sh
---- radium-5.9.98.pristine/check_dependencies.sh 2020-03-04 11:54:26.000000000 +0000
-+++ radium-5.9.98.new/check_dependencies.sh 2020-03-05 19:39:44.645529813 +0000
-@@ -226,11 +226,11 @@
- exit 5
- fi
-
--if [[ ! -f ~/SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h && ! -f ~/SDKs/"VST3 SDK"/pluginterfaces/vst2.x/aeffect.h && ! -f ~/SDKs/VST_SDK/VST2_SDK/pluginterfaces/vst2.x/aeffect.h ]] ; then
-- echo 'Steinberg VST headers not found. (Missing "~/SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h or "~/SDKs/VST3 SDK/pluginterfaces/vst2.x/aeffect.h" or "~/SDKs/VST_SDK/VST2_SDK/pluginterfaces/vst2.x/aeffect.h")'
-- echo 'You should find these files in the "VST Audio Plug-Ins SDK" from http://www.steinberg.net/en/company/developers.html . Unless Steinberg have changed the directory structure again, it should enough to unzip the file into your ~/SDKs directory.'
-- exit 5
--fi
-+#if [[ ! -f ~/SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h && ! -f ~/SDKs/"VST3 SDK"/pluginterfaces/vst2.x/aeffect.h && ! -f ~/SDKs/VST_SDK/VST2_SDK/pluginterfaces/vst2.x/aeffect.h ]] ; then
-+# echo 'Steinberg VST headers not found. (Missing "~/SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h or "~/SDKs/VST3 SDK/pluginterfaces/vst2.x/aeffect.h" or "~/SDKs/VST_SDK/VST2_SDK/pluginterfaces/vst2.x/aeffect.h")'
-+# echo 'You should find these files in the "VST Audio Plug-Ins SDK" from http://www.steinberg.net/en/company/developers.html . Unless Steinberg have changed the directory structure again, it should enough to unzip the file into your ~/SDKs directory.'
-+# exit 5
-+#fi
-
-
- if [[ $4 == "test_build" ]] ; then
-diff -aur --no-dereference radium-5.9.98.pristine/Makefile.Qt radium-5.9.98.new/Makefile.Qt
---- radium-5.9.98.pristine/Makefile.Qt 2020-03-04 11:54:26.000000000 +0000
-+++ radium-5.9.98.new/Makefile.Qt 2020-03-05 19:48:52.498540565 +0000
-@@ -296,7 +296,7 @@
+From 2addd1226a6d68f7c761b354681e0cbb391cf814 Mon Sep 17 00:00:00 2001
+From: Teteros <Teteros@users.noreply.github.com>
+Date: Wed, 22 Apr 2020 05:12:26 +0100
+Subject: [PATCH 2/9] Build: Add RADIUM_VST2SDK_PATH environment variable
+
+Adds an extra search path users can use to help locate their VST2 SDK.
+Simply export RADIUM_VST2SDK_PATH in before make packages when desired.
+
+Also fixes the link in the check_dependencies.sh since Steinberg
+deprecated VST2 so it was no longer available in the mentioned link.
+---
+ Makefile.Qt | 2 +-
+ check_dependencies.sh | 9 +++++----
+ pluginhost/Builds/Linux/Makefile | 2 +-
+ 3 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile.Qt b/Makefile.Qt
+index d49b415a..24bf39b0 100755
+--- a/Makefile.Qt
++++ b/Makefile.Qt
+@@ -296,7 +296,7 @@ MENU_TYPE = -DUSE_QT_MENU=1 -DUSE_GTK_MENU=0
FLAGOPTS = $(DEFINES) -DGUIISQT -DFULL_VERSION=$(FULL_VERSION) -DIS_LITTLE_ENDIAN=1 -DUSE_OPENGL=1 $(VISUAL) $(REQTYPE_TYPE) $(MENU_TYPE)
-COMMONOPT = -c $(RADIUM_BFD_CFLAGS) `cat buildtype.opt` -I$(GCDIR)/include -I$(P) -I$(PYPATH) `cat flagopts.opt` $(MIDIINC) $(OS_OPTS) $(VST_OPTS) -I${HOME}/boost_1_70_0 -I${HOME}/boost_1_67_0 -I${HOME}/boost_1_63_0 -I ~/SDKs/VST_SDK/VST2_SDK/ -I ~/SDKs/vstsdk2.4/ -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unknown-pragmas -fno-strict-aliasing -Wmissing-field-initializers -Wnull-dereference
-+COMMONOPT = -c $(RADIUM_BFD_CFLAGS) `cat buildtype.opt` -I$(GCDIR)/include -I$(P) -I$(PYPATH) `cat flagopts.opt` $(MIDIINC) $(OS_OPTS) $(VST_OPTS) -I${HOME}/boost_1_70_0 -I${HOME}/boost_1_67_0 -I${HOME}/boost_1_63_0 -I /usr/include/vst36 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unknown-pragmas -fno-strict-aliasing -Wmissing-field-initializers -Wnull-dereference
++COMMONOPT = -c $(RADIUM_BFD_CFLAGS) `cat buildtype.opt` -I$(GCDIR)/include -I$(P) -I$(PYPATH) `cat flagopts.opt` $(MIDIINC) $(OS_OPTS) $(VST_OPTS) -I${HOME}/boost_1_70_0 -I${HOME}/boost_1_67_0 -I${HOME}/boost_1_63_0 -I${RADIUM_VST2SDK_PATH} -I ~/SDKs/VST_SDK/VST2_SDK/ -I ~/SDKs/vstsdk2.4/ -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unknown-pragmas -fno-strict-aliasing -Wmissing-field-initializers -Wnull-dereference
#-fdelete-null-pointer-checks
# -Werror
-diff -aur --no-dereference radium-5.9.98.pristine/pluginhost/Builds/Linux/Makefile radium-5.9.98.new/pluginhost/Builds/Linux/Makefile
---- radium-5.9.98.pristine/pluginhost/Builds/Linux/Makefile 2020-03-04 11:54:26.000000000 +0000
-+++ radium-5.9.98.new/pluginhost/Builds/Linux/Makefile 2020-03-05 19:39:44.648863139 +0000
-@@ -8,7 +8,7 @@
+diff --git a/check_dependencies.sh b/check_dependencies.sh
+index 1e13a513..4cc11517 100755
+--- a/check_dependencies.sh
++++ b/check_dependencies.sh
+@@ -225,10 +225,11 @@ if ! pkg-config --cflags glib-2.0 >/dev/null 2>/dev/null ; then
+ echo "glib-2.0 not found"
+ exit 5
+ fi
+-
+-if [[ ! -f ~/SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h && ! -f ~/SDKs/"VST3 SDK"/pluginterfaces/vst2.x/aeffect.h && ! -f ~/SDKs/VST_SDK/VST2_SDK/pluginterfaces/vst2.x/aeffect.h ]] ; then
+- echo 'Steinberg VST headers not found. (Missing "~/SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h or "~/SDKs/VST3 SDK/pluginterfaces/vst2.x/aeffect.h" or "~/SDKs/VST_SDK/VST2_SDK/pluginterfaces/vst2.x/aeffect.h")'
+- echo 'You should find these files in the "VST Audio Plug-Ins SDK" from http://www.steinberg.net/en/company/developers.html . Unless Steinberg have changed the directory structure again, it should enough to unzip the file into your ~/SDKs directory.'
++if [[ ! -f "${RADIUM_VST2SDK_PATH}/pluginterfaces/vst2.x/aeffect.h" && ! -f ~/SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h && ! -f ~/SDKs/"VST3 SDK"/pluginterfaces/vst2.x/aeffect.h && ! -f ~/SDKs/VST_SDK/VST2_SDK/pluginterfaces/vst2.x/aeffect.h ]] ; then
++ echo 'Steinberg VST2 headers not found. (Missing "~/SDKs/vstsdk2.4/pluginterfaces/vst2.x/aeffect.h or "~/SDKs/VST3 SDK/pluginterfaces/vst2.x/aeffect.h" or "~/SDKs/VST_SDK/VST2_SDK/pluginterfaces/vst2.x/aeffect.h")'
++ echo 'You may obtain a copy of the VST2 SDK from here: https://www.steinberg.net/sdk_downloads/vstsdk367_03_03_2017_build_352.zip'
++ echo 'It should enough to unzip the file into your ~/SDKs directory.'
++ echo 'Alternatively pass the RADIUM_VST2SDK_PATH environment variable during build which has the above headers to specify another search path.'
+ exit 5
+ fi
+
+diff --git a/pluginhost/Builds/Linux/Makefile b/pluginhost/Builds/Linux/Makefile
+index ff10bea4..b58ee51f 100644
+--- a/pluginhost/Builds/Linux/Makefile
++++ b/pluginhost/Builds/Linux/Makefile
+@@ -8,7 +8,7 @@ ifndef CONFIG
CONFIG=Debug
endif
-COMMONCPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "_DEBUG=1" -D "JUCE_CHECK_MEMORY_LEAKS=0" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I~/SDKs/VST_SDK/VST3_SDK -I ~/SDKs/VST_SDK/VST2_SDK/ -I ~/SDKs/VST3\ SDK -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules -I ~/SDKs/vstsdk2.4 -DJUCE_APP_CONFIG_HEADER="\"AppConfig.h\"" -mfpmath=sse -msse2
-+COMMONCPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "_DEBUG=1" -D "JUCE_CHECK_MEMORY_LEAKS=0" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I /usr/include/vst36 -I~/SDKs/VST_SDK/VST3_SDK -I ~/SDKs/VST_SDK/VST2_SDK/ -I ~/SDKs/VST3\ SDK -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules -I ~/SDKs/vstsdk2.4 -DJUCE_APP_CONFIG_HEADER="\"AppConfig.h\"" -mfpmath=sse -msse2
++COMMONCPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "_DEBUG=1" -D "JUCE_CHECK_MEMORY_LEAKS=0" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I$(RADIUM_VST2SDK_PATH) -I~/SDKs/VST_SDK/VST3_SDK -I ~/SDKs/VST_SDK/VST2_SDK/ -I ~/SDKs/VST3\ SDK -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules -I ~/SDKs/vstsdk2.4 -DJUCE_APP_CONFIG_HEADER="\"AppConfig.h\"" -mfpmath=sse -msse2
ifeq (,$(findstring clang,$(CXX)))
COMMONCPPFLAGS += -Wno-class-memaccess
+--
+2.26.2
+
diff --git a/0002-Sequencer-Fix-program-sometimes-crashing-in-debug-mo.patch b/0002-Sequencer-Fix-program-sometimes-crashing-in-debug-mo.patch
deleted file mode 100644
index 3c559d3a1e4e..000000000000
--- a/0002-Sequencer-Fix-program-sometimes-crashing-in-debug-mo.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a49a43e3cc88e958f53d04f3a7ac41b3e81304d5 Mon Sep 17 00:00:00 2001
-From: Kjetil Matheussen <k.s.matheussen@notam02.no>
-Date: Thu, 5 Mar 2020 12:56:36 +0100
-Subject: [PATCH 2/3] Sequencer: Fix program sometimes crashing in debug mode
- when finalizing a seqblock or seqtrack. Only seen it happen on windows32 for
- some reason.
-
----
- common/sequencer.cpp | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/common/sequencer.cpp b/common/sequencer.cpp
-index ff2616678..2149fa5bb 100644
---- a/common/sequencer.cpp
-+++ b/common/sequencer.cpp
-@@ -2236,8 +2236,10 @@ void SEQTRACK_delete_seqblock(struct SeqTrack *seqtrack, const struct SeqBlock *
-
- #if !defined(RELEASE)
- //memset((void*)seqblock, 0, sizeof(struct SeqBlock));
-+ /*
- if(seqblock->block != NULL) // Can't release sample seqblock memory here since it may still be used in Seqtrack_plugin.cpp.
-- tfree((void*)seqblock); // Only for debugging.
-+ tfree((void*)seqblock); // Only for debugging. // Commented out, can't tfree memory that has a finalizer.
-+ */
- #endif
- }
-
-@@ -3206,7 +3208,7 @@ void SEQUENCER_delete_seqtrack(int pos){
-
- #if !defined(RELEASE)
- //memset(old_seqtrack, 0, sizeof(struct SeqTrack));
-- tfree((void*)old_seqtrack);
-+ // tfree((void*)old_seqtrack); // Commented out, can't tfree memory that has a finalizer.
- #endif
- }
-
---
-2.25.1
-
diff --git a/0003-Editor-Fix-assertion-window-popping-up-when-assignin.patch b/0003-Editor-Fix-assertion-window-popping-up-when-assignin.patch
new file mode 100644
index 000000000000..a4f62810a6e8
--- /dev/null
+++ b/0003-Editor-Fix-assertion-window-popping-up-when-assignin.patch
@@ -0,0 +1,27 @@
+From fdfc0e0dd12a995aff1195a1ca91e34069e688c3 Mon Sep 17 00:00:00 2001
+From: Kjetil Matheussen <k.s.matheussen@notam02.no>
+Date: Sun, 15 Mar 2020 13:08:33 +0100
+Subject: [PATCH 3/9] Editor: Fix assertion window popping up when assigning
+ track to an audio instrument without any input or output channels.
+
+---
+ api/api_gui.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/api/api_gui.cpp b/api/api_gui.cpp
+index 70e5741b..49bab6c3 100644
+--- a/api/api_gui.cpp
++++ b/api/api_gui.cpp
+@@ -546,7 +546,8 @@ static QQueue<Gui*> g_delayed_resized_guis; // ~Gui removes itself from this one
+ if (_is_input)
+ return plugin->input_volume_peaks;
+
+- R_ASSERT(false);
++ //R_ASSERT(false); // We are here when instrument has no inputs or outputs.
++
+ return _fallback_peaks;
+ }
+
+--
+2.26.2
+
diff --git a/0004-MIDI-Don-t-apply-channel-to-MIDI-system-messages-0xf.patch b/0004-MIDI-Don-t-apply-channel-to-MIDI-system-messages-0xf.patch
new file mode 100644
index 000000000000..c7180af6a16b
--- /dev/null
+++ b/0004-MIDI-Don-t-apply-channel-to-MIDI-system-messages-0xf.patch
@@ -0,0 +1,26 @@
+From 40a7ab642a5825edb2e4b783d41f7a3343dcd2d1 Mon Sep 17 00:00:00 2001
+From: Kjetil Matheussen <k.s.matheussen@notam02.no>
+Date: Tue, 12 May 2020 12:19:37 +0200
+Subject: [PATCH 4/9] MIDI: Don"t apply channel to MIDI system messages
+ (0xf0->0xff) when using track channel for midi input
+
+---
+ midi/midi_i_input.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/midi/midi_i_input.cpp b/midi/midi_i_input.cpp
+index 7590e994..1f2a02ed 100755
+--- a/midi/midi_i_input.cpp
++++ b/midi/midi_i_input.cpp
+@@ -930,7 +930,7 @@ void RT_MIDI_handle_play_buffer(void){
+ if(through_patch!=NULL || num_playing_patches > 0){
+
+ uint8_t byte1 = MIDI_msg_byte1(msg);
+- if (ATOMIC_GET(g_use_track_channel_for_midi_input)){
++ if (byte1 < 0xf0 && ATOMIC_GET(g_use_track_channel_for_midi_input)){
+ byte1 &= 0xf0;
+ byte1 |= ATOMIC_GET(g_curr_midi_channel);
+ }
+--
+2.26.2
+
diff --git a/0005-Sequencer-Fix-vertical-seqtrack-scrollbar-not-always.patch b/0005-Sequencer-Fix-vertical-seqtrack-scrollbar-not-always.patch
new file mode 100644
index 000000000000..2ed9349b0843
--- /dev/null
+++ b/0005-Sequencer-Fix-vertical-seqtrack-scrollbar-not-always.patch
@@ -0,0 +1,67 @@
+From f110c1ed7a4ae9f8e62b798c4c133be1ccd7f1d3 Mon Sep 17 00:00:00 2001
+From: Kjetil Matheussen <k.s.matheussen@notam02.no>
+Date: Tue, 19 May 2020 11:58:32 +0200
+Subject: [PATCH 5/9] Sequencer: Fix vertical seqtrack scrollbar not always
+ working. Bug introduced in 5.9.98.
+
+---
+ Qt/Qt_sequencer.cpp | 7 ++++++-
+ common/nsmtracker.h | 3 ++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/Qt/Qt_sequencer.cpp b/Qt/Qt_sequencer.cpp
+index 82713065..c5fa11e1 100644
+--- a/Qt/Qt_sequencer.cpp
++++ b/Qt/Qt_sequencer.cpp
+@@ -2448,6 +2448,7 @@ public:
+ struct SeqTrack *seqtrack=(struct SeqTrack *)root->song->seqtracks.elements[seqtracknum];
+ seqtrack->y2 = prev_y1;
+ seqtrack->y1 = seqtrack->y2 - heights[seqtracknum];
++ seqtrack->has_calculated_coordinates = true;
+ prev_y1 = seqtrack->y1;
+ }
+ }
+@@ -2460,6 +2461,7 @@ public:
+ struct SeqTrack *seqtrack=(struct SeqTrack *)root->song->seqtracks.elements[seqtracknum];
+ seqtrack->y1 = next_y1;
+ seqtrack->y2 = seqtrack->y1 + heights[seqtracknum];
++ seqtrack->has_calculated_coordinates = true;
+ next_y1 = seqtrack->y2;
+ }
+ }
+@@ -2559,7 +2561,7 @@ public:
+
+ const struct SeqTrack *seqtrack = (const struct SeqTrack *)root->song->seqtracks.elements[seqtracknum];
+
+- if (seqtrack->y2 > 0 && seqtrack->is_visible){ // if seqtrack->y2==0 it means that position_widgets() haven't been called yet.
++ if (seqtrack->has_calculated_coordinates && seqtrack->is_visible){ // if seqtrack->y2==0 it means that position_widgets() haven't been called yet.
+
+ R_ASSERT_NON_RELEASE(seqtrack->y2 > seqtrack->y1);
+
+@@ -3552,6 +3554,9 @@ public:
+ if(seqtrack->is_visible==false)
+ continue;
+
++ if(seqtrack->has_calculated_coordinates==false)
++ continue;
++
+ double y1 = scale_double(seqtrack->y1, seqtrack0_y1, seqtrackN_y2, t_y1 + 3, t_y2 - 3);
+ double y2 = scale_double(seqtrack->y2, seqtrack0_y1, seqtrackN_y2, t_y1 + 3, t_y2 - 3);
+
+diff --git a/common/nsmtracker.h b/common/nsmtracker.h
+index eff912ad..ebafd20d 100755
+--- a/common/nsmtracker.h
++++ b/common/nsmtracker.h
+@@ -3425,7 +3425,8 @@ struct SeqTrack{
+ double custom_min_height; // divided by system font height
+ double custom_max_height; // divided by system font height
+
+- double y1, y2; // in the sequencer.
++ bool has_calculated_coordinates;
++ double y1, y2; // in the sequencer. Only valid if has_calculated_coordinates is true.
+
+ // All variables below are only used when for_audiofiles==true.
+ struct Patch *patch; // A "Sequencer audio file recorder/player" audio plugin.
+--
+2.26.2
+
diff --git a/0006-Blocks-Fix-undo-delete-insert-block.-It-messed-up-th.patch b/0006-Blocks-Fix-undo-delete-insert-block.-It-messed-up-th.patch
new file mode 100644
index 000000000000..defc2288ce6d
--- /dev/null
+++ b/0006-Blocks-Fix-undo-delete-insert-block.-It-messed-up-th.patch
@@ -0,0 +1,60 @@
+From cb54945ee0b28407e06cc15fd982e37e2e56eb6b Mon Sep 17 00:00:00 2001
+From: Kjetil Matheussen <k.s.matheussen@notam02.no>
+Date: Thu, 21 May 2020 09:34:09 +0200
+Subject: [PATCH 6/9] Blocks: Fix undo delete/insert block. It messed up the
+ block order and/or pauses in the sequencer and playlist. Fixes #1250
+
+---
+ common/undo_block_insertdelete.c | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/common/undo_block_insertdelete.c b/common/undo_block_insertdelete.c
+index f5022fb1..eefac56b 100755
+--- a/common/undo_block_insertdelete.c
++++ b/common/undo_block_insertdelete.c
+@@ -108,14 +108,19 @@ void *Undo_Do_Block_Insert(
+ return Undo_Do_Block_Delete(window,wblock,wtrack,realline,pointer);
+ }
+
+- SEQUENCER_create_from_state(ubi->sequencer_state, root->song);
+-
+- ubi->wblock=(struct WBlocks *)ListFindElement1(&window->wblocks->l,ubi->blockpos);
++ hash_t *prev_state = SEQUENCER_get_state();
++
++ struct WBlocks *deleted_wblock=(struct WBlocks *)ListFindElement1(&window->wblocks->l,ubi->blockpos);
+ DeleteBlock(ubi->blockpos);
+
++ SEQUENCER_create_from_state(ubi->sequencer_state, root->song);
++
+ BS_UpdatePlayList();
+ BS_UpdateBlockList();
+
++ ubi->sequencer_state=prev_state;
++ ubi->wblock = deleted_wblock;
++
+ return ubi;
+ }
+
+@@ -132,6 +137,8 @@ void *Undo_Do_Block_Delete(
+ return Undo_Do_Block_Insert(window,wblock,wtrack,realline,pointer);
+ }
+
++ hash_t *prev_state = SEQUENCER_get_state();
++
+ InsertBlock_IncBlockNums(ubi->blockpos);
+ ListAddElement1(&root->song->blocks,&ubi->wblock->block->l);
+ ListAddElement1(&window->wblocks,&ubi->wblock->l);
+@@ -141,7 +148,9 @@ void *Undo_Do_Block_Delete(
+ BS_UpdateBlockList();
+ BS_UpdatePlayList();
+
+- ubi->wblock=NULL;
++ ubi->wblock=NULL; // In Undo_Do_Block_Delete, we get wblock from ubi->blockpos instead.
++ ubi->sequencer_state=prev_state;
++
+ return ubi;
+ }
+
+--
+2.26.2
+
diff --git a/0007-Linux-Only-use-included-libxcb-if-the-system-version.patch b/0007-Linux-Only-use-included-libxcb-if-the-system-version.patch
new file mode 100644
index 000000000000..fa524909417a
--- /dev/null
+++ b/0007-Linux-Only-use-included-libxcb-if-the-system-version.patch
@@ -0,0 +1,189 @@
+From 39ca8a945bf8735ce76c9b36078cf4883a5bb412 Mon Sep 17 00:00:00 2001
+From: Kjetil Matheussen <k.s.matheussen@notam02.no>
+Date: Wed, 15 Apr 2020 17:42:14 +0200
+Subject: [PATCH 7/9] Linux: Only use included libxcb if the system-version of
+ libxcb is too old, or don"t exist
+
+---
+ Makefile.Qt | 3 +++
+ Qt/Qt_Main.cpp | 21 +++++++++++++++++++--
+ X11/X11_keyboard.cpp | 3 +--
+ X11/check_recent_libxcb.c | 24 ++++++++++++++++++++++++
+ bin/run_radium_linux.sh | 18 +++++++++++-------
+ build_linux_common.sh | 7 ++++---
+ 6 files changed, 62 insertions(+), 14 deletions(-)
+ create mode 100644 X11/check_recent_libxcb.c
+
+diff --git a/Makefile.Qt b/Makefile.Qt
+index 24bf39b0..6f689b85 100755
+--- a/Makefile.Qt
++++ b/Makefile.Qt
+@@ -1377,6 +1377,9 @@ $(T)X11_instrument.o: $(BUILD_DEPENDENCIES) X11/X11_instrument.c
+ $(T)X11_keyboard.o: $(BUILD_DEPENDENCIES) X11/X11_keyboard.cpp
+ $(CCC2) X11/X11_keyboard.cpp $(QTOPT) -DUSE_QT$(RADIUM_QT_VERSION)
+
++bin/radium_check_recent_libxcb: X11/check_recent_libxcb.c
++ $(CC) -Wall $(WERROR) X11/check_recent_libxcb.c -ldl -o bin/radium_check_recent_libxcb
++
+ #X11_MidiProperties.o: $(BUILD_DEPENDENCIES) X11/X11_MidiProperties.c
+ # $(CC2) X11/X11_MidiProperties.c $(OPT)
+
+diff --git a/Qt/Qt_Main.cpp b/Qt/Qt_Main.cpp
+index 65798d9c..ad375b14 100755
+--- a/Qt/Qt_Main.cpp
++++ b/Qt/Qt_Main.cpp
+@@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ #include "../common/includepython.h"
+
+ #include <inttypes.h>
++#include <dlfcn.h>
+
+
+ #include <boost/version.hpp>
+@@ -3667,8 +3668,24 @@ static int gc_has_static_roots_func(
+ {
+ QString name(dlpi_name);
+ if (name.contains("libxcb.so")){
+- if (!name.contains("bin/packages/libxcb-1.13/src/.libs/")){
+- fprintf(stderr,"\n\n%c[31mError. A version of libxcb not included with Radium has been dynamically linked into the program. Something is wrong the installation of Radium.\nOlder versions of libxcb (probably before 1.11.1) are unstable with Radium.%c[0m\n\n", 0x1b, 0x1b);
++ bool success = false;
++
++ void *handle = dlopen(dlpi_name, RTLD_NOW|RTLD_LOCAL);
++ if (handle != NULL) {
++
++ if (dlsym(handle, "xcb_discard_reply64") != NULL)
++ success = true;
++
++ dlclose(handle);
++ }
++
++ if (!success) { //name.contains("/packages/libxcb-1.13/src/.libs/")){
++ fprintf(stderr,
++ "\n\n%c[31mError. A too old version of libxcb has been dynamically linked into the program.\n"
++ "Something is wrong the installation of Radium since a replacement version of libxcb should have been used automatically by the startup script if this is the case.\n"
++ "Older versions of libxcb (probably before 1.11.1) are unstable with Radium.%c[0m\n\n",
++ 0x1b, 0x1b);
++ fprintf(stderr, "(\"%s\")\n", name.toUtf8().constData());
+ abort();
+ }
+ }
+diff --git a/X11/X11_keyboard.cpp b/X11/X11_keyboard.cpp
+index 6e981089..9b3a349f 100755
+--- a/X11/X11_keyboard.cpp
++++ b/X11/X11_keyboard.cpp
+@@ -46,7 +46,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+ #include "../common/OS_system_proc.h"
+
+-
+ #ifndef USE_QT5
+ static int keycode_to_keynum[256]; // "A KeyCode represents a physical (or logical) key. KeyCodes lie in the inclusive range [8,255]" (keyboard-encoding.html)
+ #endif
+@@ -263,7 +262,7 @@ static xcb_keysym_t get_sym(xcb_key_press_event_t *event){
+
+ if (inited==false){
+ xcb_connection_t *connection = QX11Info::connection();
+-
++
+ if (xcb_connection_has_error(connection) > 0)
+ GFX_Message(NULL, "Seems like the xcb connection has an error. Keyboard might not work. Error code %d.", xcb_connection_has_error(connection));
+
+diff --git a/X11/check_recent_libxcb.c b/X11/check_recent_libxcb.c
+new file mode 100644
+index 00000000..a2a9d86a
+--- /dev/null
++++ b/X11/check_recent_libxcb.c
+@@ -0,0 +1,24 @@
++#include <stdlib.h>
++#include <stdio.h>
++#include <dlfcn.h>
++
++int main(void){
++
++ void *handle = dlopen("libxcb.so.1", RTLD_NOW|RTLD_LOCAL);
++
++ if (handle==NULL){
++ printf("Could not find libxcb\n");
++ return -1;
++ }
++
++ if (dlsym(handle, "xcb_discard_reply64")==NULL){
++ printf("No xcb_discard_reply64 in libxcb\n");
++ return -2;
++ }
++
++ printf("libxcb is recent enough. We can use it\n");
++
++ dlclose(handle);
++
++ return 0;
++}
+diff --git a/bin/run_radium_linux.sh b/bin/run_radium_linux.sh
+index 03e0b4da..4c7fd8bd 100755
+--- a/bin/run_radium_linux.sh
++++ b/bin/run_radium_linux.sh
+@@ -2,16 +2,20 @@
+
+ set -e
+
+-
+ THIS_DIR="$(dirname "$(readlink -f "$0")")"
+-XCB_LIB_DIR="$THIS_DIR"/packages/libxcb-1.13/src/.libs
+
+-if ! file "$XCB_LIB_DIR" ; then
+- echo "Unable to find directory $XCB_LIB_DIR"
+- exit -1
+-fi
++if ! $THIS_DIR/radium_check_recent_libxcb ; then
+
+-export LD_LIBRARY_PATH="$XCB_LIB_DIR"${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
++ XCB_LIB_DIR="$THIS_DIR"/packages/libxcb-1.13/src/.libs
++
++ if ! file "$XCB_LIB_DIR" ; then
++ echo "Unable to find directory $XCB_LIB_DIR"
++ exit -1
++ fi
++
++ export LD_LIBRARY_PATH="$XCB_LIB_DIR"${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
++
++fi
+
+ # To avoid buggy qt plugins crashing radium (very common).
+ unset QT_QPA_PLATFORMTHEME
+diff --git a/build_linux_common.sh b/build_linux_common.sh
+index 8004c6a7..514bb084 100755
+--- a/build_linux_common.sh
++++ b/build_linux_common.sh
+@@ -119,7 +119,7 @@ export RTMIDI_CFLAGS="-D__LINUX_ALSA__ -D__RTMIDI_DEBUG__"
+ export RTMIDI_LDFLAGS="-lpthread -lasound -ljack"
+
+ #export OS_OPTS="-DTEST_GC"
+-export OS_OPTS="-Werror=array-bounds -msse2 -fomit-frame-pointer -DFOR_LINUX `$PKG --cflags Qt5X11Extras`"
++export OS_OPTS="-Werror=array-bounds -msse2 -fomit-frame-pointer -DFOR_LINUX `$PKG --cflags Qt5X11Extras` " # -Ibin/packages/libxcb-1.13/"
+ #export OS_OPTS="-Werror=array-bounds -march=native"
+
+
+@@ -186,7 +186,7 @@ fi
+ fi
+
+ export OS_JUCE_LDFLAGS="-lasound -pthread -lrt -lX11 -ldl -lXext "
+-export OS_LDFLAGS="$FAUSTLDFLAGS $PDLDFLAGS pluginhost/Builds/Linux/build/libMyPluginHost.a $OS_JUCE_LDFLAGS -llrdf $GCDIR/.libs/libgc.a $PYTHONLIBPATH $PYTHONLIBNAME bin/packages/libgig/src/.libs/libgig.a bin/packages/fluidsynth-1.1.6/src/.libs/libfluidsynth.a `$PKG --libs dbus-1` `$PKG --libs sndfile` `$PKG --libs samplerate` `$PKG --libs Qt5X11Extras` `$PKG --libs glib-2.0` -lxcb -lxcb-keysyms $RADIUM_BFD_LDFLAGS -lz -liberty -lutil -lgmp -lmpfr -lmpc"
++export OS_LDFLAGS="$FAUSTLDFLAGS $PDLDFLAGS pluginhost/Builds/Linux/build/libMyPluginHost.a $OS_JUCE_LDFLAGS -llrdf $GCDIR/.libs/libgc.a $PYTHONLIBPATH $PYTHONLIBNAME bin/packages/libgig/src/.libs/libgig.a bin/packages/fluidsynth-1.1.6/src/.libs/libfluidsynth.a `$PKG --libs dbus-1` `$PKG --libs sndfile` `$PKG --libs samplerate` `$PKG --libs Qt5X11Extras` `$PKG --libs glib-2.0` -lxcb -lxcb-keysyms $RADIUM_BFD_LDFLAGS -lz -liberty -lutil -lgmp -lmpfr -lmpc"
+
+ #
+
+@@ -223,9 +223,10 @@ make buildtype.opt --stop
+ make flagopts.opt --stop
+ make api/radium_proc.h --stop
+ make common/keyboard_sub_ids.h --stop
++make bin/radium_check_recent_libxcb --stop
+
+ if [[ $1 == "test" ]] ; then
+- make test_seqautomation
++ make test_seqautomation
+ else
+ make radium $@ --stop
+ fi
+--
+2.26.2
+
diff --git a/0008-Build-Allow-skipping-libxcb-compile-with-env-vars.patch b/0008-Build-Allow-skipping-libxcb-compile-with-env-vars.patch
new file mode 100644
index 000000000000..c21feace640d
--- /dev/null
+++ b/0008-Build-Allow-skipping-libxcb-compile-with-env-vars.patch
@@ -0,0 +1,53 @@
+From 67e9f1aeaef762d59b307954895f25727f374dda Mon Sep 17 00:00:00 2001
+From: Teteros <Teteros@users.noreply.github.com>
+Date: Wed, 22 Apr 2020 04:09:31 +0100
+Subject: [PATCH 8/9] Build: Allow skipping libxcb compile with env vars
+
+Commit 0faf13e20d26446defe92c9b68f883892bbf928f allows users to not have
+to use bundled libxcb at runtime but they still have to build it.
+
+With this patch it's possible to pass
+RADIUM_BUILD_LIBXCB=0 to make packages and
+RADIUM_INSTALL_LIBXCB=0 to install.sh
+
+to build without libxcb as well.
+---
+ bin/packages/build.sh | 2 +-
+ install.sh | 11 +++++++----
+ 2 files changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/bin/packages/build.sh b/bin/packages/build.sh
+index 49b09d66..77a7820f 100755
+--- a/bin/packages/build.sh
++++ b/bin/packages/build.sh
+@@ -207,7 +207,7 @@ then
+ cd ../
+ fi
+
+-if [[ $RADIUM_QT_VERSION == 5 ]]
++if [[ $RADIUM_QT_VERSION == 5 && $RADIUM_BUILD_LIBXCB != 0 ]]
+ then
+
+ rm -fr xcb-proto-1.13/
+diff --git a/install.sh b/install.sh
+index 32d520f2..45300678 100755
+--- a/install.sh
++++ b/install.sh
+@@ -104,7 +104,10 @@ rm -f libpds.o
+ cd "$THIS_DIR/bin"
+
+ # libxcb
+-cp -a packages/libxcb-1.13 "$TARGET/packages/"
+-cd "$TARGET/packages/libxcb-1.13/src"
+-rm -f *.o
+-cd "$THIS_DIR/bin"
++if [[ $RADIUM_INSTALL_LIBXCB != 0 ]]
++then
++ cp -a packages/libxcb-1.13 "$TARGET/packages/"
++ cd "$TARGET/packages/libxcb-1.13/src"
++ rm -f ./*.o
++ cd "$THIS_DIR/bin"
++fi
+--
+2.26.2
+
diff --git a/0009-Build-Switch-to-clang-to-build-libpd-master.patch b/0009-Build-Switch-to-clang-to-build-libpd-master.patch
new file mode 100644
index 000000000000..6c16f4f9bf1f
--- /dev/null
+++ b/0009-Build-Switch-to-clang-to-build-libpd-master.patch
@@ -0,0 +1,24 @@
+From 5f0c75c8ce8111015ec56c55fa997b46d3ef376a Mon Sep 17 00:00:00 2001
+From: Teteros <Teteros@users.noreply.github.com>
+Date: Fri, 22 May 2020 19:35:46 +0100
+Subject: [PATCH 9/9] Build: Switch to clang to build libpd-master
+
+---
+ bin/packages/build.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/bin/packages/build.sh b/bin/packages/build.sh
+index 77a7820f..cad1e577 100755
+--- a/bin/packages/build.sh
++++ b/bin/packages/build.sh
+@@ -132,6 +132,7 @@ cd libpd-master/
+ sed -i '/define CFLAGS/ s|")| -I/usr/include/tirpc ")|' make.scm
+ sed -i 's/k_cext$//' make.scm
+ sed -i 's/oscx //' make.scm
++sed -i 's/gcc -O3/clang -Wno-return-type -O3/' make.scm
+ make clean
+ make -j`nproc`
+ cd ..
+--
+2.26.2
+
diff --git a/PKGBUILD b/PKGBUILD
index 9a85368882c6..60cb8cfc9ec8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,10 +1,10 @@
-# Maintainer: Karol "Kenji Takahashi" Woźniak <kenji.sx>
-# Maintainer: Jakob Gahde <j5lx@fmail.co.uk>
# Maintainer: Teteros <teteros at teknik dot io>
+# Maintainer: Karol "Kenji Takahashi" Woźniak <kenji.sx>
+# Contributor: Jakob Gahde <j5lx@fmail.co.uk>
pkgname=radium
pkgver=5.9.98
-pkgrel=1
+pkgrel=2
pkgdesc='A graphical music editor. A next generation tracker.'
arch=(i686 x86_64)
url=https://users.notam02.no/~kjetism/radium
@@ -28,6 +28,7 @@ depends=(
)
makedepends=(
boost
+ clang
cmake
ladspa
libxcursor
@@ -41,31 +42,35 @@ makedepends=(
optdepends=(
'calf-ladspa: Default chorus plugin'
'ladspa-plugins: Package group for default radium plugins included in binary releases'
+ 'python: Used for scheme scripting'
)
options=(!strip)
source=(https://github.com/kmatheussen/radium/archive/$pkgver.tar.gz
- 0001-Internal-Various-compilation-fixes-plus-assert-that-.patch
- 0002-Sequencer-Fix-program-sometimes-crashing-in-debug-mo.patch
- 0003-Linux-Macosx-Fix-compiling-with-newer-bdf.h.patch
- use-system-libxcb.patch
- use-system-vstsdk.patch)
+ 0001-Linux-Macosx-Fix-compiling-with-newer-bdf.h.patch
+ 0002-Build-Add-RADIUM_VST2SDK_PATH-environment-variable.patch
+ 0003-Editor-Fix-assertion-window-popping-up-when-assignin.patch
+ 0004-MIDI-Don-t-apply-channel-to-MIDI-system-messages-0xf.patch
+ 0005-Sequencer-Fix-vertical-seqtrack-scrollbar-not-always.patch
+ 0006-Blocks-Fix-undo-delete-insert-block.-It-messed-up-th.patch
+ 0007-Linux-Only-use-included-libxcb-if-the-system-version.patch
+ 0008-Build-Allow-skipping-libxcb-compile-with-env-vars.patch
+ 0009-Build-Switch-to-clang-to-build-libpd-master.patch)
sha256sums=('3b1b5b9f72536d79561f602f278611979fbc9a8720cd3064c001998a22de9e90'
- 'c658253e13eb5e5dbe44d5e968634da4ea474885bd4ea33b4d7c586b8aa58cc2'
- 'eb6641f77506799eab7f3fadccd5e129fc3a5f1a4cefd099d97dd1918aaa26d8'
- 'b0841d5979936a87b179a5ac8a61f326493b50ddcdb79b10da27870af1b204ab'
- '6c29e825e06d1c3aec4afd915718b8c46da705d1411a94f7c0f777b888a9b50d'
- 'a1ee3635dd9338e2ea2fc76cddf670fcb046afeba553a12b73158cf0b51a52f6')
+ 'cd8a424cbe379ab38eb705d6b56a1e65b67879fee1eb87f7e226b944af9ad3de'
+ '83d90f5418ca7429ed4e3c7ba9392b3bb4191528c2681f076f56ffe6f7617eef'
+ '9baab8d625955070dbf92b37095c34b8b3c7fa80c1838e651f2f1430b5221a34'
+ '4642e56d315d65a8a60f5bc57fabcee5daa1a7fc45feca88a472d8d3cfedda36'
+ '34f9d7e75978e8dffcb4c1f56b0d7f69376037c7c04daa44b8a7cf6b90cb0342'
+ 'e3e1ab4936ddbbc37eb4d0da6f6d6b8013aca22afa5944c0148675325a7760b0'
+ '0be52efa89ba74c9f90cdfd5fcc29dbfbeb1f9bae12f59def113f682de84d7f6'
+ 'f64abc5bd3eb9373f62702dd58e047e6cad7e5c3774f5a7c1045cc58e05a5111'
+ 'd8610fb4e104ea6763777001c614f35ff109da046b9d47b4955a014397368fdf')
prepare() {
cd radium-$pkgver
- # Use system libxcb 1.13 rather than try to compile it
- patch -p1 < "$srcdir/use-system-libxcb.patch"
-
- # Set VST SDK location to steinberg-vst36 rather than look for it in user's home folder
- patch -p1 < "$srcdir/use-system-vstsdk.patch"
-
- # Compile fix for gdb9 https://github.com/kmatheussen/radium/issues/1246
+ # Hotfixes for 5.9.98 release suggested by developer, see issue #1250
+ # https://github.com/kmatheussen/radium/issues/1250#issuecomment-631935368
for commit in "$srcdir"/000?-*.patch; do patch -p1 < "$commit"; done
# Edit new file template and demo songs to be compatible with chorus plugin from calf-ladspa
@@ -75,15 +80,15 @@ prepare() {
build() {
cd radium-$pkgver
- RADIUM_QT_VERSION=5 make packages
- RADIUM_QT_VERSION=5 BUILDTYPE=RELEASE ./build_linux.sh
+ RADIUM_QT_VERSION=5 RADIUM_VST2SDK_PATH=/usr/include/vst36 RADIUM_BUILD_LIBXCB=0 make packages
+ RADIUM_QT_VERSION=5 RADIUM_VST2SDK_PATH=/usr/include/vst36 BUILDTYPE=RELEASE ./build_linux.sh
}
package() {
cd radium-$pkgver
# Install radium and its packages to /opt
- ./install.sh "$pkgdir/opt"
+ RADIUM_INSTALL_LIBXCB=0 ./install.sh "$pkgdir/opt"
# Create startup script according to bin/packages/README
mkdir -p "$pkgdir/usr/bin"
diff --git a/use-system-libxcb.patch b/use-system-libxcb.patch
deleted file mode 100644
index fc3b530af1ed..000000000000
--- a/use-system-libxcb.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-diff -aur --no-dereference radium-5.9.60.pristine/bin/packages/build.sh radium-5.9.60.new/bin/packages/build.sh
---- radium-5.9.60.pristine/bin/packages/build.sh 2019-05-11 22:54:53.259293886 +0100
-+++ radium-5.9.60.new/bin/packages/build.sh 2019-05-11 22:57:03.595956087 +0100
-@@ -185,28 +185,28 @@
- cd ../
- fi
-
--if [[ $RADIUM_QT_VERSION == 5 ]]
--then
--
-- rm -fr xcb-proto-1.13/
-- tar xvjf xcb-proto-1.13.tar.bz2
-- cd xcb-proto-1.13/
-- mkdir install
-- ./configure --prefix=`pwd`/install PYTHON=`which python2`
-- make -j`proc`
-- make install
-- cd ..
--
-- rm -fr libxcb-1.13
-- tar xvjf libxcb-1.13.tar.bz2
-- cd libxcb-1.13
-- #patch -p1 <../libxcb-1.12.patch
-- export PKG_CONFIG_PATH=`pwd`/../xcb-proto-1.13/install/lib/pkgconfig:$PKG_CONFIG_PATH
-- CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CXXFLAGS" ./configure PYTHON=`which python2`
-- CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CXXFLAGS" make -j`nproc`
-- cd ..
--
--fi
-+#if [[ $RADIUM_QT_VERSION == 5 ]]
-+#then
-+#
-+# rm -fr xcb-proto-1.13/
-+# tar xvjf xcb-proto-1.13.tar.bz2
-+# cd xcb-proto-1.13/
-+# mkdir install
-+# ./configure --prefix=`pwd`/install PYTHON=`which python2`
-+# make -j`proc`
-+# make install
-+# cd ..
-+#
-+# rm -fr libxcb-1.13
-+# tar xvjf libxcb-1.13.tar.bz2
-+# cd libxcb-1.13
-+# #patch -p1 <../libxcb-1.12.patch
-+# export PKG_CONFIG_PATH=`pwd`/../xcb-proto-1.13/install/lib/pkgconfig:$PKG_CONFIG_PATH
-+# CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CXXFLAGS" ./configure PYTHON=`which python2`
-+# CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CXXFLAGS" make -j`nproc`
-+# cd ..
-+#
-+#fi
-
-
- touch deletemetorebuild
-diff -aur --no-dereference radium-5.9.60.pristine/bin/run_radium_linux.sh radium-5.9.60.new/bin/run_radium_linux.sh
---- radium-5.9.60.pristine/bin/run_radium_linux.sh 2019-05-11 22:54:53.262627219 +0100
-+++ radium-5.9.60.new/bin/run_radium_linux.sh 2019-05-11 22:57:03.595956087 +0100
-@@ -4,14 +4,14 @@
-
-
- THIS_DIR="$(dirname "$(readlink -f "$0")")"
--XCB_LIB_DIR="$THIS_DIR"/packages/libxcb-1.13/src/.libs
-+#XCB_LIB_DIR="$THIS_DIR"/packages/libxcb-1.13/src/.libs
-
--if ! file "$XCB_LIB_DIR" ; then
-- echo "Unable to find directory $XCB_LIB_DIR"
-- exit -1
--fi
-+#if ! file "$XCB_LIB_DIR" ; then
-+# echo "Unable to find directory $XCB_LIB_DIR"
-+# exit -1
-+#fi
-
--export LD_LIBRARY_PATH="$XCB_LIB_DIR"${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
-+#export LD_LIBRARY_PATH="$XCB_LIB_DIR"${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
-
- # To avoid buggy qt plugins crashing radium (very common).
- unset QT_QPA_PLATFORMTHEME
-diff -aur --no-dereference radium-5.9.60.pristine/install.sh radium-5.9.60.new/install.sh
---- radium-5.9.60.pristine/install.sh 2019-05-11 22:54:53.275960552 +0100
-+++ radium-5.9.60.new/install.sh 2019-05-11 22:57:03.595956087 +0100
-@@ -99,7 +99,7 @@
- cd "$THIS_DIR/bin"
-
- # libxcb
--cp -a packages/libxcb-1.13 "$TARGET/packages/"
--cd "$TARGET/packages/libxcb-1.13/src"
--rm -f *.o
--cd "$THIS_DIR/bin"
-+#cp -a packages/libxcb-1.13 "$TARGET/packages/"
-+#cd "$TARGET/packages/libxcb-1.13/src"
-+#rm -f *.o
-+#cd "$THIS_DIR/bin"
-diff -aur --no-dereference radium-5.9.60.pristine/Qt/Qt_Main.cpp radium-5.9.60.new/Qt/Qt_Main.cpp
---- radium-5.9.60.pristine/Qt/Qt_Main.cpp 2019-05-11 22:54:53.245960553 +0100
-+++ radium-5.9.60.new/Qt/Qt_Main.cpp 2019-05-11 22:57:03.595956087 +0100
-@@ -3536,6 +3536,7 @@
-
- #endif // !defined(RELEASE)
-
-+/*
- #if defined(FOR_LINUX)
- {
- QString name(dlpi_name);
-@@ -3547,6 +3548,7 @@
- }
- }
- #endif
-+*/
-
-
- if (is_main_root)