public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-sound/bpmdetect/, media-sound/bpmdetect/files/
@ 2016-01-27 18:45 David Seifert
  0 siblings, 0 replies; only message in thread
From: David Seifert @ 2016-01-27 18:45 UTC (permalink / raw
  To: gentoo-commits

commit:     cfb62d0d06d25269c935b7029a1ca656ceecf86f
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 27 18:42:56 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Jan 27 18:44:55 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfb62d0d

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

 media-sound/bpmdetect/bpmdetect-0.6.1-r1.ebuild    | 53 +++++++++++++++++
 .../files/bpmdetect-0.6.1-fix-buildsystem.patch    | 67 ++++++++++++++++++++++
 .../files/bpmdetect-0.6.1-fix-printf-format.patch  | 37 ++++++++++++
 3 files changed, 157 insertions(+)

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 0000000..351532a
--- /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 0000000..fa6c0e5
--- /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 0000000..89bf644
--- /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 );
+   }


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-27 18:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-27 18:45 [gentoo-commits] repo/gentoo:master commit in: media-sound/bpmdetect/, media-sound/bpmdetect/files/ David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox