summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2021-04-30 17:14:37 +0100
committerSam James <sam@gentoo.org>2021-05-04 22:17:08 +0000
commitaa97c3df1c9977df01e201ea5de2e243c4d50133 (patch)
tree28835787b8b627daf46d424eb76addb9393774ad
parentmedia-gfx/iscan-plugin-esdip: Set QA_PREBUILT (diff)
downloadgentoo-aa97c3df1c9977df01e201ea5de2e243c4d50133.tar.gz
gentoo-aa97c3df1c9977df01e201ea5de2e243c4d50133.tar.bz2
gentoo-aa97c3df1c9977df01e201ea5de2e243c4d50133.zip
media-sound/wav2json: Respect CFLAGS/LDFLAGS/CXX
Closes: https://bugs.gentoo.org/727778 Closes: https://bugs.gentoo.org/724844 Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--media-sound/wav2json/files/wav2json-0.4-Makefile.patch35
-rw-r--r--media-sound/wav2json/wav2json-0.4.ebuild19
2 files changed, 47 insertions, 7 deletions
diff --git a/media-sound/wav2json/files/wav2json-0.4-Makefile.patch b/media-sound/wav2json/files/wav2json-0.4-Makefile.patch
new file mode 100644
index 000000000000..ea616509e45a
--- /dev/null
+++ b/media-sound/wav2json/files/wav2json-0.4-Makefile.patch
@@ -0,0 +1,35 @@
+--- a/Makefile
++++ b/Makefile
+@@ -4,23 +4,7 @@ UNAME := $(shell uname)
+ BINARY=../bin/$(UNAME)/wav2json
+ SRC=../src
+
+-ifeq ($(UNAME), Linux)
+ LD_PLATFORM_FLAGS=-lboost_program_options -lsndfile
+-CC=g++
+-endif
+-ifeq ($(UNAME), Darwin)
+-CC=clang++
+-LD_PLATFORM_FLAGS=\
+- /usr/local/lib/libboost_program_options-mt.a \
+- /usr/local/lib/libsndfile.a \
+- /usr/local/lib/libogg.a \
+- /usr/local/lib/libvorbis.a \
+- /usr/local/lib/libvorbisenc.a \
+- /usr/local/lib/libFLAC.a
+-
+-INCLUDES=\
+- -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/X11/include/
+-endif
+
+ ifdef USE_FLOAT
+ LD_PLATFORM_FLAGS+=-DUSE_FLOAT
+@@ -42,7 +26,7 @@ $(SRC)/version.hpp: Makefile version.txt
+
+ $(BINARY): $(SRC)/*.cpp $(SRC)/*.hpp $(SRC)/version.hpp
+ mkdir -p `dirname $(BINARY)`
+- $(CC) -O3 -Wall -Werror -std=c++11 $(SRC)/*.cpp $(INCLUDES) $(LD_PLATFORM_FLAGS) -o $(BINARY)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) -Wall -std=c++11 $(SRC)/*.cpp $(INCLUDES) $(LD_PLATFORM_FLAGS) -o $(BINARY)
+
+ ../examples/%.json : ../example_data/%.wav
+ $(BINARY) $+ --precision 2 --channels left right mid side min max -o $@
diff --git a/media-sound/wav2json/wav2json-0.4.ebuild b/media-sound/wav2json/wav2json-0.4.ebuild
index 6907ef34757d..9929abd646df 100644
--- a/media-sound/wav2json/wav2json-0.4.ebuild
+++ b/media-sound/wav2json/wav2json-0.4.ebuild
@@ -1,26 +1,31 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
+
+inherit toolchain-funcs
COMMIT_ID="e412923f1f792408e8ae1096ca40fb5307ddfc74"
DESCRIPTION="Generate waveformjs.org compatible json data out of wav files"
HOMEPAGE="https://github.com/beschulz/wav2json"
SRC_URI="https://github.com/beschulz/wav2json/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
-
-S=${WORKDIR}/${PN}-${COMMIT_ID}/build
+S="${WORKDIR}/${PN}-${COMMIT_ID}/build"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
DEPEND="
dev-libs/boost:=
- media-libs/libsndfile
-"
+ media-libs/libsndfile:="
RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}"/${P}-Makefile.patch )
+
+src_configure() {
+ tc-export CXX
+}
+
src_install() {
dobin ../bin/Linux/wav2json
}