summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Stadler <centic@gentoo.org>2005-01-18 20:26:39 +0000
committerDominik Stadler <centic@gentoo.org>2005-01-18 20:26:39 +0000
commit1d1dd02a2d6bb7c9207698cc71f2d5f03e6e7883 (patch)
tree3a0544986fe44dd08da68148902f16eb9d1b1ee3 /media-sound/wavsplit
parentrev bump to CVS snapshot to support CVS snapshot of MythTV, purge old versions (diff)
downloadgentoo-2-1d1dd02a2d6bb7c9207698cc71f2d5f03e6e7883.tar.gz
gentoo-2-1d1dd02a2d6bb7c9207698cc71f2d5f03e6e7883.tar.bz2
gentoo-2-1d1dd02a2d6bb7c9207698cc71f2d5f03e6e7883.zip
New Version 1.2.1 and patch to support wav-files larger than 2G.
(Portage version: 2.0.51-r12)
Diffstat (limited to 'media-sound/wavsplit')
-rw-r--r--media-sound/wavsplit/ChangeLog10
-rw-r--r--media-sound/wavsplit/Manifest3
-rw-r--r--media-sound/wavsplit/files/digest-wavsplit-1.2.11
-rw-r--r--media-sound/wavsplit/files/wavsplit-1.2.1-large-files.patch198
-rw-r--r--media-sound/wavsplit/wavsplit-1.0.ebuild4
-rw-r--r--media-sound/wavsplit/wavsplit-1.1.0.ebuild4
-rw-r--r--media-sound/wavsplit/wavsplit-1.2.1.ebuild33
7 files changed, 247 insertions, 6 deletions
diff --git a/media-sound/wavsplit/ChangeLog b/media-sound/wavsplit/ChangeLog
index bad552d06c6f..42ecaa93c143 100644
--- a/media-sound/wavsplit/ChangeLog
+++ b/media-sound/wavsplit/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-sound/wavsplit
-# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/wavsplit/ChangeLog,v 1.7 2004/09/03 20:34:07 eradicator Exp $
+# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/wavsplit/ChangeLog,v 1.8 2005/01/18 20:26:39 centic Exp $
+
+*wavsplit-1.2.1 (18 Jan 2005)
+
+ 18 Jan 2005; Dominik Stadler <centic@gentoo.org>
+ +files/wavsplit-1.2.1-large-files.patch, +wavsplit-1.2.1.ebuild:
+ Add Version 1.2.1 and include patch to enable using wav files larger than 2G
03 Sep 2004; Jeremy Huddleston <eradicator@gentoo.org>
wavsplit-1.1.0.ebuild:
diff --git a/media-sound/wavsplit/Manifest b/media-sound/wavsplit/Manifest
index abc73a3b17ca..11d67c575545 100644
--- a/media-sound/wavsplit/Manifest
+++ b/media-sound/wavsplit/Manifest
@@ -2,5 +2,8 @@ MD5 19ed8b00daf1ccb624bf805a7b654aac ChangeLog 827
MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158
MD5 71a764c5591c7570c9975502c8e30c00 wavsplit-1.0.ebuild 682
MD5 033e007be0d2a96aca8d35e81ace4826 wavsplit-1.1.0.ebuild 705
+MD5 9fc3bc38dade3c68d9f19de49beae422 wavsplit-1.2.1.ebuild 692
MD5 614dc021dbcc9eeff1f7f30e81c6070d files/digest-wavsplit-1.0 60
MD5 db9e42a4c6a9b5af5fafcd4ad40de35b files/digest-wavsplit-1.1.0 65
+MD5 5ff77e4d417fcb0c21cfb902cac670b4 files/digest-wavsplit-1.2.1 65
+MD5 ff908f77353445c3684934789f83b42f files/wavsplit-1.2.1-large-files.patch 6730
diff --git a/media-sound/wavsplit/files/digest-wavsplit-1.2.1 b/media-sound/wavsplit/files/digest-wavsplit-1.2.1
new file mode 100644
index 000000000000..9421aa70b0ee
--- /dev/null
+++ b/media-sound/wavsplit/files/digest-wavsplit-1.2.1
@@ -0,0 +1 @@
+MD5 bf204fe0b809b0ab72202f5ba14e4587 wavsplit-1.2.1.tar.gz 32246
diff --git a/media-sound/wavsplit/files/wavsplit-1.2.1-large-files.patch b/media-sound/wavsplit/files/wavsplit-1.2.1-large-files.patch
new file mode 100644
index 000000000000..87730ce997a8
--- /dev/null
+++ b/media-sound/wavsplit/files/wavsplit-1.2.1-large-files.patch
@@ -0,0 +1,198 @@
+diff -Nur wavsplit-1.2.1/Makefile /tmp/wavsplit-1.2.1/Makefile
+--- wavsplit-1.2.1/Makefile 2004-11-17 23:19:17.000000000 +0100
++++ /tmp/wavsplit-1.2.1/Makefile 2005-01-16 21:23:33.000000000 +0100
+@@ -6,7 +6,7 @@
+ version = 1.2.1
+
+ CC = gcc
+-CFLAGS = -Wall
++CFLAGS = -Wall -D_FILE_OFFSET_BITS=64
+ LDFLAGS = -lm
+
+ all: wavsplit wavren
+Dateien wavsplit-1.2.1/wavren und /tmp/wavsplit-1.2.1/wavren sind verschieden.
+Dateien wavsplit-1.2.1/wavsplit und /tmp/wavsplit-1.2.1/wavsplit sind verschieden.
+diff -Nur wavsplit-1.2.1/wavsplit.c /tmp/wavsplit-1.2.1/wavsplit.c
+--- wavsplit-1.2.1/wavsplit.c 2004-11-17 23:19:17.000000000 +0100
++++ /tmp/wavsplit-1.2.1/wavsplit.c 2005-01-16 22:04:39.000000000 +0100
+@@ -269,9 +269,9 @@
+ timepos * split)
+ {
+ char *buf, *bp_out;
+- long to_write, to_read, n_read, pos;
++ off_t to_write, to_read, n_read, pos;
+ int fnr = 0;
+- unsigned long in_blk_size;
++ off_t in_blk_size;
+ struct stat stat_buf;
+
+ /* Buffer reservieren */
+@@ -282,8 +282,8 @@
+ in_blk_size = stat_buf.st_blksize;
+ buf = malloc (in_blk_size + 1);
+ if (buf == NULL) {
+- fprintf (stderr, "Could not allocate %ld bytes of memory.\n",
+- in_blk_size + 1);
++ fprintf (stderr, "Could not allocate %llu bytes of memory.\n",
++ (in_blk_size + 1));
+ return 1;
+ }
+ /* if (verbose) printf("Allocated %ld bytes for buffer.\n", in_blk_size+1); */
+@@ -295,7 +295,7 @@
+ return 1;
+
+ do {
+- n_read = (long) stdread (buf, in_blk_size + 1);
++ n_read = stdread (buf, in_blk_size + 1);
+ if (n_read < 0) {
+ fprintf (stderr, "Error while reading.\n");
+ return 1;
+@@ -336,7 +336,7 @@
+ else {
+ if (verbose)
+ printf
+- ("[%02d]\tuntil the end %12ld 100.00%%\n",
++ ("[%02d]\tuntil the end %12llu 100.00%%\n",
+ fnr + 1, databytes);
+ }
+ }
+@@ -374,7 +374,7 @@
+ int readheader ()
+ {
+ char ibuffer[BUFFERSIZE];
+- u_long offset;
++ off_t offset;
+
+ if (lseek (ifd, 0L, SEEK_SET)) {
+ fprintf (stderr, "Could not locate beginning of input file\n");
+@@ -425,9 +425,22 @@
+ ptr += 4; /* we move past data */
+ memcpy (&databytes, ptr, sizeof (u_long));
+
+- offset = (u_long) ptr + 4 - (u_long) ibuffer;
++ struct stat stat_buf;
++
++ /* Buffer reservieren */
++ if (fstat (ifd, &stat_buf) < 0) {
++ fprintf (stderr, "Could not read input file state.\n");
++ return 1;
++ }
++ if(stat_buf.st_size > databytes) {
++ printf("Actual size of file (%llu) is larger than the databytes (%llu), setting to actual size: %llu!\n",
++ stat_buf.st_size, databytes + (ptr - ibuffer) + 4, stat_buf.st_size - (ptr - ibuffer) - 4 );
++ databytes = stat_buf.st_size - (ptr - ibuffer) - 4 ;
++ }
++
++ offset = ptr + 4 - ibuffer;
+ if (lseek (ifd, offset, SEEK_SET) == -1) {
+- fprintf (stderr, "Error seeking to WAV data at %lu\n", offset);
++ fprintf (stderr, "Error seeking to WAV data at %llu\n", offset);
+ return 1;
+ }
+
+@@ -435,7 +448,7 @@
+ printf ("Channels: %d\n", waveformat.wChannels);
+ printf ("Samplerate: %ldHz\n", waveformat.dwSamplesPerSec);
+ printf ("Samplebits: %d\n", waveformat.wBitsPerSample);
+- printf ("Databytes: %ld\n\n", databytes);
++ printf ("Databytes: %llu\n\n", databytes);
+ printf ("Split Hours Mins Seconds Bytes %%\n");
+ //printf("Blocks: %ld\n",databytes/waveformat.wBlockAlign);
+ }
+@@ -473,7 +486,7 @@
+ return NULL;
+ }
+
+-int createout (int num, long datasize)
++int createout (int num, off_t datasize)
+ {
+ char ofile[MAX_PATH + 1];
+ sprintf (ofile, "%s/%02d.wav", basename, num);
+@@ -517,7 +530,7 @@
+ TimeFloat = hr* 3600.0 + min * 60.0 + sek + (frames/fps);
+
+ */
+-long calcsplit (unsigned int UseHours, unsigned int UseFrames,
++off_t calcsplit (unsigned int UseHours, unsigned int UseFrames,
+ unsigned int fps, unsigned int UseTrackLens,
+ int splitnr, timepos * split)
+ {
+@@ -526,7 +539,7 @@
+
+ double TimeFloat = 0.0;
+ double SplitTimeFloat = 0.0;
+- long pos;
++ off_t pos;
+ unsigned int Opt = 2 * UseHours + UseFrames;
+
+ switch (Opt) {
+@@ -569,7 +582,7 @@
+ /* first calculate to the nearest sample, then scale by the */
+ /* block size to avoid getting e.g. half a block */
+
+- pos = (long) ((SplitTimeFloat * (double) waveformat.dwSamplesPerSec));
++ pos = (off_t) ((SplitTimeFloat * (double) waveformat.dwSamplesPerSec));
+ pos = pos * waveformat.wBlockAlign;
+
+ if (verbose) {
+@@ -581,24 +594,24 @@
+ }
+ }
+ if (UseFrames)
+- printf ("%5d %8.3f %12ld %3.2f%%\n",
++ printf ("%5d %8.3f %12llu %3.2f%%\n",
+ split[splitnr].min,
+ (double) split[splitnr].seki +
+ ((double) split[splitnr].frames / (double) fps), pos,
+ (float) pos / (float) databytes * 100);
+
+ else
+- printf ("%5d %8.3f %12ld %3.2f%%\n",
++ printf ("%5d %8.3f %12llu %3.2f%%\n",
+ split[splitnr].min,
+ split[splitnr].sek, pos, (float) pos / (float) databytes * 100);
+
+ return pos;
+ }
+
+-long stdread (char *buf, long nchars)
++off_t stdread (char *buf, off_t nchars)
+ {
+- int n_read;
+- int to_be_read = nchars;
++ off_t n_read;
++ off_t to_be_read = nchars;
+
+ while (to_be_read) {
+ n_read = read (ifd, buf, to_be_read);
+diff -Nur wavsplit-1.2.1/wavsplit.h /tmp/wavsplit-1.2.1/wavsplit.h
+--- wavsplit-1.2.1/wavsplit.h 2004-11-17 23:19:17.000000000 +0100
++++ /tmp/wavsplit-1.2.1/wavsplit.h 2005-01-16 21:23:33.000000000 +0100
+@@ -121,15 +121,15 @@
+ static int split (unsigned int UseHours, unsigned int UseFrames,
+ unsigned int fps, unsigned int UseTrackLens,
+ int splits, timepos * splitpos);
+-static long calcsplit (unsigned int UseHours, unsigned int UseFrames,
++static off_t calcsplit (unsigned int UseHours, unsigned int UseFrames,
+ unsigned int fps, unsigned int UseTrackLens,
+ int splitnr, timepos * split);
+-static int createout ();
++static int createout (int num, off_t datasize);
+ int closeout ();
+ void display (unsigned char avgleft, unsigned char avgright,
+ unsigned char avgloud);
+ static void usage ();
+-static long stdread (char *buf, long nchars);
++static off_t stdread (char *buf, off_t nchars);
+ #ifdef __powerpc__
+ static _ConvertHeaderFromNative (WAVE_HEADER * hdr);
+ static _ConvertHeaderToNative (WAVE_HEADER * hdr);
+@@ -137,7 +137,7 @@
+
+ static char *ptr;
+ static WAVEFORMAT waveformat;
+-static u_long databytes, b;
++static off_t databytes, b;
+ static int ifd, ofd;
+ static int verbose;
+ static char basename[MAX_PATH + 1], ifile[MAX_PATH + 1];
diff --git a/media-sound/wavsplit/wavsplit-1.0.ebuild b/media-sound/wavsplit/wavsplit-1.0.ebuild
index 157d8cce341a..5d43c73bba09 100644
--- a/media-sound/wavsplit/wavsplit-1.0.ebuild
+++ b/media-sound/wavsplit/wavsplit-1.0.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/wavsplit/wavsplit-1.0.ebuild,v 1.5 2004/07/19 23:04:25 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/wavsplit/wavsplit-1.0.ebuild,v 1.6 2005/01/18 20:26:39 centic Exp $
IUSE=""
diff --git a/media-sound/wavsplit/wavsplit-1.1.0.ebuild b/media-sound/wavsplit/wavsplit-1.1.0.ebuild
index 8a11f62cef9e..8288ebcd5283 100644
--- a/media-sound/wavsplit/wavsplit-1.1.0.ebuild
+++ b/media-sound/wavsplit/wavsplit-1.1.0.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/wavsplit/wavsplit-1.1.0.ebuild,v 1.2 2004/09/03 20:34:07 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/wavsplit/wavsplit-1.1.0.ebuild,v 1.3 2005/01/18 20:26:39 centic Exp $
DESCRIPTION="WavSplit is a simple command line tool to split WAV files"
HOMEPAGE="http://sourceforge.net/projects/wavsplit/"
diff --git a/media-sound/wavsplit/wavsplit-1.2.1.ebuild b/media-sound/wavsplit/wavsplit-1.2.1.ebuild
new file mode 100644
index 000000000000..756e69335526
--- /dev/null
+++ b/media-sound/wavsplit/wavsplit-1.2.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/wavsplit/wavsplit-1.2.1.ebuild,v 1.1 2005/01/18 20:26:39 centic Exp $
+
+inherit eutils
+
+DESCRIPTION="WavSplit is a simple command line tool to split WAV files"
+HOMEPAGE="http://sourceforge.net/projects/wavsplit/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+#-sparc, -amd64: 1.0: "Only supports PCM wave format" error message.
+KEYWORDS="~x86 -sparc -amd64"
+IUSE=""
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ epatch ${FILESDIR}/${P}-large-files.patch
+}
+
+
+#src_compile() {
+# emake || die
+#}
+
+src_install() {
+ dobin wavsplit wavren
+ doman wavsplit.1 wavren.1
+ dodoc BUGS CHANGES COPYING CREDITS README README.wavren
+}
+