diff options
Diffstat (limited to 'media-sound/sndpeek')
-rw-r--r-- | media-sound/sndpeek/Manifest | 1 | ||||
-rw-r--r-- | media-sound/sndpeek/files/sndpeek-1.3-gcc-4.3.patch | 26 | ||||
-rw-r--r-- | media-sound/sndpeek/files/sndpeek-1.3-gcc-4.4.patch | 11 | ||||
-rw-r--r-- | media-sound/sndpeek/files/sndpeek-1.3-makefile.patch | 296 | ||||
-rw-r--r-- | media-sound/sndpeek/metadata.xml | 9 | ||||
-rw-r--r-- | media-sound/sndpeek/sndpeek-1.3-r2.ebuild | 73 |
6 files changed, 416 insertions, 0 deletions
diff --git a/media-sound/sndpeek/Manifest b/media-sound/sndpeek/Manifest new file mode 100644 index 000000000000..7dbbba698c1a --- /dev/null +++ b/media-sound/sndpeek/Manifest @@ -0,0 +1 @@ +DIST sndpeek-1.3.tgz 298983 SHA256 36291830b345338777dd304bacb81b97885d31b33e9e6dba19340f25ac169d08 diff --git a/media-sound/sndpeek/files/sndpeek-1.3-gcc-4.3.patch b/media-sound/sndpeek/files/sndpeek-1.3-gcc-4.3.patch new file mode 100644 index 000000000000..dcaa930440d4 --- /dev/null +++ b/media-sound/sndpeek/files/sndpeek-1.3-gcc-4.3.patch @@ -0,0 +1,26 @@ +diff -ru sndpeek-1.3~/src/marsyas/LPC.h sndpeek-1.3/src/marsyas/LPC.h +--- sndpeek-1.3~/src/marsyas/LPC.h 2008-06-28 12:37:05.000000000 +0200 ++++ sndpeek-1.3/src/marsyas/LPC.h 2008-06-28 12:37:15.000000000 +0200 +@@ -35,7 +35,7 @@ + #include "MagFFT.h" + #include "fvec.h" + #include "fmatrix.h" +-#include <math.h> ++#include <cstdlib> + #include "AutoCorrelation.h" + #include "MarSignal.h" + +diff -ru sndpeek-1.3~/src/sndpeek/RtAudio.h sndpeek-1.3/src/sndpeek/RtAudio.h +--- sndpeek-1.3~/src/sndpeek/RtAudio.h 2008-06-28 12:37:05.000000000 +0200 ++++ sndpeek-1.3/src/sndpeek/RtAudio.h 2008-06-28 12:37:15.000000000 +0200 +@@ -43,8 +43,9 @@ + #define __RTAUDIO_H + + #include "RtError.h" +-#include <string> ++#include <cstring> + #include <vector> ++#include <cstdlib> + using namespace std; + + // Operating system dependent thread functionality. diff --git a/media-sound/sndpeek/files/sndpeek-1.3-gcc-4.4.patch b/media-sound/sndpeek/files/sndpeek-1.3-gcc-4.4.patch new file mode 100644 index 000000000000..d92bcdddf3b2 --- /dev/null +++ b/media-sound/sndpeek/files/sndpeek-1.3-gcc-4.4.patch @@ -0,0 +1,11 @@ +diff -ur sndpeek-1.3.orig/src/sndpeek/RtAudio.cpp sndpeek-1.3/src/sndpeek/RtAudio.cpp +--- sndpeek-1.3.orig/src/sndpeek/RtAudio.cpp 2006-01-14 01:38:54.000000000 +0200 ++++ sndpeek-1.3/src/sndpeek/RtAudio.cpp 2009-06-06 10:58:48.000000000 +0300 +@@ -40,6 +40,7 @@ + // RtAudio: Version 3.0.1, 22 March 2004 + + #include "RtAudio.h" ++#include <cstdio> + #include <iostream> + + // Static variable definitions. diff --git a/media-sound/sndpeek/files/sndpeek-1.3-makefile.patch b/media-sound/sndpeek/files/sndpeek-1.3-makefile.patch new file mode 100644 index 000000000000..9b17c99e146b --- /dev/null +++ b/media-sound/sndpeek/files/sndpeek-1.3-makefile.patch @@ -0,0 +1,296 @@ +diff -ru sndpeek-1.3~/src/sndpeek/makefile.alsa sndpeek-1.3/src/sndpeek/makefile.alsa +--- sndpeek-1.3~/src/sndpeek/makefile.alsa 2007-08-12 19:22:00.000000000 +0200 ++++ sndpeek-1.3/src/sndpeek/makefile.alsa 2007-08-12 19:27:57.000000000 +0200 +@@ -1,10 +1,10 @@ + +-CC=gcc +-CPP=g++ ++CC?=gcc ++CXX?=g++ + INCLUDES=-I../marsyas/ + MARSYAS_DIR=../marsyas/ +-CFLAGS=-D__LINUX_ALSA__ -D__LITTLE_ENDIAN__ $(INCLUDES) -O3 -c +-LIBS=-L/usr/X11R6/lib -lglut -lGL -lGLU -lasound -lXmu -lX11 -lXext -lXi -lm -lsndfile ++CFLAGS+=-D__LINUX_ALSA__ -D__LITTLE_ENDIAN__ $(INCLUDES) -c ++LIBS=-L/usr/X11R6/lib -lpthread -lstdc++ -lglut -lGL -lGLU -lasound -lXmu -lX11 -lXext -lXi -lm -lsndfile + + OBJS=chuck_fft.o RtAudio.o Thread.o sndpeek.o Stk.o \ + Centroid.o DownSampler.o Flux.o LPC.o MFCC.o RMS.o Rolloff.o \ +@@ -12,55 +12,55 @@ + MagFFT.o NormRMS.o MarSignal.o fmatrix.o + + sndpeek: $(OBJS) +- $(CPP) -o $@ $(OBJS) $(LIBS) ++ $(CXX) -o $@ $(OBJS) $(LIBS) + + Centroid.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + DownSampler.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + Flux.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + LPC.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + MFCC.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + RMS.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + Rolloff.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + System.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + fvec.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + AutoCorrelation.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + Communicator.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + Hamming.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + MagFFT.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + NormRMS.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + MarSignal.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + fmatrix.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + .o: $*.h + +@@ -68,7 +68,7 @@ + $(CC) $(CFLAGS) $*.c + + .cpp.o: $*.h $*.cpp +- $(CC) $(CFLAGS) $*.cpp ++ $(CXX) $(CFLAGS) $*.cpp + + clean: + rm -f sndpeek *~ *.o +diff -ru sndpeek-1.3~/src/sndpeek/makefile.jack sndpeek-1.3/src/sndpeek/makefile.jack +--- sndpeek-1.3~/src/sndpeek/makefile.jack 2007-08-12 19:22:00.000000000 +0200 ++++ sndpeek-1.3/src/sndpeek/makefile.jack 2007-08-12 19:31:29.000000000 +0200 +@@ -1,9 +1,9 @@ +-CC=gcc +-CPP=g++ ++CC?=gcc ++CXX?=g++ + INCLUDES=-I../marsyas/ + MARSYAS_DIR=../marsyas/ +-CFLAGS=-D__LINUX_JACK__ -D__LITTLE_ENDIAN__ $(INCLUDES) -O3 -c +-LIBS=-L/usr/X11R6/lib -lpthread -lstdc++ -lglut -lGL -lGLU -lasound -ljack -lXmu -lX11 -lXext -lXi -lm -lsndfile ++CFLAGS+=-D__LINUX_JACK__ -D__LITTLE_ENDIAN__ $(INCLUDES) -c ++LIBS=-L/usr/X11R6/lib -lpthread -lstdc++ -lglut -lGL -lGLU -lasound -ljack -lXmu -lX11 -lXext -lXi -lm -lsndfile + + OBJS=chuck_fft.o RtAudio.o Thread.o sndpeek.o Stk.o \ + Centroid.o DownSampler.o Flux.o LPC.o MFCC.o RMS.o Rolloff.o \ +@@ -11,55 +11,55 @@ + MagFFT.o NormRMS.o MarSignal.o fmatrix.o + + sndpeek: $(OBJS) +- $(CPP) -o $@ $(OBJS) $(LIBS) ++ $(CXX) -o $@ $(OBJS) $(LIBS) + + Centroid.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + DownSampler.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + Flux.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + LPC.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + MFCC.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + RMS.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + Rolloff.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + System.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + fvec.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + AutoCorrelation.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + Communicator.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + Hamming.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + MagFFT.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + NormRMS.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + MarSignal.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + fmatrix.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + .o: $*.h + +@@ -67,7 +67,7 @@ + $(CC) $(CFLAGS) $*.c + + .cpp.o: $*.h $*.cpp +- $(CC) $(CFLAGS) $*.cpp ++ $(CXX) $(CFLAGS) $*.cpp + + clean: + rm -f sndpeek *~ *.o +diff -ru sndpeek-1.3~/src/sndpeek/makefile.oss sndpeek-1.3/src/sndpeek/makefile.oss +--- sndpeek-1.3~/src/sndpeek/makefile.oss 2007-08-12 19:22:00.000000000 +0200 ++++ sndpeek-1.3/src/sndpeek/makefile.oss 2007-08-12 19:33:28.000000000 +0200 +@@ -1,8 +1,8 @@ +-CC=gcc +-CPP=g++ ++CC?=gcc ++CXX?=g++ + INCLUDES=-I../marsyas/ + MARSYAS_DIR=../marsyas/ +-CFLAGS=-D__LINUX_OSS__ -D__LITTLE_ENDIAN__ $(INCLUDES) -O3 -c ++CFLAGS+=-D__LINUX_OSS__ -D__LITTLE_ENDIAN__ $(INCLUDES) -c + LIBS=-L/usr/X11R6/lib -lpthread -lstdc++ -lglut -lGL -lGLU -lXmu -lX11 -lXext -lXi -lm -lsndfile + + TARGE=sndpeek +@@ -12,55 +12,55 @@ + MagFFT.o NormRMS.o MarSignal.o fmatrix.o + + sndpeek: $(OBJS) +- $(CPP) -o $@ $(OBJS) $(LIBS) ++ $(CXX) -o $@ $(OBJS) $(LIBS) + + Centroid.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + DownSampler.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + Flux.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + LPC.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + MFCC.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + RMS.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + Rolloff.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + System.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + fvec.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + AutoCorrelation.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + Communicator.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + Hamming.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + MagFFT.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + NormRMS.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + MarSignal.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + fmatrix.o: +- $(CC) $(CFLAGS) $(MARSYAS_DIR)$*.cpp ++ $(CXX) $(CFLAGS) $(MARSYAS_DIR)$*.cpp + + .o: $*.h + +@@ -68,7 +68,7 @@ + $(CC) $(CFLAGS) $*.c + + .cpp.o: $*.h $*.cpp +- $(CC) $(CFLAGS) $*.cpp ++ $(CXX) $(CFLAGS) $*.cpp + + clean: + rm -f sndpeek *~ *.o diff --git a/media-sound/sndpeek/metadata.xml b/media-sound/sndpeek/metadata.xml new file mode 100644 index 000000000000..278cb636a75f --- /dev/null +++ b/media-sound/sndpeek/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sound</herd> + <longdescription lang="en"> + real-time audio visualization + </longdescription> +</pkgmetadata> + diff --git a/media-sound/sndpeek/sndpeek-1.3-r2.ebuild b/media-sound/sndpeek/sndpeek-1.3-r2.ebuild new file mode 100644 index 000000000000..9d7a4050686d --- /dev/null +++ b/media-sound/sndpeek/sndpeek-1.3-r2.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 +inherit eutils toolchain-funcs + +DESCRIPTION="real-time audio visualization" +HOMEPAGE="http://soundlab.cs.princeton.edu/software/sndpeek/" +SRC_URI="http://soundlab.cs.princeton.edu/software/${PN}/files/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+alsa jack oss" + +RDEPEND="media-libs/freeglut + virtual/opengl + virtual/glu + x11-libs/libXmu + x11-libs/libX11 + x11-libs/libXext + media-libs/libsndfile + jack? ( media-sound/jack-audio-connection-kit ) + alsa? ( media-libs/alsa-lib ) + app-eselect/eselect-sndpeek" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-makefile.patch \ + "${FILESDIR}"/${P}-gcc-4.3.patch \ + "${FILESDIR}"/${P}-gcc-4.4.patch +} + +pkg_setup() { + if ! use alsa && ! use jack && ! use oss; then + eerror "One of the following USE flags is needed: jack, alsa or oss" + die "Please set one audio engine type" + fi +} + +compile_backend() { + backend=$1 + cd "${S}/src/sndpeek" + einfo "Compiling against ${backend}" + emake -f "makefile.${backend}" CC=$(tc-getCC) \ + CXX=$(tc-getCXX) || die "emake failed" + mv sndpeek{,-${backend}} + emake -f "makefile.${backend}" clean + cd - +} + +src_compile() { + use alsa && compile_backend alsa + use jack && compile_backend jack + use oss && compile_backend oss +} + +src_install() { + use alsa && dobin src/sndpeek/sndpeek-alsa + use jack && dobin src/sndpeek/sndpeek-jack + use oss && dobin src/sndpeek/sndpeek-oss + dodoc AUTHORS README THANKS TODO VERSIONS +} + +pkg_postinst() { + elog "Sndpeek now can use many audio engines, so you can specify audio engine" + elog "with sndpeek-{jack,alsa,oss}" + elog "Or you can use 'eselect sndpeek' to set the audio engine" + + einfo "Calling eselect sndpeek update..." + eselect sndpeek update --if-unset +} |