summaryrefslogtreecommitdiff
path: root/audio/toolame
diff options
context:
space:
mode:
authormrg <mrg@pkgsrc.org>2003-06-23 07:07:26 +0000
committermrg <mrg@pkgsrc.org>2003-06-23 07:07:26 +0000
commit2813289d818d8c19dc1e2c42b9c92001552d7118 (patch)
treeb1e0b879306fedb2128be2b37fb7a1b7e4c8dcdc /audio/toolame
parent5d281c2397de425ed6e9233c6f220e5eb02bf565 (diff)
downloadpkgsrc-2813289d818d8c19dc1e2c42b9c92001552d7118.tar.gz
import new package for "toolame":
tooLAME is an optimized Mpeg Audio 1/2 Layer 2 encoder. It is based heavily on - the ISO dist10 code - improvement to algorithms as part of the LAME project: www.sulaco.org/mp3 - work by Michael Cheng and other contributors (see CONTRIBUTORS)
Diffstat (limited to 'audio/toolame')
-rw-r--r--audio/toolame/DESCR4
-rw-r--r--audio/toolame/Makefile30
-rw-r--r--audio/toolame/PLIST7
-rw-r--r--audio/toolame/distinfo6
-rw-r--r--audio/toolame/patches/patch-aa31
-rw-r--r--audio/toolame/patches/patch-ab22
6 files changed, 100 insertions, 0 deletions
diff --git a/audio/toolame/DESCR b/audio/toolame/DESCR
new file mode 100644
index 00000000000..734ae189f47
--- /dev/null
+++ b/audio/toolame/DESCR
@@ -0,0 +1,4 @@
+tooLAME is an optimized Mpeg Audio 1/2 Layer 2 encoder. It is based heavily on
+ - the ISO dist10 code
+ - improvement to algorithms as part of the LAME project: www.sulaco.org/mp3
+ - work by Michael Cheng and other contributors (see CONTRIBUTORS)
diff --git a/audio/toolame/Makefile b/audio/toolame/Makefile
new file mode 100644
index 00000000000..327a6788cdd
--- /dev/null
+++ b/audio/toolame/Makefile
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/06/23 07:07:26 mrg Exp $
+#
+
+DISTNAME= toolame-02l
+CATEGORIES= audio
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=toolame/}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= tech-pkg@netbsd.org
+HOMEPAGE= http://sourceforge.net/projects/toolame/
+COMMENT= toolame is an optimized mpeg 1/2 layer 2 audio encoder
+
+LICENSE= fee-based-commercial-use
+
+USE_BUILDLINK2= yes
+USE_GMAKE= yes
+
+TOOLAME_ARCH?=
+
+MAKE_ENV+= CC="${CC}" CFLAGS="${CFLAGS}" ARCH="${TOOLAME_ARCH}"
+ALL_TARGET= toolame
+
+TOOLAME_HTMLFILES= changes.html default.html psycho.html readme.html vbr.html
+do-install:
+ ${INSTALL_DATA_DIR} ${LOCALBASE}/share/doc/html/toolame
+ cd ${WRKSRC}/html; ${INSTALL_DATA} ${TOOLAME_HTMLFILES} \
+ ${LOCALBASE}/share/doc/html/toolame
+ ${INSTALL_PROGRAM} ${WRKSRC}/toolame ${PREFIX}/bin
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/audio/toolame/PLIST b/audio/toolame/PLIST
new file mode 100644
index 00000000000..bd8634accc7
--- /dev/null
+++ b/audio/toolame/PLIST
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/06/23 07:07:26 mrg Exp $
+bin/toolame
+share/doc/html/toolame/changes.html
+share/doc/html/toolame/default.html
+share/doc/html/toolame/psycho.html
+share/doc/html/toolame/readme.html
+share/doc/html/toolame/vbr.html
diff --git a/audio/toolame/distinfo b/audio/toolame/distinfo
new file mode 100644
index 00000000000..0025efba131
--- /dev/null
+++ b/audio/toolame/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2003/06/23 07:07:26 mrg Exp $
+
+SHA1 (toolame-02l.tgz) = 9f58345ec5d552f49a9ad598e6eb2dc126cb10b4
+Size (toolame-02l.tgz) = 127493 bytes
+SHA1 (patch-aa) = 317743c6cb8d610be2dd3861388015b5d9cf7bf6
+SHA1 (patch-ab) = e2b8bb920d778c3d9fc1b72ff286c96d62a03051
diff --git a/audio/toolame/patches/patch-aa b/audio/toolame/patches/patch-aa
new file mode 100644
index 00000000000..a0eb97ab7dd
--- /dev/null
+++ b/audio/toolame/patches/patch-aa
@@ -0,0 +1,31 @@
+$NetBSD: patch-aa,v 1.1.1.1 2003/06/23 07:07:26 mrg Exp $
+
+these patches correct invalid C code that declares variables after statements.
+
+--- psycho_3.c.orig 2003-03-01 20:35:14.000000000 +1100
++++ psycho_3.c 2003-06-20 17:07:31.000000000 +1000
+@@ -133,8 +133,8 @@ void psycho_3_fft(FLOAT sample[BLKSIZE],
+ static FLOAT *window;
+
+ if (!init) { /* calculate window function for the Fourier transform */
+- window = (FLOAT *) mem_alloc (sizeof (DFFT), "window");
+ register FLOAT sqrt_8_over_3 = pow (8.0 / 3.0, 0.5);
++ window = (FLOAT *) mem_alloc (sizeof (DFFT), "window");
+ for (i = 0; i < BLKSIZE; i++) {
+ window[i] = sqrt_8_over_3 * 0.5 * (1 - cos (2.0 * PI * i / (BLKSIZE))) / BLKSIZE;
+ }
+@@ -441,12 +441,14 @@ void psycho_3_init(options *glopts) {
+ psycho_3_init_add_db();
+
+ /* For each spectral line calculate the bark and the ATH (in dB) */
++ {
+ FLOAT sfreq = (FLOAT) s_freq[header->version][header->sampling_frequency] * 1000;
+ for (i=1;i<HBLKSIZE; i++) {
+ FLOAT freq = i * sfreq/BLKSIZE;
+ bark[i] = freq2bark(freq);
+ ath[i] = ATH_dB(freq,glopts->athlevel);
+ }
++ }
+
+ { /* Work out the critical bands
+ Starting from line 0, all lines within 1 bark of the starting
diff --git a/audio/toolame/patches/patch-ab b/audio/toolame/patches/patch-ab
new file mode 100644
index 00000000000..6028323a730
--- /dev/null
+++ b/audio/toolame/patches/patch-ab
@@ -0,0 +1,22 @@
+$NetBSD: patch-ab,v 1.1.1.1 2003/06/23 07:07:26 mrg Exp $
+
+these patches correct invalid C code that declares variables after statements.
+
+--- psycho_4.c.orig 2003-03-02 11:50:48.000000000 +1100
++++ psycho_4.c 2003-06-20 17:06:47.000000000 +1000
+@@ -361,6 +361,7 @@ void psycho_4_init (double sfreq, option
+ }
+
+
++ {
+ /* Work out the partitions
+ Starting from line 0, all lines within 0.33 of the starting
+ bark are added to the same partition. When a line is greater
+@@ -381,6 +382,7 @@ void psycho_4_init (double sfreq, option
+ /* keep a count of how many frequency lines are in each partition */
+ numlines[partition_count]++;
+ }
++ }
+
+ /* For each partition within the frequency space,
+ calculate the average bark value - cbval [central bark value] */