[debian-edu-commits] debian-edu/pkg-team/ 01/01: Fixed build problems with GCC 6
Javier Serrano Polo
jasp00-guest at moszumanska.debian.org
Sat Apr 23 17:01:26 UTC 2016
This is an automated email from the git hooks/post-receive script.
jasp00-guest pushed a commit to branch master
in repository lmms.
commit aeb980ec7b1da97f8244c6e98173be43e8850fe6
Author: Javier Serrano Polo <javier at jasp.net>
Date: Sat Apr 23 19:00:35 2016 +0200
Fixed build problems with GCC 6
---
debian/changelog | 1 +
debian/patches/gcc6.patch | 141 ++++++++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 143 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 02893d0..412caec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ lmms (1.1.3-1.1) unstable; urgency=low
* Fixed version of metalish_dong01.ogg (Closes: #802588).
* Bumped Standards-Version to 3.9.7. Doxygen documentation is not very useful.
* Use presets from zynaddsubfx-data.
+ * Fixed build problems with GCC 6 (Closes: #811697).
-- Javier Serrano Polo <javier at jasp.net> Mon, 04 Apr 2016 19:42:09 +0200
diff --git a/debian/patches/gcc6.patch b/debian/patches/gcc6.patch
new file mode 100644
index 0000000..27ad6d6
--- /dev/null
+++ b/debian/patches/gcc6.patch
@@ -0,0 +1,141 @@
+Description: Fixed build problems with GCC 6
+ Most problems are about code formatting. The problem in modules_limit.cpp is
+ about type promotion.
+Author: Javier Serrano Polo <javier at jasp.net>
+
+Index: lmms-1.1.3/include/versioninfo.h
+===================================================================
+--- lmms-1.1.3.orig/include/versioninfo.h 2016-04-23 17:27:50.000000000 +0200
++++ lmms-1.1.3/include/versioninfo.h 2016-04-23 17:28:24.000000000 +0200
+@@ -1,5 +1,5 @@
+ #ifdef __GNUC__
+-#define GCC_VERSION "GCC "__VERSION__
++#define GCC_VERSION "GCC " __VERSION__
+ #else
+ #define GCC_VERSION "unknown compiler"
+ #endif
+Index: lmms-1.1.3/plugins/LadspaEffect/calf/src/modules_limit.cpp
+===================================================================
+--- lmms-1.1.3.orig/plugins/LadspaEffect/calf/src/modules_limit.cpp 2016-04-23 17:54:56.000000000 +0200
++++ lmms-1.1.3/plugins/LadspaEffect/calf/src/modules_limit.cpp 2016-04-23 18:19:22.000000000 +0200
+@@ -540,7 +540,8 @@
+ } // process single strip with filter
+
+ // write multiband coefficient to buffer
+- buffer[pos] = std::min(*params[param_limit] / std::max(fabs(sum_left), fabs(sum_right)), 1.0);
++ float pre_buffer = *params[param_limit] / std::max(fabs(sum_left), fabs(sum_right));
++ buffer[pos] = std::min(pre_buffer, 1.0f);
+
+ for (int i = 0; i < strips; i++) {
+ // process gain reduction
+Index: lmms-1.1.3/plugins/opl2/fmopl.c
+===================================================================
+--- lmms-1.1.3.orig/plugins/opl2/fmopl.c 2016-04-23 18:23:40.000000000 +0200
++++ lmms-1.1.3/plugins/opl2/fmopl.c 2016-04-23 18:50:10.000000000 +0200
+@@ -653,21 +653,21 @@
+ double rate;
+
+ /* make attack rate & decay rate tables */
+- for ( i = 0; i < 4; i++ ) OPL->AR_TABLE[i] = OPL->DR_TABLE[i] = 0; {
+- for (i = 4; i <= 60; i++) {
+- rate = OPL->freqbase; /* frequency rate */
+- if( i < 60 ) {
+- rate *= 1.0+(i&3)*0.25; /* b0-1 : x1 , x1.25 , x1.5 , x1.75 */
+- }
+- rate *= 1<<((i>>2)-1); /* b2-5 : shift bit */
+- rate *= (double)(EG_ENT<<ENV_BITS);
+- OPL->AR_TABLE[i] = rate / ARRATE;
+- OPL->DR_TABLE[i] = rate / DRRATE;
+- }
+- for ( i = 60; i < 75; i++ ) {
+- OPL->AR_TABLE[i] = EG_AED-1;
+- OPL->DR_TABLE[i] = OPL->DR_TABLE[60];
++ for ( i = 0; i < 4; i++ ) OPL->AR_TABLE[i] = OPL->DR_TABLE[i] = 0;
++ for (i = 4; i <= 60; i++) {
++ rate = OPL->freqbase; /* frequency rate */
++ if( i < 60 ) {
++ rate *= 1.0+(i&3)*0.25; /* b0-1 : x1 , x1.25 , x1.5 , x1.75 */
+ }
++ rate *= 1<<((i>>2)-1); /* b2-5 : shift bit */
++ rate *= (double)(EG_ENT<<ENV_BITS);
++ OPL->AR_TABLE[i] = rate / ARRATE;
++ OPL->DR_TABLE[i] = rate / DRRATE;
++ }
++ for ( i = 60; i < 75; i++ ) {
++ OPL->AR_TABLE[i] = EG_AED-1;
++ OPL->DR_TABLE[i] = OPL->DR_TABLE[60];
++ }
+ #if 0
+ for ( i = 0; i < 64 ; i++ ) { /* make for overflow area */
+ LOG(LOG_WAR,("rate %2d , ar %f ms , dr %f ms \n",i,
+@@ -675,7 +675,6 @@
+ ((double)(EG_ENT<<ENV_BITS) / OPL->DR_TABLE[i]) * (1000.0 / OPL->rate) ));
+ }
+ #endif
+- }
+ }
+
+ /* ---------- generic table initialize ---------- */
+Index: lmms-1.1.3/plugins/zynaddsubfx/zynaddsubfx/src/UI/EnvelopeUI.fl
+===================================================================
+--- lmms-1.1.3.orig/plugins/zynaddsubfx/zynaddsubfx/src/UI/EnvelopeUI.fl 2016-04-23 18:33:30.000000000 +0200
++++ lmms-1.1.3/plugins/zynaddsubfx/zynaddsubfx/src/UI/EnvelopeUI.fl 2016-04-23 18:35:34.000000000 +0200
+@@ -204,12 +204,14 @@
+
+ if ((event==FL_DRAG)&&(currentpoint>=0)){
+ int ny=127-(int) (y_*127.0/h());
+- if (ny<0) ny=0;if (ny>127) ny=127;
++ if (ny<0) ny=0;
++ if (ny>127) ny=127;
+ env->Penvval[currentpoint]=ny;
+
+ int dx=(int)((x_-cpx)*0.1);
+ int newdt=cpdt+dx;
+- if (newdt<0) newdt=0;if (newdt>127) newdt=127;
++ if (newdt<0) newdt=0;
++ if (newdt>127) newdt=127;
+ if (currentpoint!=0) env->Penvdt[currentpoint]=newdt;
+ else env->Penvdt[currentpoint]=0;
+
+Index: lmms-1.1.3/plugins/zynaddsubfx/zynaddsubfx/src/UI/ResonanceUI.fl
+===================================================================
+--- lmms-1.1.3.orig/plugins/zynaddsubfx/zynaddsubfx/src/UI/ResonanceUI.fl 2016-04-23 18:37:02.000000000 +0200
++++ lmms-1.1.3/plugins/zynaddsubfx/zynaddsubfx/src/UI/ResonanceUI.fl 2016-04-23 18:37:56.000000000 +0200
+@@ -133,8 +133,10 @@
+ if ((event==FL_PUSH)||(event==FL_DRAG)){
+ int leftbutton=1;
+ if (Fl::event_button()==FL_RIGHT_MOUSE) leftbutton=0;
+- if (x_<0) x_=0;if (y_<0) y_=0;
+- if (x_>=w()) x_=w();if (y_>=h()-1) y_=h()-1;
++ if (x_<0) x_=0;
++ if (y_<0) y_=0;
++ if (x_>=w()) x_=w();
++ if (y_>=h()-1) y_=h()-1;
+
+ if ((oldx<0)||(oldx==x_)){
+ int sn=(int)(x_*1.0/w()*N_RES_POINTS);
+Index: lmms-1.1.3/src/core/drumsynth.cpp
+===================================================================
+--- lmms-1.1.3.orig/src/core/drumsynth.cpp 2016-04-23 17:37:33.000000000 +0200
++++ lmms-1.1.3/src/core/drumsynth.cpp 2016-04-23 17:48:04.000000000 +0200
+@@ -155,7 +155,8 @@
+ case 1: w = (float)fabs(2.0f*(float)sin(fmod(0.5f*ph,TwoPi)))-1.f; break; //sine^2
+ case 2: while(ph<TwoPi) ph+=TwoPi;
+ w = 0.6366197f * (float)fmod(ph,TwoPi) - 1.f; //tri
+- if(w>1.f) w=2.f-w; break;
++ if(w>1.f) w=2.f-w;
++ break;
+ case 3: w = ph - TwoPi * (float)(int)(ph / TwoPi); //saw
+ w = (0.3183098f * w) - 1.f; break;
+ default: w = (sin(fmod(ph,TwoPi))>0.0)? 1.f: -1.f; break; //square
+@@ -429,7 +430,9 @@
+ strcpy(sec, "Distortion");
+ chkOn[5] = GetPrivateProfileInt(sec,"On",0,dsfile); DiON = chkOn[5];
+ DStep = 1 + GetPrivateProfileInt(sec,"Rate",0,dsfile);
+- if(DStep==7) DStep=20; if(DStep==6) DStep=10; if(DStep==5) DStep=8;
++ if(DStep==7) DStep=20;
++ if(DStep==6) DStep=10;
++ if(DStep==5) DStep=8;
+
+ clippoint = 32700;
+ DAtten = 1.0f;
diff --git a/debian/patches/series b/debian/patches/series
index ea0bcc3..1b61ae5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ vst-no-wine.patch
wine-runpath.patch
sync-socket.patch
wine-buildflags.patch
+gcc6.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/lmms.git
More information about the debian-edu-commits
mailing list