From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 18CF758973 for ; Wed, 27 Jan 2016 18:45:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9B80421C003; Wed, 27 Jan 2016 18:45:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 39F2121C003 for ; Wed, 27 Jan 2016 18:45:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 05F5A3407B8 for ; Wed, 27 Jan 2016 18:45:06 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6B381CF3 for ; Wed, 27 Jan 2016 18:45:02 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1453920295.cfb62d0d06d25269c935b7029a1ca656ceecf86f.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/bpmdetect/, media-sound/bpmdetect/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-sound/bpmdetect/bpmdetect-0.6.1-r1.ebuild media-sound/bpmdetect/files/bpmdetect-0.6.1-fix-buildsystem.patch media-sound/bpmdetect/files/bpmdetect-0.6.1-fix-printf-format.patch X-VCS-Directories: media-sound/bpmdetect/ media-sound/bpmdetect/files/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: cfb62d0d06d25269c935b7029a1ca656ceecf86f X-VCS-Branch: master Date: Wed, 27 Jan 2016 18:45:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 51cce745-97fd-4f49-9771-71bada12fea8 X-Archives-Hash: 25a4e3fd561ffdd3a4015d1726bc3598 commit: cfb62d0d06d25269c935b7029a1ca656ceecf86f Author: David Seifert gentoo org> AuthorDate: Wed Jan 27 18:42:56 2016 +0000 Commit: David Seifert gentoo 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 ++#include + + #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(dBPM * 100.) ); + } else { // all other formats are converted to "0.00" + snprintf(buffer, BPM_LEN, "%.2f", dBPM ); + }