summaryrefslogtreecommitdiff
path: root/media-sound/bpmdetect/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-sound/bpmdetect/files
reinit the tree, so we can have metadata
Diffstat (limited to 'media-sound/bpmdetect/files')
-rw-r--r--media-sound/bpmdetect/files/bpmdetect-0.6.1-fix-buildsystem.patch67
-rw-r--r--media-sound/bpmdetect/files/bpmdetect-0.6.1-fix-printf-format.patch37
-rw-r--r--media-sound/bpmdetect/files/bpmdetect-0.6.1-gcc44_and_fmodex_path.patch36
3 files changed, 140 insertions, 0 deletions
diff --git a/media-sound/bpmdetect/files/bpmdetect-0.6.1-fix-buildsystem.patch b/media-sound/bpmdetect/files/bpmdetect-0.6.1-fix-buildsystem.patch
new file mode 100644
index 000000000000..fa6c0e59db68
--- /dev/null
+++ b/media-sound/bpmdetect/files/bpmdetect-0.6.1-fix-buildsystem.patch
@@ -0,0 +1,67 @@
+* Fix QA issues in desktop file
+* Make buildsystem respect CXX, CXXFLAGS and LDFLAGS
+https://bugs.gentoo.org/show_bug.cgi?id=334465
+
+--- bpmdetect/src/bpmdetect.desktop
++++ bpmdetect/src/bpmdetect.desktop
+@@ -2,7 +2,7 @@
+ Encoding=UTF-8
+ Name=BPMDetect
+ Exec=bpmdetect
+-Icon=bpmdetect-icon.png
++Icon=bpmdetect-icon
+ Type=Application
+ Comment=Automatic BPM detection utility
+-Categories=Application;AudioVideo;Audio:
++Categories=AudioVideo;Audio;
+--- bpmdetect/src/SConscript
++++ bpmdetect/src/SConscript
+@@ -1,5 +1,6 @@
+ #! /usr/bin/env python
+ import os, sys, glob
++import SCons.Util
+
+ if not sys.platform.startswith('win'):
+ BOLD ="\033[1m"
+@@ -156,17 +157,18 @@
+ env.__delitem__('CPPPATH')
+ if env.has_key('CPPDEFINES'):
+ env.__delitem__('CPPDEFINES')
+- if env.has_key('CXXFLAGS'):
+- env.__delitem__('CXXFLAGS')
+ if env.has_key('LIBPATH'):
+ env.__delitem__('LIBPATH')
+ if env.has_key('LIBS'):
+ env.__delitem__('LIBS')
+- if env.has_key('LINKFLAGS'):
+- env.__delitem__('LINKFLAGS')
+ if env.has_key('QT3'):
+ env.__delitem__('QT3')
+
++ if os.environ.has_key('CXXFLAGS'):
++ env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
++ if os.environ.has_key('LDFLAGS'):
++ env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
++
+ print BOLD + """
+ --------------------------------------------------""" + NORMAL
+ print "Use MinGW compiler : ",
+@@ -189,7 +191,6 @@
+ env.Append(CXXFLAGS = '-g')
+ else:
+ print 'no '
+- env.Append(CXXFLAGS = '-O2' )
+ env.Append(CPPDEFINES = ['NDEBUG', 'NO_DEBUG'])
+ env['DEBUG'] = 0
+
+@@ -309,6 +310,10 @@
+ ( 'LINKFLAGS', 'linker flags'),
+ ( 'QT3', 'use qt3')
+ )
++if os.environ.has_key('CC'):
++ env['CC'] = os.environ['CC']
++if os.environ.has_key('CXX'):
++ env['CXX'] = os.environ['CXX']
+ opts.Update(env)
+
+ # to avoid an error message 'how to make target configure... ?'
diff --git a/media-sound/bpmdetect/files/bpmdetect-0.6.1-fix-printf-format.patch b/media-sound/bpmdetect/files/bpmdetect-0.6.1-fix-printf-format.patch
new file mode 100644
index 000000000000..89bf64445e76
--- /dev/null
+++ b/media-sound/bpmdetect/files/bpmdetect-0.6.1-fix-printf-format.patch
@@ -0,0 +1,37 @@
+Fix broken printf statements:
+* src/main.cpp:49:62: warning: too many arguments for format [-Wformat-extra-args]
+* printf("Usage:\n bpmdetect [switches] [files]\n\n", version);
+*
+* src/track.cpp:111:57: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘double’ [-Wformat=]
+* snprintf(buffer, BPM_LEN, "%05d", (int) dBPM * 100. );
+
+--- bpmdetect/src/main.cpp
++++ bpmdetect/src/main.cpp
+@@ -34,6 +34,7 @@
+ #endif
+
+ #include <getopt.h>
++#include <stdio.h>
+
+ #include "track.h"
+ #include "trackfmod.h" // for FMOD system
+@@ -46,7 +47,7 @@
+
+ void display_help() {
+ printf("BPMDetect version %s\n\n", version);
+- printf("Usage:\n bpmdetect [switches] [files]\n\n", version);
++ fputs("Usage:\n bpmdetect [switches] [files]\n\n", stdout);
+ printf("Switches:\n");
+ #ifndef NO_GUI
+ printf("-c --console - run in console mode\n");
+--- bpmdetect/src/track.cpp
++++ bpmdetect/src/track.cpp
+@@ -108,7 +108,7 @@
+ } else if( format == "000" ) {
+ snprintf(buffer, BPM_LEN, "%03d", (int) dBPM );
+ } else if( format == "00000" ) {
+- snprintf(buffer, BPM_LEN, "%05d", (int) dBPM * 100. );
++ snprintf(buffer, BPM_LEN, "%05d", static_cast<int>(dBPM * 100.) );
+ } else { // all other formats are converted to "0.00"
+ snprintf(buffer, BPM_LEN, "%.2f", dBPM );
+ }
diff --git a/media-sound/bpmdetect/files/bpmdetect-0.6.1-gcc44_and_fmodex_path.patch b/media-sound/bpmdetect/files/bpmdetect-0.6.1-gcc44_and_fmodex_path.patch
new file mode 100644
index 000000000000..c29961645615
--- /dev/null
+++ b/media-sound/bpmdetect/files/bpmdetect-0.6.1-gcc44_and_fmodex_path.patch
@@ -0,0 +1,36 @@
+diff -ur bpmdetect.orig/src/main.cpp bpmdetect/src/main.cpp
+--- bpmdetect.orig/src/main.cpp 2008-05-01 12:50:18.000000000 +0300
++++ bpmdetect/src/main.cpp 2009-06-03 22:24:56.000000000 +0300
+@@ -20,6 +20,8 @@
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
++#include <cstdio>
++
+ #ifndef NO_GUI
+ #ifdef USE_QT3
+ #include "dlgbpmdetect3.h"
+diff -ur bpmdetect.orig/src/SConscript bpmdetect/src/SConscript
+--- bpmdetect.orig/src/SConscript 2008-04-24 19:49:52.000000000 +0300
++++ bpmdetect/src/SConscript 2009-06-03 22:33:57.000000000 +0300
+@@ -234,7 +234,7 @@
+
+ env.Append(LIBS = ['id3', 'fmodex', 'z'])
+ env.Append(CPPPATH = ['.', '..', '../includes'])
+- env.Append(LIBPATH = ['.', '../libs'])
++ env.Append(LIBPATH = ['.', '../libs', '/opt/fmodex/api/lib'])
+ env['ISCONFIGURED']=1
+ # And finally save the options in the cache
+ opts.Save(cachefile, env)
+diff -ur bpmdetect.orig/src/track.cpp bpmdetect/src/track.cpp
+--- bpmdetect.orig/src/track.cpp 2008-04-25 22:33:18.000000000 +0300
++++ bpmdetect/src/track.cpp 2009-06-03 22:26:24.000000000 +0300
+@@ -20,6 +20,8 @@
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
++#include <cstdio>
++
+ #include "track.h"
+ #include "trackfmod.h"
+ #include "BPMDetect.h"