diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-sound/wavsplit | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-sound/wavsplit')
-rw-r--r-- | media-sound/wavsplit/Manifest | 1 | ||||
-rw-r--r-- | media-sound/wavsplit/files/wavsplit-1.2.1-64bit.patch | 69 | ||||
-rw-r--r-- | media-sound/wavsplit/files/wavsplit-1.2.1-Makefile.patch | 23 | ||||
-rw-r--r-- | media-sound/wavsplit/files/wavsplit-1.2.1-large-files.patch | 193 | ||||
-rw-r--r-- | media-sound/wavsplit/metadata.xml | 8 | ||||
-rw-r--r-- | media-sound/wavsplit/wavsplit-1.2.1-r1.ebuild | 35 |
6 files changed, 329 insertions, 0 deletions
diff --git a/media-sound/wavsplit/Manifest b/media-sound/wavsplit/Manifest new file mode 100644 index 000000000000..31673cabc03f --- /dev/null +++ b/media-sound/wavsplit/Manifest @@ -0,0 +1 @@ +DIST wavsplit-1.2.1.tar.gz 32246 SHA256 266970b06888a9030573de07adf85c316bd0850eb663ed3a65248b6f64107e8a diff --git a/media-sound/wavsplit/files/wavsplit-1.2.1-64bit.patch b/media-sound/wavsplit/files/wavsplit-1.2.1-64bit.patch new file mode 100644 index 000000000000..abfaf424113b --- /dev/null +++ b/media-sound/wavsplit/files/wavsplit-1.2.1-64bit.patch @@ -0,0 +1,69 @@ +--- bak/wavsplit.c 2006-11-24 17:53:36.056883000 +0100 ++++ wavsplit.c 2006-11-24 17:52:38.345276250 +0100 +@@ -403,7 +403,7 @@ + ptr += 4; /* we move past fmt_ */ + memcpy (&waveformat, ptr, sizeof (WAVEFORMAT)); + +- if (waveformat.dwSize < (sizeof (WAVEFORMAT) - sizeof (u_long))) { ++ if (waveformat.dwSize < (sizeof (WAVEFORMAT) - sizeof (u_int))) { + fprintf (stderr, "Bad format: Bad fmt size\n"); + return 1; + } +@@ -423,7 +423,7 @@ + } + + ptr += 4; /* we move past data */ +- memcpy (&databytes, ptr, sizeof (u_long)); ++ memcpy (&databytes, ptr, sizeof (u_int)); + + struct stat stat_buf; + +@@ -446,7 +446,7 @@ + + if (verbose) { + printf ("Channels: %d\n", waveformat.wChannels); +- printf ("Samplerate: %ldHz\n", waveformat.dwSamplesPerSec); ++ printf ("Samplerate: %dHz\n", waveformat.dwSamplesPerSec); + printf ("Samplebits: %d\n", waveformat.wBitsPerSample); + printf ("Databytes: %llu\n\n", databytes); + printf ("Split Hours Mins Seconds Bytes %%\n"); +--- bak/wavsplit.h 2006-11-24 17:53:36.056883000 +0100 ++++ wavsplit.h 2006-11-24 17:43:58.648797250 +0100 +@@ -46,29 +46,29 @@ + } TIMEFORMAT; + + typedef struct { +- u_long dwSize; ++ u_int dwSize; + u_short wFormatTag; + u_short wChannels; +- u_long dwSamplesPerSec; +- u_long dwAvgBytesPerSec; ++ u_int dwSamplesPerSec; ++ u_int dwAvgBytesPerSec; + u_short wBlockAlign; + u_short wBitsPerSample; + } WAVEFORMAT; + + typedef struct { + char RiffID[4]; +- u_long RiffSize; ++ u_int RiffSize; + char WaveID[4]; + char FmtID[4]; +- u_long FmtSize; ++ u_int FmtSize; + u_short wFormatTag; + u_short nChannels; +- u_long nSamplesPerSec; +- u_long nAvgBytesPerSec; ++ u_int nSamplesPerSec; ++ u_int nAvgBytesPerSec; + u_short nBlockAlign; + u_short wBitsPerSample; + char DataID[4]; +- u_long nDataBytes; ++ u_int nDataBytes; + } WAVE_HEADER; + + typedef struct { diff --git a/media-sound/wavsplit/files/wavsplit-1.2.1-Makefile.patch b/media-sound/wavsplit/files/wavsplit-1.2.1-Makefile.patch new file mode 100644 index 000000000000..a4b35a64fefe --- /dev/null +++ b/media-sound/wavsplit/files/wavsplit-1.2.1-Makefile.patch @@ -0,0 +1,23 @@ +--- Makefile.old 2006-03-30 08:54:03.000000000 +0200 ++++ Makefile 2006-03-30 08:55:04.000000000 +0200 +@@ -6,16 +6,16 @@ + version = 1.2.1 + + CC = gcc +-CFLAGS = -Wall +-LDFLAGS = -lm ++CFLAGS += -Wall ++LIBS = -lm + + all: wavsplit wavren + + wavsplit: wavsplit.c wavsplit.h +- gcc $(CFLAGS) wavsplit.c $(LDFLAGS) -o $@ ++ $(CC) $(CFLAGS) wavsplit.c $(LIBS) $(LDFLAGS) -o $@ + + wavren: wavren.c +- gcc $(CFLAGS) wavren.c -o $@ ++ $(CC) $(CFLAGS) wavren.c $(LDFLAGS) -o $@ + + install: + cp wavsplit $(BIN) 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..ff27231be65e --- /dev/null +++ b/media-sound/wavsplit/files/wavsplit-1.2.1-large-files.patch @@ -0,0 +1,193 @@ +--- Makefile 2004-11-17 23:19:17.000000000 +0100 ++++ 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 + LIBS = -lm + + all: wavsplit wavren +--- wavsplit.c 2004-11-17 23:19:17.000000000 +0100 ++++ 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); +--- wavsplit.h 2004-11-17 23:19:17.000000000 +0100 ++++ 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/metadata.xml b/media-sound/wavsplit/metadata.xml new file mode 100644 index 000000000000..e7e1a15d4e50 --- /dev/null +++ b/media-sound/wavsplit/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sound</herd> + <upstream> + <remote-id type="sourceforge">wavsplit</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-sound/wavsplit/wavsplit-1.2.1-r1.ebuild b/media-sound/wavsplit/wavsplit-1.2.1-r1.ebuild new file mode 100644 index 000000000000..d93896a736aa --- /dev/null +++ b/media-sound/wavsplit/wavsplit-1.2.1-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 +inherit eutils toolchain-funcs + +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="~amd64 -sparc x86" +IUSE="" + +src_prepare() { + emake clean || die + epatch "${FILESDIR}"/${P}-Makefile.patch \ + "${FILESDIR}"/${P}-large-files.patch \ + "${FILESDIR}"/${P}-64bit.patch +} + +src_compile() { + emake CC="$(tc-getCC)" || die +} + +src_test() { :; } #294302 + +src_install() { + dobin wav{ren,split} || die + doman wav{ren,split}.1 || die + dodoc BUGS CHANGES CREDITS README{,.wavren} +} |