From owner-freebsd-ports Sat Sep 29 8:50:19 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 814D037B40B for ; Sat, 29 Sep 2001 08:50:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8TFo2R78827; Sat, 29 Sep 2001 08:50:02 -0700 (PDT) (envelope-from gnats) Date: Sat, 29 Sep 2001 08:50:02 -0700 (PDT) Message-Id: <200109291550.f8TFo2R78827@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: Cyrille Lefevre Subject: Re: ports/29858: Updated port: audio/lame (3.89b) Reply-To: Cyrille Lefevre Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR ports/29858; it has been noted by GNATS. From: Cyrille Lefevre To: freebsd-gnats-submit@FreeBSD.org Cc: "David W. Chapman Jr." , yoshiaki@kt.rim.or.jp Subject: Re: ports/29858: Updated port: audio/lame (3.89b) Date: Sat, 29 Sep 2001 17:41:02 +0200 (CEST) here is a new patch set against lame-3.70 to update the lame port to 3.89b. since the original patch set, the following changes occur : Makefile WITH_UNTESTED_VORBIS_FIX added. pre-everything updated. some doc files added. files/patch-vorbis_interface.c new file this patch *needs* to be reviewed but allow to compile lame-3.89b w/ vorbis support. I'm still pending a fix from the lame team. see the following URL for details : https://sourceforge.net/tracker/index.php?func=detail&aid=462400&group_id=290&atid=100290 pkg-plist updated this patch set is right to be imported as is as lame or lame-devel (PORTNAME needs to be changed). IMHO, as lame is the best choice, but since someone submit a PR to import it as lame-devel, I left you the choice. see PR #30811 for details : http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30811 take care, the first part of the patch set is a diff against /dev/null, the rest is a cvs diff. --- /dev/null Sat Sep 29 17:11:47 2001 +++ files/patch-vorbis_interface.c Sat Sep 29 16:40:15 2001 @@ -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 + #include + #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++ ) Index: Makefile =================================================================== RCS file: /home/ncvs/ports/audio/lame/Makefile,v retrieving revision 1.18 diff -u -r1.18 Makefile --- Makefile 2001/01/08 00:54:29 1.18 +++ Makefile 2001/09/29 15:15:59 @@ -6,19 +6,44 @@ # PORTNAME= lame -PORTVERSION= 3.70 -PORTREVISION= 2 +PORTVERSION= 3.89b CATEGORIES= audio -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ - ftp://lame.sourceforge.net/pub/ -MASTER_SITE_SUBDIR= lame/src -DISTNAME= ${PORTNAME}${PORTVERSION} +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ + ftp://lame.sourceforge.net/pub/%SUBDIR%/ \ + http://prdownloads.sourceforge.net/%SUBDIR%/ \ + ftp://ftp.fu-berlin.de/unix/sound/%SUBDIR%/ \ + ftp://ftp.zlurp.com/source/%SUBDIR%/ +MASTER_SITE_SUBDIR= lame +DISTNAME= ${PORTNAME:S/-devel//}${PORTVERSION:S/b/beta/} MAINTAINER= yoshiaki@kt.rim.or.jp +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 +CONFIGURE_ARGS= --enable-nasm \ + --enable-mp3x \ + --enable-mp3rtp USE_GMAKE= yes +USE_LIBTOOL= yes WANT_GTK= yes -ALL_TARGET= lame MAN1= lame.1 @@ -26,15 +51,57 @@ .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="-DUSE_FFT3DN -DUSE_FFTSSE -DUSE_FFTFPU" \ + CPPFLAGS="-I${LOCALBASE}/include \ + -I${LIBVORBIS_SRC}/lib" \ + LDFLAGS="-L${LOCALBASE}/lib" \ + LIBS=-logg +.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: - @${INSTALL_PROGRAM} ${WRKSRC}/lame ${PREFIX}/bin - @${INSTALL_MAN} ${WRKSRC}/doc/man/lame.1 ${PREFIX}/man/man1 -.if !defined(NOPORTDOCS) - @${MKDIR} ${PREFIX}/share/doc/lame - @${INSTALL_DATA} ${WRKSRC}/doc/html/*.html \ - ${WRKSRC}/doc/html/*.css ${PREFIX}/share/doc/lame + @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 Index: distinfo =================================================================== RCS file: /home/ncvs/ports/audio/lame/distinfo,v retrieving revision 1.8 diff -u -r1.8 distinfo --- distinfo 2000/10/29 13:30:39 1.8 +++ distinfo 2001/08/14 14:17:39 @@ -1 +1 @@ -MD5 (lame3.70.tar.gz) = 44e29880a21535a7c935046a531e15af +MD5 (lame3.89beta.tar.gz) = b90b549e2a77f980f0d13d7630b8307a Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/audio/lame/pkg-plist,v retrieving revision 1.7 diff -u -r1.7 pkg-plist --- pkg-plist 2001/07/08 07:25:54 1.7 +++ pkg-plist 2001/09/29 14:54:11 @@ -1,12 +1,27 @@ +@comment $FreeBSD$ bin/lame -%%PORTDOCS%%share/doc/lame/contributors.html -%%PORTDOCS%%share/doc/lame/examples.html -%%PORTDOCS%%share/doc/lame/history.html -%%PORTDOCS%%share/doc/lame/id3.html -%%PORTDOCS%%share/doc/lame/index.html -%%PORTDOCS%%share/doc/lame/lame.css -%%PORTDOCS%%share/doc/lame/node5.html -%%PORTDOCS%%share/doc/lame/node6.html -%%PORTDOCS%%share/doc/lame/node7.html -%%PORTDOCS%%share/doc/lame/switchs.html +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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message