summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound/substract_wave')
-rw-r--r--media-sound/substract_wave/Manifest1
-rw-r--r--media-sound/substract_wave/files/substract_wave-0.3-Makefile.patch42
-rw-r--r--media-sound/substract_wave/files/substract_wave-0.3-overflow.patch26
-rw-r--r--media-sound/substract_wave/metadata.xml5
-rw-r--r--media-sound/substract_wave/substract_wave-0.3-r1.ebuild30
5 files changed, 104 insertions, 0 deletions
diff --git a/media-sound/substract_wave/Manifest b/media-sound/substract_wave/Manifest
new file mode 100644
index 000000000000..8d1bb8aabd68
--- /dev/null
+++ b/media-sound/substract_wave/Manifest
@@ -0,0 +1 @@
+DIST substract_wave-0.3.tgz 14793 RMD160 adf7c7307911745876552f2025016dcced316632 SHA1 12e39587977c188d705391033aee01dac04cc024 SHA256 c1f833eb892e9acaa48d47e395cbdb127325b7787c78383bf2623289157731e4
diff --git a/media-sound/substract_wave/files/substract_wave-0.3-Makefile.patch b/media-sound/substract_wave/files/substract_wave-0.3-Makefile.patch
new file mode 100644
index 000000000000..db99dc1f5fe0
--- /dev/null
+++ b/media-sound/substract_wave/files/substract_wave-0.3-Makefile.patch
@@ -0,0 +1,42 @@
+diff -ur substract_wave-0.3.orig/Makefile substract_wave-0.3/Makefile
+--- substract_wave-0.3.orig/Makefile 2005-10-06 17:23:42.000000000 +0300
++++ substract_wave-0.3/Makefile 2009-05-11 23:19:30.000000000 +0300
+@@ -1,27 +1,22 @@
+-#CC=gcc
+-#CC=/usr/local/bin/gcc
+-
+-
+-CFLAGS = -O2 -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
++CC ?= gcc
++CFLAGS += -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
++LIBRARY = -lm
+
+ .c.o:
+- gcc $(CFLAGS) -c $<
++ $(CC) $(CFLAGS) -c $<
+
+-OBJECT =\
+-substract_wave.o
++OBJECT = substract_wave.o
+
+ a.out : $(OBJECT)
+- gcc -o substract_wave $(OBJECT) $(LIBRARY)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(OBJECT) $(LIBRARY) -o substract_wave
+
+-# DEPENDENCIES
+ substract_wave.o : substract_wave.c substract_wave.h wave_header.h
+
+-install:
+- cp substract_wave /usr/local/bin/
+-
+-install.man:
+- cp substract_wave.man /usr/local/man/man1/substract_wave.1
++install:
++ mkdir -p $(DESTDIR)/usr/bin
++ cp substract_wave $(DESTDIR)/usr/bin
++ mkdir -p $(DESTDIR)/usr/share/man/man1
++ cp substract_wave.man $(DESTDIR)/usr/share/man/man1/substract_wave.1
+
+ clean:
+ rm *.o
+-
diff --git a/media-sound/substract_wave/files/substract_wave-0.3-overflow.patch b/media-sound/substract_wave/files/substract_wave-0.3-overflow.patch
new file mode 100644
index 000000000000..991a4f6c5381
--- /dev/null
+++ b/media-sound/substract_wave/files/substract_wave-0.3-overflow.patch
@@ -0,0 +1,26 @@
+diff --git a/substract_wave.c b/substract_wave.c
+index a44e5e5..bef211b 100644
+--- a/substract_wave.c
++++ b/substract_wave.c
+@@ -545,9 +545,9 @@ for(i = 0; i < header_size; i++)
+ *ptr = 0;
+ ptr++;
+ }
+-strcpy(out_header -> main_chunk, "RIFF");
+-strcpy(out_header -> chunk_type, "WAVE");
+-strcpy(out_header -> sub_chunk, "fmt ");
++memcpy(out_header -> main_chunk, "RIFF", 4);
++memcpy(out_header -> chunk_type, "WAVE", 4);
++memcpy(out_header -> sub_chunk, "fmt ", 4);
+ out_header -> length_chunk = 16; //always 16
+ out_header -> format = 1; //PCM
+
+@@ -557,7 +557,7 @@ out_header -> byte_p_spl = main_header -> byte_p_spl;
+
+ out_header -> sample_fq = main_header -> sample_fq;
+ out_header -> bit_p_spl = 16; // main_header -> bit_p_spl;
+-strcpy(out_header -> data_chunk, "data");
++memcpy(out_header -> data_chunk, "data", 4);
+
+ main_offset = start_offset + (samples_offset * 2);
+
diff --git a/media-sound/substract_wave/metadata.xml b/media-sound/substract_wave/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-sound/substract_wave/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sound</herd>
+</pkgmetadata>
diff --git a/media-sound/substract_wave/substract_wave-0.3-r1.ebuild b/media-sound/substract_wave/substract_wave-0.3-r1.ebuild
new file mode 100644
index 000000000000..7861f4cb2e90
--- /dev/null
+++ b/media-sound/substract_wave/substract_wave-0.3-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils toolchain-funcs
+
+DESCRIPTION="substracts 2 mono wave files from each other by a factor specified on the command line"
+HOMEPAGE="http://panteltje.com/panteltje/dvd/"
+SRC_URI="http://panteltje.com/panteltje/dvd/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-Makefile.patch \
+ "${FILESDIR}"/${P}-overflow.patch
+}
+
+src_compile() {
+ tc-export CC
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc CHANGES mono-stereo.txt README
+}