diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2001-10-27 10:10:26 +0000 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2001-10-27 10:10:26 +0000 |
commit | a75ac66d0fa5447e813c90945ba76f205cc4d60c (patch) | |
tree | 19461c5a5158c8fdc636b3b716990fef1370fe36 | |
parent | bf9826d32ba3960c87254da91364c986a7ab9410 (diff) | |
download | FreeBSD-ports-a75ac66d0fa5447e813c90945ba76f205cc4d60c.zip FreeBSD-ports-a75ac66d0fa5447e813c90945ba76f205cc4d60c.tar.gz |
Add lame-devel 3.89b, ISO code based fast MP3 encoder kit.
PR: ports/29858
Submitted by: Cyrille Lefevre <clefevre@citeweb.net>
-rw-r--r-- | audio/Makefile | 1 | ||||
-rw-r--r-- | audio/lame-devel/Makefile | 108 | ||||
-rw-r--r-- | audio/lame-devel/distinfo | 1 | ||||
-rw-r--r-- | audio/lame-devel/files/patch-vorbis_interface.c | 116 | ||||
-rw-r--r-- | audio/lame-devel/pkg-comment | 1 | ||||
-rw-r--r-- | audio/lame-devel/pkg-descr | 11 | ||||
-rw-r--r-- | audio/lame-devel/pkg-plist | 27 |
7 files changed, 265 insertions, 0 deletions
diff --git a/audio/Makefile b/audio/Makefile index ce631ce..2a938c6 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -96,6 +96,7 @@ SUBDIR += koog SUBDIR += krio SUBDIR += lame + SUBDIR += lame-devel SUBDIR += liba52 SUBDIR += libao SUBDIR += libaudiofile diff --git a/audio/lame-devel/Makefile b/audio/lame-devel/Makefile new file mode 100644 index 0000000..3c80126 --- /dev/null +++ b/audio/lame-devel/Makefile @@ -0,0 +1,108 @@ +# ports collection makefile for: lame +# Date created: 11 January 1998 +# Whom: yoshiaki Uchikawa +# +# $FreeBSD$ +# + +PORTNAME= lame +PORTVERSION= 3.89b +CATEGORIES= audio +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ + ftp://ftp.fu-berlin.de/unix/sound/%SUBDIR%/ \ + ftp://ftp.zlurp.com/source/%SUBDIR%/ +MASTER_SITE_SUBDIR= lame +PKGNAMESUFFIX= -devel +DISTNAME= ${PORTNAME:S/-devel//}${PORTVERSION:S/b/beta/} + +MAINTAINER= clefevre@citeweb.net + +BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm + +# lame 3.89b builds ok w/ libvorbis-1.0.r1 but don't w/ r2. +# so, Ogg/Vorbis support should be disabled until this problem is fixed. +# see the following URL for details and followups : +# https://sourceforge.net/tracker/?func=detail&aid=462400&group_id=290&atid=100290 +.if !defined(WITH_UNTESTED_VORBIS_FIX) +WITHOUT_VORBIS= yes +.endif + +.if !defined(WITHOUT_VORBIS) +LIB_DEPENDS= vorbis.0:${PORTSDIR}/audio/libvorbis + +# libvorbis sources are required wether or not the library is already installed. +DEPENDS= ${PORTSDIR}/audio/libvorbis:patch +.endif + +WRKSRC= ${WRKDIR}/${PORTNAME:S/-devel//}-${PORTVERSION:S/b//} + +GNU_CONFIGURE= yes +INSTALLS_SHLIB= yes +CONFIGURE_ARGS= --enable-nasm \ + --enable-mp3x \ + --enable-mp3rtp +USE_GMAKE= yes +USE_LIBTOOL= yes +WANT_GTK= yes + +MAN1= lame.1 + +.include <bsd.port.pre.mk> + +.if defined(HAVE_GTK) +USE_GTK= yes +.else +CONFIGURE_ARGS+= --disable-gtktest +.endif + +.if !defined(WITHOUT_VORBIS) +LIBVORBIS_SRC!= cd ${PORTSDIR}/audio/libvorbis && ${MAKE} -V WRKSRC + +CONFIGURE_ARGS+= --with-vorbis +CONFIGURE_ENV+= CONFIG_DEFS="${CONFIG_DEFS}" \ + CPPFLAGS="-I${LOCALBASE}/include \ + -I${LIBVORBIS_SRC}/lib" \ + LDFLAGS="-L${LOCALBASE}/lib" \ + LIBS=-logg +CONFIG_DEFS= -DUSE_FFT3DN # -DUSE_FFTSSE -DUSE_FFTFPU +.endif + +DOCSDIR= ${PREFIX}/share/doc/${PORTNAME:S/-devel//} +DOC_FILES= API PRESETS.draft README TODO USAGE + +pre-everything:: +.if !defined(WITH_UNTESTED_VORBIS_FIX) + @${ECHO_MSG} + @${ECHO_MSG} "If you want to compile with Vorbis support" \ + "using an untested fix." + @${ECHO_MSG} "hit Ctrl-C right now and use " \ + "\"make WITH_UNTESTED_VORBIS_FIX=yes\"" + @${ECHO_MSG} +.else +.if !defined(WITHOUT_VORBIS) + @${ECHO_MSG} + @${ECHO_MSG} "If you don't want to compile with Vorbis support." + @${ECHO_MSG} "hit Ctrl-C right now and use \"make WITHOUT_VORBIS=yes\"" + @${ECHO_MSG} +.endif +.endif + +.if defined(NOPORTDOCS) +do-install: + @cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} \ + ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install-exec + @cd ${INSTALL_WRKSRC}/include && ${SETENV} ${MAKE_ENV} ${GMAKE} \ + ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install-data + @cd ${INSTALL_WRKSRC}/doc/man && ${SETENV} ${MAKE_ENV} ${GMAKE} \ + ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install-data +.else +post-install: install-doc + +install-doc: + @${MKDIR} ${DOCSDIR} +.for file in ${DOC_FILES} + @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} +.endfor +.endif + +.include <bsd.port.post.mk> diff --git a/audio/lame-devel/distinfo b/audio/lame-devel/distinfo new file mode 100644 index 0000000..7742564 --- /dev/null +++ b/audio/lame-devel/distinfo @@ -0,0 +1 @@ +MD5 (lame3.89beta.tar.gz) = b90b549e2a77f980f0d13d7630b8307a diff --git a/audio/lame-devel/files/patch-vorbis_interface.c b/audio/lame-devel/files/patch-vorbis_interface.c new file mode 100644 index 0000000..84513ca --- /dev/null +++ b/audio/lame-devel/files/patch-vorbis_interface.c @@ -0,0 +1,116 @@ +--- libmp3lame/vorbis_interface.c.orig Mon Mar 19 21:04:53 2001 ++++ libmp3lame/vorbis_interface.c Sat Sep 29 16:40:07 2001 +@@ -29,6 +29,9 @@ + #include <limits.h> + #include <time.h> + #include "vorbis/codec.h" ++#include "vorbis/vorbisenc.h" ++#include "codec_internal.h" ++#include "registry.h" + #include "modes/modes.h" + #include "lame.h" + #include "util.h" +@@ -210,7 +213,7 @@ + { + lame_internal_flags *gfc = gfp->internal_flags; + int samples,result,i,j,eof=0,eos=0,bout=0; +- double **pcm; ++ sample_t **pcm; + + while(1){ + +@@ -350,31 +353,67 @@ + int lame_encode_ogg_init(lame_global_flags *gfp) + { + lame_internal_flags *gfc=gfp->internal_flags; ++#ifdef THIS_CODE_IS_NOT_BROKEN_ANYMORE + char comment[MAX_COMMENT_LENGTH+1]; ++#endif + + + /********** Encode setup ************/ + + /* choose an encoding mode */ + /* (mode 0: 44kHz stereo uncoupled, roughly 128kbps VBR) */ +- if (gfp->compression_ratio < 5.01) { +- memcpy(&vi2,&info_E,sizeof(vi2)); +- MSGF( gfc, "Encoding with Vorbis mode info_E \n" ); +- } else if (gfp->compression_ratio < 6) { +- memcpy(&vi2,&info_D,sizeof(vi2)); +- MSGF( gfc, "Encoding with Vorbis mode info_D \n" ); +- } else if (gfp->compression_ratio < 8) { +- memcpy(&vi2,&info_C,sizeof(vi2)); +- MSGF( gfc, "Encoding with Vorbis mode info_C \n" ); +- } else if (gfp->compression_ratio < 10) { +- memcpy(&vi2,&info_B,sizeof(vi2)); +- MSGF( gfc, "Encoding with Vorbis mode info_B \n" ); +- } else if (gfp->compression_ratio < 12) { +- memcpy(&vi2,&info_A,sizeof(vi2)); +- MSGF( gfc, "Encoding with Vorbis mode info_A \n" ); +- } else { +- memcpy(&vi2,&info_A,sizeof(vi2)); +- MSGF( gfc, "Encoding with Vorbis mode info_A \n" ); ++ switch (gfc->channels_out) { ++ case 2: ++ if (gfp->compression_ratio < 5.01) { ++ memcpy(&vi2,&info_44c_E,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44c_E \n" ); ++ } else if (gfp->compression_ratio < 6) { ++ memcpy(&vi2,&info_44c_D,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44c_D \n" ); ++ } else if (gfp->compression_ratio < 8) { ++ memcpy(&vi2,&info_44c_C,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44c_C \n" ); ++ } else if (gfp->compression_ratio < 10) { ++ memcpy(&vi2,&info_44c_B,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44c_B \n" ); ++ } else if (gfp->compression_ratio < 12) { ++ memcpy(&vi2,&info_44c_A,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44c_A \n" ); ++ } else if (gfp->compression_ratio < 14) { ++ memcpy(&vi2,&info_44c_X,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44c_X \n" ); ++ } else if (gfp->compression_ratio < 16) { ++ memcpy(&vi2,&info_44c_Y,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44c_Y \n" ); ++ } else if (gfp->compression_ratio < 18) { ++ memcpy(&vi2,&info_44c_Z,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44c_Z \n" ); ++ } else { ++ memcpy(&vi2,&info_44c_A,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44c_A \n" ); ++ } ++ break; ++ ++ default: ++ if (gfp->compression_ratio < 10) { ++ memcpy(&vi2,&info_44_B,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44_B \n" ); ++ } else if (gfp->compression_ratio < 12) { ++ memcpy(&vi2,&info_44_A,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44_A \n" ); ++ } else if (gfp->compression_ratio < 14) { ++ memcpy(&vi2,&info_44_X,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44_X \n" ); ++ } else if (gfp->compression_ratio < 16) { ++ memcpy(&vi2,&info_44_Y,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44_Y \n" ); ++ } else if (gfp->compression_ratio < 18) { ++ memcpy(&vi2,&info_44_Z,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44_Z \n" ); ++ } else { ++ memcpy(&vi2,&info_44_A,sizeof(vi2)); ++ MSGF( gfc, "Encoding with Vorbis mode info_44_A \n" ); ++ } + } + + vi2.channels = gfc->channels_out; +@@ -518,7 +557,7 @@ + int bytes = 0; + + /* expose the buffer to submit data */ +- double **buffer = vorbis_analysis_buffer(&vd2,gfp->framesize); ++ float **buffer = vorbis_analysis_buffer(&vd2,gfp->framesize); + + /* change level of input by -90 dB (no de-interleaving!) */ + for ( i = 0; i < gfp->framesize; i++ ) diff --git a/audio/lame-devel/pkg-comment b/audio/lame-devel/pkg-comment new file mode 100644 index 0000000..9e6741c --- /dev/null +++ b/audio/lame-devel/pkg-comment @@ -0,0 +1 @@ +ISO code based fast MP3 encoder kit diff --git a/audio/lame-devel/pkg-descr b/audio/lame-devel/pkg-descr new file mode 100644 index 0000000..6a1e147 --- /dev/null +++ b/audio/lame-devel/pkg-descr @@ -0,0 +1,11 @@ +LAME stands for LAME Ain't an Mp3 Encoder. + +This is a patch agains the ISO MPEG1 demonstration source. The +modifications are distributed under the GNU GENERAL PUBLIC LICENSE +(see the file COPYING for details). + +The graphical frame analyzer uses the MPGLIB decoding engine, written by: +Michael Hipp (email: Michael.Hipp@student.uni-tuebingen.de) +and released under a more restrictive agreement. + +WWW: http://lame.sourceforge.net/ diff --git a/audio/lame-devel/pkg-plist b/audio/lame-devel/pkg-plist new file mode 100644 index 0000000..fd1967b --- /dev/null +++ b/audio/lame-devel/pkg-plist @@ -0,0 +1,27 @@ +@comment $FreeBSD$ +bin/lame +bin/mp3rtp +bin/mp3x +include/lame/lame.h +lib/libmp3lame.a +lib/libmp3lame.so.0 +@exec ln -fs %F %B/libmp3lame.so +@unexec rm -f %B/libmp3lame.so +%%PORTDOCS%%share/doc/lame/API +%%PORTDOCS%%share/doc/lame/PRESETS.draft +%%PORTDOCS%%share/doc/lame/README +%%PORTDOCS%%share/doc/lame/TODO +%%PORTDOCS%%share/doc/lame/USAGE +%%PORTDOCS%%share/doc/lame/html/basic.html +%%PORTDOCS%%share/doc/lame/html/contributors.html +%%PORTDOCS%%share/doc/lame/html/examples.html +%%PORTDOCS%%share/doc/lame/html/history.html +%%PORTDOCS%%share/doc/lame/html/id3.html +%%PORTDOCS%%share/doc/lame/html/index.html +%%PORTDOCS%%share/doc/lame/html/lame.css +%%PORTDOCS%%share/doc/lame/html/modes.html +%%PORTDOCS%%share/doc/lame/html/node6.html +%%PORTDOCS%%share/doc/lame/html/switchs.html +%%PORTDOCS%%@dirrm share/doc/lame/html +%%PORTDOCS%%@dirrm share/doc/lame +@dirrm include/lame |