summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-01-27 19:42:56 +0100
committerDavid Seifert <soap@gentoo.org>2016-01-27 19:44:55 +0100
commitcfb62d0d06d25269c935b7029a1ca656ceecf86f (patch)
treed9dfe9f9181a18d8e0bac379bd63734f9e8952e6
parentdev-ruby/ruby-webkit2-gtk: initial import for bug 573094 (diff)
downloadgentoo-cfb62d0d.tar.gz
gentoo-cfb62d0d.tar.bz2
gentoo-cfb62d0d.zip
media-sound/bpmdetect: Add patch to respect user flags
Gentoo-Bug: 334465 * EAPI=6 * Added patch by Gavin Pryke to respect all user flags * Fixed QA issues caused by non-compliant .desktop file * Fixed QA issues caused by wrong printf() handling Package-Manager: portage-2.2.27
-rw-r--r--media-sound/bpmdetect/bpmdetect-0.6.1-r1.ebuild53
-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
3 files changed, 157 insertions, 0 deletions
diff --git a/media-sound/bpmdetect/bpmdetect-0.6.1-r1.ebuild b/media-sound/bpmdetect/bpmdetect-0.6.1-r1.ebuild
new file mode 100644
index 000000000000..351532aa0938
--- /dev/null
+++ b/media-sound/bpmdetect/bpmdetect-0.6.1-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Automatic BPM detection utility"
+HOMEPAGE="http://sourceforge.net/projects/bpmdetect"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/taglib
+ media-libs/id3lib
+ >=media-libs/fmod-4.25.07-r1:1
+ dev-qt/qtgui:4"
+DEPEND="${RDEPEND}
+ sys-apps/sed
+ dev-util/scons
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${PN}
+PATCHES=(
+ "${FILESDIR}/${P}-gcc44_and_fmodex_path.patch"
+ "${FILESDIR}/${P}-fix-buildsystem.patch"
+ "${FILESDIR}/${P}-fix-printf-format.patch"
+)
+
+src_prepare() {
+ default
+ tc-export CC CXX
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ export QTDIR="/usr/$(get_libdir)"
+ scons prefix=/usr || die "scons failed"
+}
+
+src_install() {
+ dobin build/${PN}
+ doicon src/${PN}-icon.png
+ domenu src/${PN}.desktop
+ dodoc authors readme todo
+}
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 );
+ }