Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jun 2002 21:31:54 -0300
From:      Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
To:        freebsd-multimedia@FreeBSD.org
Subject:   Test update avifile to 0.7.7-20020523
Message-ID:  <20020621003216.6604.qmail@exxodus.fedaykin.here>

next in thread | raw e-mail | index | archive | help

--liOOAslEiF7prFVr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

	Could you guys test this update? It is working in my
-STABLE system quite fine. Also, lots of users have reported that
it works. It's nice to get an avifile update after a while. :-)

	However, at least one person reported that the mp3 sound
playback stutters. He was running -CURRENT so I am trying to
pin point possible causes.

	Could you guys try this update? It will be committed
to the ports tree as soon the maintainer voices his opinion on this
patch (changes, fixes, ...). We might as well try to fix all
possible problems before that. Keep me posted.

	One thing, this port is kde3 only.

- Patch can be found at

http://people.freebsd.org/~lioux/patch-avifile

	Regards,


-- 
Mario S F Ferreira - DF - Brazil - "I guess this is a signature."
Computer Science Undergraduate | FreeBSD Committer | CS Developer
flames to beloved devnull@someotherworldbeloworabove.org
feature, n: a documented bug | bug, n: an undocumented feature

--liOOAslEiF7prFVr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-avifile

diff -ruN /usr/ports/graphics/avifile/Makefile avifile/Makefile
--- /usr/ports/graphics/avifile/Makefile	Wed Apr 17 19:47:47 2002
+++ avifile/Makefile	Thu Jun 20 19:56:44 2002
@@ -6,35 +6,34 @@
 #
 
 PORTNAME=	avifile
-PORTVERSION=	0.6.0.20011220
-PORTREVISION=	1
+PORTVERSION=	0.7.7-20020523
 PORTEPOCH=	1
 CATEGORIES=	graphics
-MASTER_SITES=	http://avifile.sourceforge.net/ \
-		http://ernie.eit.uni-kl.de/avifile/
-DISTNAME=	${PORTNAME}-${PORTVERSION:S/0.2/0-2/}admin
+MASTER_SITES=	http://avifile.sourceforge.net/
 EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	holger@eit.uni-kl.de
 
 BUILD_DEPENDS=	nasm:${PORTSDIR}/devel/nasm
-.if !defined(WITHOUT_DIVX)
-LIB_DEPENDS+=	divxdecore.1:${PORTSDIR}/graphics/libdivxdecore-devel
-LIB_DEPENDS+=	divxencore.0:${PORTSDIR}/graphics/libdivxencore
-.endif
 
-USE_QT_VER=	2
+USE_SUBMAKE=	yes
+USE_REINPLACE=	yes
 USE_XLIB=	yes
 USE_GMAKE=	yes
+USE_LIBTOOL=	yes
 GNU_CONFIGURE=	yes
 INSTALLS_SHLIB=	yes
-WRKSRC=		${WRKDIR}/${PORTNAME}${PORTVERSION:S/.0.2/-2/}
+
+WRKSRC=		${WRKDIR}/${PORTNAME}${PORTVERSION:C/^(...).*/\1/}-${PORTVERSION:C/-.*//}
 
 USE_LIBTOOL=	yes
 LIBTOOLFILES=	acinclude.m4
 CONFIGURE_ENV=	SDL_CONFIG="${SDL_CONFIG}" \
-		CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib"
-CONFIGURE_ARGS= --with-gnu-ld --enable-iconv
+		CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib" \
+		CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" \
+		LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib `${ECHO_CMD} ${PTHREAD_LIBS}`"
+CONFIGURE_ARGS= --with-gnu-ld --enable-iconv \
+		--disable-divx4
 
 PLIST_SUB=	LIB_VERSION="${LIB_VERSION}" VERSION="${VERSION}"
 
@@ -43,7 +42,7 @@
 CODEC_DETECTION_FILE!=	${MAKE} -f ${CODEC_PORT}/Makefile -V CODEC_DETECTION_FILE
 
 LIB_VERSION=	3
-VERSION=	0.6
+VERSION=	0.7
 SDL_CONFIG?=	${LOCALBASE}/bin/sdl11-config
 DIFF?=		/usr/bin/diff
 FMT?=		/usr/bin/fmt
@@ -53,40 +52,111 @@
 CONFIGURE_ARGS+=	--enable-release
 .endif
 
+# soundblaster can be passed ac3 instead of letting avifile decode
+# it
+.if defined(WITH_AC3_PASSTHROUGH)
+CONFIGURE_ARGS+=	--enable-ac3passthrough
+PLIST_SUB+=	AC3_PASS=""
+.else
+CONFIGURE_ARGS+=	--disable-ac3passthrough
+PLIST_SUB+=	AC3_PASS="@comment "
+.endif
+
+# liba52
+.if !defined(WITHOUT_A52)
+LIB_DEPENDS+=	a52.0:${PORTSDIR}/audio/liba52
+
+CONFIGURE_ARGS+=	--enable-a52 \
+			--disable-ffmpeg-a52bin \
+			--with-a52-prefix=${LOCALBASE}
+PLIST_SUB+=	A52=""
+.else
+CONFIGURE_ARGS+=	--disable-a52
+
+PLIST_SUB+=	A52="@comment "
+.endif
+
 # libmad
 .if !defined(WITHOUT_MAD)
+LIB_DEPENDS+=	mad.1:${PORTSDIR}/audio/mad
+
 PLIST_SUB+=	MAD=""
 .else
 CONFIGURE_ARGS+=	--disable-mad
-
 PLIST_SUB+=	MAD="@comment "
 .endif
 
+# qt
+.if !defined(WITHOUT_QT)
+. if exists(${X11BASE}/include/qt2/qapp.h)
+USE_QT_VER=	2
+. else
+USE_QT_VER=	3
+. endif
+PLIST_SUB+=	QT=""
+.else
+CONFIGURE_ARGS+=	--without-qt
+
+PLIST_SUB+=	QT="@comment "
+.endif
+
+# sdl
+.if !defined(WITHOUT_SDL)
+LIB_DEPENDS+=	SDL-1.1.4:${PORTSDIR}/devel/sdl12
+.else
+CONFIGURE_ARGS+=	--without-sdl
+.endif
+
 # libvorbis; thus, libogg
 .if !defined(WITHOUT_VORBIS)
 LIB_DEPENDS+=	vorbis.1:${PORTSDIR}/audio/libvorbis
 
+CONFIGURE_ARGS+=	--with-vorbis-prefix=${LOCALBASE} \
+			--with-ogg-prefix=${LOCALBASE}
 PLIST_SUB+=	VORBIS=""
 .else
 CONFIGURE_ARGS+=	--disable-vorbis
-
 PLIST_SUB+=	VORBIS="@comment "
 .endif
 
+# xvid
+.if !defined(WITHOUT_XVID)
+LIB_DEPENDS+=	xvidcore.0:${PORTSDIR}/graphics/xvid
+
+CONFIGURE_ARGS+=	--with-xvid-prefix=${LOCALBASE}
+PLIST_SUB+=	XVID=""
+.else
+CONFIGURE_ARGS+=	--disable-xvid
+PLIST_SUB+=	XVID="@comment "
+.endif
+
 pre-everything::
 .if !defined(WITHOUT_OPTIMIZED_CFLAGS)
 	@${ECHO_MSG} "You can disable compilation optimizations by defining"
 	@${ECHO_MSG} "	WITHOUT_OPTIMIZED_CFLAGS."
 .endif
+.if !defined(WITH_AC3_PASSTHROUGH)
+	@${ECHO_MSG} "You can enable soundblaster ac3 passthrough support by"
+	@${ECHO_MSG} "	defining WITH_AC3_PASSTHROUGH."
+.endif
+.if !defined(WITHOUT_A52)
+	@${ECHO_MSG} "You can disable ac3 (liba52) support by defining WITHOUT_A52."
+.endif
 .if !defined(WITHOUT_MAD)
 	@${ECHO_MSG} "You can disable mad support by defining WITHOUT_MAD."
 .endif
-.if !defined(WITHOUT_DIVX)
-	@${ECHO_MSG} "You can disable divx support by defining WITHOUT_DIVX."
+.if !defined(WITHOUT_QT)
+	@${ECHO_MSG} "You can disable QT supported tools by defining WITHOUT_QT."
+.endif
+.if !defined(WITHOUT_SDL)
+	@${ECHO_MSG} "You can disable SDL supported tools by defining WITHOUT_SDL."
 .endif
 .if !defined(WITHOUT_VORBIS)
 	@${ECHO_MSG} "You can disable vorbis support by defining WITHOUT_VORBIS."
 .endif
+.if !defined(WITHOUT_XVID)
+	@${ECHO_MSG} "You can disable xvid support by defining WITHOUT_XVID."
+.endif
 
 pre-extract:
 	@if [ -f ${LOCALBASE}/lib/libpth.so ]; then \
@@ -95,28 +165,69 @@
 	  ${FALSE};\
 	fi
 
-pre-configure:
-	@${PERL} -pi -e "s|-lqt|-lqt2|g;s|qt-mt|qt2-mt|g;\
-		s|^(PACKAGE=avifile).*|\1|;s|<decore.h>|<divx/decore.h>|; \
-		s|<encore2.h>|<divx/encore.h>|" ${WRKSRC}/configure
-	@${FIND} ${WRKSRC} -type f | ${XARGS} ${PERL} -pi -e \
-		"s|decore.h|divx/decore.h|; s|encore2.h|divx/encore.h|"
-	@${PERL} -pi -e "s|-ljpeg|-L${LOCALBASE}/lib -ljpeg|g" \
+# insure that ports' liba52 is being used
+post-extract:
+	@${RM} -Rf ${WRKSRC}/ffmpeg/libavcodec/liba52
+
+post-patch:
+.if !defined(WITHOUT_A52)
+	@${REINPLACE_CMD} -e 's|-la52|${LIBA52_DEP_LIBS} -la52|' \
+		${WRKSRC}/configure
+# XXX - fool ffmpeg to use ports' version of liba52, revise this
+# at EVERY avifile update
+	@${REINPLACE_CMD} -e 's|liba52/liba52.la|${LOCALBASE}/lib/liba52.la|; \
+		s|SUBDIRS_LIBA52 = liba52|SUBDIRS_LIBA52 =|; \
+		s|mlib liba52 i386|mlib i386|' \
+		${WRKSRC}/ffmpeg/libavcodec/Makefile.in
+	@${REINPLACE_CMD} -e 's|"liba52/a52.h"|<a52dec/a52.h>|' \
+		${WRKSRC}/ffmpeg/libavcodec/a52dec.c
+.endif
+.if !defined(WITHOUT_MAD)
+	@${REINPLACE_CMD} -e 's|MAD_LDADD = \@MAD_LDADD\@|MAD_LDADD = -L${LOCALBASE}/lib \@MAD_LDADD\@|' \
+		${WRKSRC}/plugins/libmad/Makefile.in
+.endif
+.if !defined(WITHOUT_QT)
+. if exists(${X11BASE}/include/qt2/qapp.h)
+	@${REINPLACE_CMD} -e 's|qt-mt|qt2-mt|' ${WRKSRC}/configure
+. endif
+	@${REINPLACE_CMD} -e 's|QT_CFLAGS = \@QT_CFLAGS\@|QT_CFLAGS = -I${X11BASE}/include \@QT_CFLAGS\@|; \
+		s|QT_LIBS = \@QT_LIBS\@|QT_LIBS = -L${X11BASE}/lib \@QT_LIBS\@|' \
+		${WRKSRC}/libavqt/Makefile.in
+.endif
+.if !defined(WITHOUT_XVID)
+	@${REINPLACE_CMD} -e 's|XVID_LIBS = \@XVID_LIBS\@|XVID_LIBS = -L${LOCALBASE}/lib \@XVID_LIBS\@|' \
+		${WRKSRC}/plugins/libxvid/Makefile.in
+.endif
+	@${REINPLACE_CMD} -e 's|__THROW||' \
+		${WRKSRC}/plugins/libwin32/loader/dshow/DS_Filter.h
+	@${REINPLACE_CMD} -e 's|-ljpeg|-L${LOCALBASE}/lib -ljpeg|' \
 		${WRKSRC}/samples/mjpeg_plugin/Makefile.in
+# if we have LAME
+	@${REINPLACE_CMD} -e 's|-lmp3lame|-L${LOCALBASE}/lib -lmp3lame|' \
+		${WRKSRC}/configure
+# use portname without version to build dir names
+	@${SED} -E -e 's|^(PACKAGE\s*=\s*avifile).*|\1|' \
+		${WRKSRC}/configure > ${WRKDIR}/configure && \
+		${CP} ${WRKDIR}/configure ${WRKSRC}/configure
+# fix build in -CURRENT
+	@${FIND} ${WRKSRC} -type f | ${XARGS} -n 10 ${REINPLACE_CMD} -e \
+		's|#include <malloc.h>|#include <stdlib.h>|g'
+# fix breakage if either auto{conf,make} are installed
+# fix incorrect behavior of configure script
 	@${FIND} ${WRKSRC} \( -name Makefile.in -o -name configure \) | \
-		${XARGS} ${PERL} -pi -e "s|AUTOCONF.*=.*|AUTOCONF=true|g;\
-		s|ACLOCAL.*=.*|ACLOCAL=true|g;s|AUTOMAKE.*=.*|AUTOMAKE=true|g;\
-		s|AUTOHEADER.*=.*|AUTOHEADER=true|g;\
-		s|^INSTALL = .*|INSTALL=${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP}|g;\
-		s|-release ..LT_RELEASE\)||"
-	@${FIND} ${WRKSRC} -type f | ${XARGS} ${PERL} -pi -e \
-		"s|#include.*<malloc.h>|#include <stdlib.h>|g"
+		${XARGS} -n 10 ${REINPLACE_CMD} -e \
+		's|INSTALL = \@INSTALL\@|INSTALL = ${INSTALL}|; \
+		s!ACLOCAL =!ACLOCAL = ${TRUE} || !; \
+		s!AUTOCONF =!AUTOCONF = ${TRUE} || !; \
+		s!AUTOHEADER =!AUTOHEADER = ${TRUE} || !; \
+		s!AUTOMAKE =!AUTOMAKE = ${TRUE} || !'
 
 post-configure:
 # Libtool fix code kindly provided by Mr. Maxim Sobolev <sobomax@FreeBSD.org>
-	@${PERL} -pi -e \
+	@${REINPLACE_CMD} -e \
 		's|^deplibs_check_method=.*|deplibs_check_method=pass_all|' \
 			${WRKSRC}/libtool
+	@${LN} -sf ${LOCALBASE}/bin/libtool ${WRKSRC}
 
 post-install:
 .if !defined(NOPORTDOCS)
@@ -128,7 +239,6 @@
 .include <bsd.port.pre.mk>
 
 .if ${ARCH} == "i386"
-LIB_DEPENDS+=	SDL-1.1.4:${PORTSDIR}/devel/sdl12
 RUN_DEPENDS+=	${CODEC_DETECTION_FILE}:${CODEC_PORT}
 
 CONFIGURE_ARGS+=	--enable-x86opt --with-win32-path=${LOCALBASE}/lib/win32
@@ -136,9 +246,25 @@
 PLIST_SUB+=	FFMPEG="" WIN32=""
 .else
 CONFIGURE_ARGS+=	--disable-x86opt --disable-win32 \
-			--disable-ffmpeg --disable-ffmpeg-divx --disable-ffmpeg-ac3
+			--disable-ffmpeg
 
 PLIST_SUB+=	FFMPEG="@comment " WIN32="@comment "
+.endif
+
+# hack taken from ogle to make it work with liba52 + djbfft
+.if exists(${LOCALBASE}/lib/liba52.la)
+LIBA52_DEP_LIBS!=	${GREP} dependency_libs ${LOCALBASE}/lib/liba52.la | ${CUT} -d \' -f 2
+.else
+LIBA52_DEP_LIBS=
+.endif
+
+# if we have LAME
+.if exists(${LOCALBASE}/lib/libmp3lame.so)
+LIB_DEPENDS+=	mp3lame.0:${PORTSDIR}/audio/lame
+
+PLIST_SUB+=	NOLAME="@comment " LAME=""
+.else
+PLIST_SUB+=	NOLAME="" LAME="@comment "
 .endif
 
 .include <bsd.port.post.mk>
diff -ruN /usr/ports/graphics/avifile/distinfo avifile/distinfo
--- /usr/ports/graphics/avifile/distinfo	Thu Jan 17 21:03:22 2002
+++ avifile/distinfo	Tue Jun 18 17:04:56 2002
@@ -1 +1 @@
-MD5 (avifile-0.6.0-20011220admin.tgz) = 89c096520c14a68922669dbda0132baa
+MD5 (avifile-0.7.7-20020523.tgz) = cf77a5a4d1a06454f578cd95a1743d65
diff -ruN /usr/ports/graphics/avifile/files/patch-libvideorenderer.cpp avifile/files/patch-libvideorenderer.cpp
--- /usr/ports/graphics/avifile/files/patch-libvideorenderer.cpp	Sat Mar 30 01:56:53 2002
+++ avifile/files/patch-libvideorenderer.cpp	Wed Dec 31 21:00:00 1969
@@ -1,20 +0,0 @@
---- lib/video/renderer.cpp.orig	Sat Jan 19 18:52:21 2002
-+++ lib/video/renderer.cpp	Sat Jan 19 18:53:21 2002
-@@ -1166,7 +1166,7 @@
- 		    cout<<"iconv open error"<<endl;
- 		}
- 		else {
--		    sts = iconv(icvsts, (char **)&sub,&in_size,
-+		    sts = iconv(icvsts, (const char **)&sub,&in_size,
- 					(char **)&out_p,&out_size);
- 		    if (sts == (uint_t)(-1)) {
- 			cout <<"iconv convert error"<<endl;
-@@ -1214,7 +1214,7 @@
- 		        cout<<"iconv open error"<<endl;
- 		    }
- 		    else {
--		        sts = iconv(icvsts, (char **)&sub,&in_size,
-+		        sts = iconv(icvsts, (const char **)&sub,&in_size,
- 					(char **)&out_p,&out_size);
- 		        if (sts == (uint_t)(-1)) {
- 			    cout <<"iconv convert error"<<endl;
diff -ruN /usr/ports/graphics/avifile/pkg-plist avifile/pkg-plist
--- /usr/ports/graphics/avifile/pkg-plist	Sun Mar 31 03:48:48 2002
+++ avifile/pkg-plist	Wed Jun 19 04:44:39 2002
@@ -2,8 +2,7 @@
 bin/avicat
 bin/avifile-config
 bin/avimake
-bin/aviplay
-bin/avirecompress
+%%QT%%bin/aviplay
 bin/avitype
 %%WIN32%%bin/mmxnow-config
 include/avifile/Locker.h
@@ -16,7 +15,6 @@
 include/avifile/avm_map.h
 include/avifile/avm_output.h
 include/avifile/avm_stl.h
-include/avifile/config.h
 include/avifile/configfile.h
 include/avifile/cpuinfo.h
 include/avifile/creators.h
@@ -26,7 +24,7 @@
 include/avifile/fourcc.h
 include/avifile/image.h
 include/avifile/infotypes.h
-include/avifile/mmx.h
+%%WIN32%%include/avifile/mmx.h
 include/avifile/playerwidget.h
 include/avifile/plugin.h
 include/avifile/renderer.h
@@ -35,34 +33,41 @@
 include/avifile/version.h
 include/avifile/videodecoder.h
 include/avifile/videoencoder.h
-%%WIN32%%include/mmxnow.h
-lib/avifile/libac3pass.la
-lib/avifile/libac3pass.so
-lib/avifile/libaudiodec.la
-lib/avifile/libaudiodec.so
-%%FFMPEG%%lib/avifile/libffmpeg.la
-%%FFMPEG%%lib/avifile/libffmpeg.so
-%%MAD%%lib/avifile/libmad_audiodec.la
-%%MAD%%lib/avifile/libmad_audiodec.so
-lib/avifile/libmjpeg.la
-lib/avifile/libmjpeg.so
-lib/avifile/libmp3lame_audioenc.la
-lib/avifile/libmp3lame_audioenc.so
-lib/avifile/libmpeg_audiodec.la
-lib/avifile/libmpeg_audiodec.so
-%%VORBIS%%lib/avifile/libvorbis_audio.la
-%%VORBIS%%lib/avifile/libvorbis_audio.so
-%%WIN32%%lib/avifile/libwin32.la
-%%WIN32%%lib/avifile/libwin32.so
+include/mmxnow.h
+%%AC3_PASS%%lib/avifile/ac3pass.la
+%%AC3_PASS%%lib/avifile/ac3pass.so
+lib/avifile/audiodec.la
+lib/avifile/audiodec.so
+%%FFMPEG%%lib/avifile/ffmpeg.la
+%%FFMPEG%%lib/avifile/ffmpeg.so
+%%MAD%%lib/avifile/mad_audiodec.la
+%%MAD%%lib/avifile/mad_audiodec.so
+lib/avifile/mjpeg.la
+lib/avifile/mjpeg.so
+%%NOLAME%%lib/avifile/mp3lame_audioenc.la
+%%NOLAME%%lib/avifile/mp3lame_audioenc.so
+%%LAME%%lib/avifile/mp3lamebin_audioenc.la
+%%LAME%%lib/avifile/mp3lamebin_audioenc.so
+lib/avifile/mpeg_audiodec.la
+lib/avifile/mpeg_audiodec.so
+%%VORBIS%%lib/avifile/vorbis_audio.la
+%%VORBIS%%lib/avifile/vorbis_audio.so
+%%WIN32%%lib/avifile/win32.la
+%%WIN32%%lib/avifile/win32.so
+%%XVID%%lib/avifile/xvid.la
+%%XVID%%lib/avifile/xvid.so
+lib/libaviplay-0.7.so
+lib/libaviplay-0.7.so.0
 lib/libaviplay.la
 lib/libaviplay.so
-lib/libaviplay.so.6
-lib/libavqt.la
-lib/libavqt.so
-lib/libavqt.so.6
+%%WIN32%%lib/libmmxnow-0.1.so
+%%WIN32%%lib/libmmxnow-0.1.so.0
 %%WIN32%%lib/libmmxnow.la
 %%WIN32%%lib/libmmxnow.so
-%%WIN32%%lib/libmmxnow.so.1
+%%QT%%lib/libqavm-0.7.so
+%%QT%%lib/libqavm-0.7.so.0
+%%QT%%lib/libqavm.la
+%%QT%%lib/libqavm.so
 share/avifile/about.ppm
 share/avifile/mute.ppm
 share/avifile/open.ppm

--liOOAslEiF7prFVr--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020621003216.6604.qmail>