Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Sep 2000 12:23:13 +0200 (CEST)
From:      lamm@evk-koeln.de
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/21347: New port: graphics/avifile
Message-ID:  <m13ay4v-000QqBC@sauerbruch.evk-koeln.de>

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

>Number:         21347
>Category:       ports
>Synopsis:       New port: graphics/avifile
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 18 03:30:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Holger Lamm
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
>Environment:

	

>Description:

avifile is an MPEG-4 (aka DivX) player

>How-To-Repeat:

	

>Fix:
	
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	graphics/avifile
#	graphics/avifile/files
#	graphics/avifile/files/md5
#	graphics/avifile/pkg
#	graphics/avifile/pkg/COMMENT
#	graphics/avifile/pkg/DESCR
#	graphics/avifile/pkg/PLIST
#	graphics/avifile/patches
#	graphics/avifile/patches/patch-aa
#	graphics/avifile/patches/patch-ab
#	graphics/avifile/patches/patch-ac
#	graphics/avifile/patches/patch-ad
#	graphics/avifile/Makefile
#
echo c - graphics/avifile
mkdir -p graphics/avifile > /dev/null 2>&1
echo c - graphics/avifile/files
mkdir -p graphics/avifile/files > /dev/null 2>&1
echo x - graphics/avifile/files/md5
sed 's/^X//' >graphics/avifile/files/md5 << 'END-of-graphics/avifile/files/md5'
XMD5 (avifile-0.47.1.tar.gz) = edbad85f6c72d61f3a66d99c61620f39
XMD5 (binaries.zip) = 6df7c0a266ba6e8c022160605791644b
END-of-graphics/avifile/files/md5
echo c - graphics/avifile/pkg
mkdir -p graphics/avifile/pkg > /dev/null 2>&1
echo x - graphics/avifile/pkg/COMMENT
sed 's/^X//' >graphics/avifile/pkg/COMMENT << 'END-of-graphics/avifile/pkg/COMMENT'
XAn MPEG-4 (DivX) video player
END-of-graphics/avifile/pkg/COMMENT
echo x - graphics/avifile/pkg/DESCR
sed 's/^X//' >graphics/avifile/pkg/DESCR << 'END-of-graphics/avifile/pkg/DESCR'
XAn MPEG-4 (aka DivX) player built around the Windows binaries,
Xbut does not need Wine.
XThere is also a xmps plugin you can build (manually).
END-of-graphics/avifile/pkg/DESCR
echo x - graphics/avifile/pkg/PLIST
sed 's/^X//' >graphics/avifile/pkg/PLIST << 'END-of-graphics/avifile/pkg/PLIST'
Xinclude/avifile/audiodecoder.h
Xinclude/avifile/audioencoder.h
Xinclude/avifile/avifile.h
Xinclude/avifile/avifmt.h
Xinclude/avifile/aviplay.h
Xinclude/avifile/aviutil.h
Xinclude/avifile/config.h
Xinclude/avifile/default.h
Xinclude/avifile/except.h
Xinclude/avifile/loader.h
Xinclude/avifile/registry.h
Xinclude/avifile/videodecoder.h
Xinclude/avifile/videoencoder.h
Xinclude/avifile/wine/basetsd.h
Xinclude/avifile/wine/config.h
Xinclude/avifile/wine/debugtools.h
Xinclude/avifile/wine/driver.h
Xinclude/avifile/wine/elfdll.h
Xinclude/avifile/wine/heap.h
Xinclude/avifile/wine/ldt.h
Xinclude/avifile/wine/mmreg.h
Xinclude/avifile/wine/module.h
Xinclude/avifile/wine/msacm.h
Xinclude/avifile/wine/msacmdrv.h
Xinclude/avifile/wine/ntdef.h
Xinclude/avifile/wine/pe_image.h
Xinclude/avifile/wine/poppack.h
Xinclude/avifile/wine/pshpack1.h
Xinclude/avifile/wine/pshpack2.h
Xinclude/avifile/wine/pshpack4.h
Xinclude/avifile/wine/pshpack8.h
Xinclude/avifile/wine/vfw.h
Xinclude/avifile/wine/winbase.h
Xinclude/avifile/wine/windef.h
Xinclude/avifile/wine/windows.h
Xinclude/avifile/wine/winerror.h
Xinclude/avifile/wine/winestring.h
Xinclude/avifile/wine/winnt.h
Xinclude/avifile/wine/winreg.h
Xinclude/avifile/wine/winuser.h
X@dirrm include/avifile/wine
X@dirrm include/avifile
Xbin/aviplay
Xbin/benchmark
Xshare/avifile/open.ppm
Xshare/avifile/pause.ppm
Xshare/avifile/play.ppm
Xshare/avifile/stop.ppm
Xshare/avifile/test.png
X@dirrm share/avifile
Xlib/win32/ativcr2.dll
Xlib/win32/divxa32.acm
Xlib/win32/divxc32.dll
Xlib/win32/divxc32f.dll
Xlib/win32/i263_32.drv
Xlib/win32/iccvid.dll
Xlib/win32/ir32_32.dll
Xlib/win32/ir41_32.dll
Xlib/win32/ir41_qc.dll
Xlib/win32/ir50_32.dll
Xlib/win32/ir50_qc.dll
Xlib/win32/mpg4c32.dll
X@dirrm lib/win32
Xlib/libaviplay.so
X@exec /sbin/ldconfig -m %D/lib
X@unexec /sbin/ldconfig -R
END-of-graphics/avifile/pkg/PLIST
echo c - graphics/avifile/patches
mkdir -p graphics/avifile/patches > /dev/null 2>&1
echo x - graphics/avifile/patches/patch-aa
sed 's/^X//' >graphics/avifile/patches/patch-aa << 'END-of-graphics/avifile/patches/patch-aa'
X--- configure.orig	Sat Sep 16 11:33:30 2000
X+++ configure	Sat Sep 16 11:43:00 2000
X@@ -2302,7 +2302,7 @@
X 
X 
X USE_QT=1
X-USE_VIDCAP=1
X+USE_VIDCAP=0
X 
X # Check whether --enable-qt or --disable-qt was given.
X if test "${enable_qt+set}" = set; then
X@@ -2631,7 +2631,7 @@
X 
X CXXFLAGS="$CXXFLAGS -I$qt_incdir"
X LDFLAGS="-L$qt_libdir $X_LDFLAGS"
X-LIBS="$LIBS -lqt -lXext -lX11 $LIBSOCKET"
X+LIBS="$LIBS -lqt2 -lXext -lX11 $LIBSOCKET"
X 
X 
X ac_ext=C
X--- player/Makefile.in.orig	Sat Sep 16 11:33:26 2000
X+++ player/Makefile.in	Sat Sep 16 11:43:46 2000
X@@ -7,7 +7,7 @@
X     
X 
X MOC=@MOC@
X-LIBS=@LIBS@ -lX11 -lXext -lqt -laviplay @DGA_LDADD@ @SDL_LIBS@
X+LIBS=@LIBS@ -lX11 -lXext -lqt2 -laviplay @DGA_LDADD@ @SDL_LIBS@
X LIB_DIRS=-L../lib @QT_LDFLAGS@ -L/usr/X11R6/lib -L/usr/local/lib
X CDOPT=@CD_OPT@
X LDOPT=@LD_OPT@
X--- samples/benchmark/Makefile.in.orig	Sat Sep 16 11:33:29 2000
X+++ samples/benchmark/Makefile.in	Sat Sep 16 11:43:27 2000
X@@ -5,7 +5,7 @@
X CFLAGS=-I../../include -I/usr/X11R6/include @QT_INCLUDES@ @SDL_CFLAGS@
X     
X 
X-LIBS=@LIBS@ -lX11 -lXext -lqt -laviplay @DGA_LDADD@ @SDL_LIBS@
X+LIBS=@LIBS@ -lX11 -lXext -lqt2 -laviplay @DGA_LDADD@ @SDL_LIBS@
X LIB_DIRS=@QT_LDFLAGS@ -L/usr/X11R6/lib -L../../lib
X 
X MOC=@MOC@
END-of-graphics/avifile/patches/patch-aa
echo x - graphics/avifile/patches/patch-ab
sed 's/^X//' >graphics/avifile/patches/patch-ab << 'END-of-graphics/avifile/patches/patch-ab'
X--- lib/avifile/AviWrite.cpp.orig	Mon Sep 11 15:40:31 2000
X+++ lib/avifile/AviWrite.cpp	Wed Sep 13 20:52:55 2000
X@@ -19,7 +19,11 @@
X     try
X     {
X         m_status=0;
X+#ifdef O_LARGEFILE
X	m_fd=open(name, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, mask);
X+#else
X+ 	m_fd=open(name, O_WRONLY | O_CREAT | O_TRUNC, mask);
X+#endif
X         if(m_fd==-1)
X 	    throw FATAL("Can't open file for writing");
X 
X@@ -203,7 +207,11 @@
X }
X long long AviWriteFile::FileSize()
X {
X+#ifdef __Linux__
X     return lseek64(m_fd, 0, SEEK_CUR);
X+#else
X+    return lseek(m_fd, 0, SEEK_CUR);
X+#endif
X }
X 
X AviWriteStream::AviWriteStream
X--- lib/videocodec/Module.h.orig	Sat Sep  9 14:24:49 2000
X+++ lib/videocodec/Module.h	Wed Sep 13 20:20:25 2000
X@@ -4,6 +4,10 @@
X #include <videoencoder.h>
X #include <list>
X #include <string>
X+#ifdef __FreeBSD__
X+#include <sys/time.h>
X+#endif
X+
X using namespace std;
X 
X class VideoCodecControl;
X--- player/renderer.cpp.orig	Mon Sep 11 08:38:07 2000
X+++ player/renderer.cpp	Fri Sep 15 20:22:55 2000
X@@ -11,6 +11,7 @@
X #ifdef __FreeBSD__
X #include <machine/param.h>
X #include <sys/types.h>
X+#include <unistd.h>
X #endif
X #include <sys/ipc.h>
X #include <sys/shm.h>                               
X--- lib/aviplay/aviutil.cpp.orig	Sat Sep 16 13:49:08 2000
X+++ lib/aviplay/aviutil.cpp	Sat Sep 16 13:54:06 2000
X@@ -28,16 +28,18 @@
X }
X CPU_Freq::CPU_Freq()
X {
X-	FILE *f = fopen ("/proc/cpuinfo", "r");
X 	char line[200];
X 	char model[200]="unknown";
X 	char flags[500]="";
X 	char	*s,*value;
X 	
X+#ifdef __FreeBSD__
X+	freq=old_freq();
X+	cerr<<freq/1000.<<" MHz processor detected"<<endl;
X+#else
X+	FILE *f = fopen ("/proc/cpuinfo", "r");
X+
X 	freq=-1;
X-//	    freq=old_freq();
X-//	    cerr<<freq/1000.<<" MHz processor detected"<<endl;
X-//	    return;
X 	if (!f)
X 	{
X 	    printf("Can't open /proc/cpuinfo for reading\n");
X@@ -86,6 +88,7 @@
X 	}
X #endif
X 	fclose(f);
X+#endif
X }
X 
X CPU_Freq freq;
END-of-graphics/avifile/patches/patch-ab
echo x - graphics/avifile/patches/patch-ac
sed 's/^X//' >graphics/avifile/patches/patch-ac << 'END-of-graphics/avifile/patches/patch-ac'
X--- xmps-avi-plugin/Makefile.in.orig	Sat Sep 16 14:13:04 2000
X+++ xmps-avi-plugin/Makefile.in	Sat Sep 16 14:20:30 2000
X@@ -1,6 +1,6 @@
X-LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -lpthread @XMPS_LIBS@ 
X+LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -pthread @XMPS_LIBS@ 
X 
X-INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@ 
X+INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@ @SDL_CFLAGS@
X 
X all: avi_configure.o avi_codec.o
X 	 $(CC) -shared avi_configure.o avi_codec.o $(LIBS) -o libavi.so
END-of-graphics/avifile/patches/patch-ac
echo x - graphics/avifile/patches/patch-ad
sed 's/^X//' >graphics/avifile/patches/patch-ad << 'END-of-graphics/avifile/patches/patch-ad'
X--- lib/loader/ext.c.orig	Sat Sep 16 17:02:10 2000
X+++ lib/loader/ext.c	Sat Sep 16 17:02:14 2000
X@@ -7,7 +7,7 @@
X  ********************************************************/
X #include <config.h>
X 
X-#include <malloc.h>
X+#include <stdlib.h>
X #include <unistd.h>
X #include <sys/mman.h>
X #include <errno.h>
X--- lib/loader/win32.c.orig	Sat Sep 16 17:03:28 2000
X+++ lib/loader/win32.c	Sat Sep 16 17:03:30 2000
X@@ -13,7 +13,7 @@
X #include "win32.h"
X #include <stdio.h>
X #include <pthread.h>
X-#include <malloc.h>
X+#include <stdlib.h>
X #include <time.h>
X #include <sys/types.h>
X #include <sys/time.h>
X--- lib/loader/driver.c.orig	Sat Sep 16 17:04:30 2000
X+++ lib/loader/driver.c	Sat Sep 16 17:04:32 2000
X@@ -1,6 +1,6 @@
X #include <config.h>
X #include <stdio.h>
X-#include <malloc.h>
X+#include <stdlib.h>
X #include <wine/driver.h>
X #include <wine/pe_image.h>
X #include <wine/winreg.h>
X--- lib/loader/resource.c.orig	Sat Sep 16 17:07:41 2000
X+++ lib/loader/resource.c	Sat Sep 16 17:08:00 2000
X@@ -253,6 +253,56 @@
X     return RES_SizeofResource( hModule, hRsrc );
X }
X 
X+/**********************************************************************
X+ *	LoadStringW		(USER32.376)
X+ */
X+INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
X+                            LPWSTR buffer, INT buflen )
X+{
X+    HGLOBAL hmem;
X+    HRSRC hrsrc;
X+    WCHAR *p;
X+    int string_num;
X+    int i;
X+
X+    if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
X+	resource_id = (UINT)(-((INT)resource_id));
X+    TRACE("instance = %04x, id = %04x, buffer = %08x, "
X+          "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
X+
X+    /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out 
X+     * 20 - 31. */
X+    hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1),
X+                             RT_STRINGW );
X+    if (!hrsrc) return 0;
X+    hmem = LoadResource( instance, hrsrc );
X+    if (!hmem) return 0;
X+    
X+    p = LockResource(hmem);
X+    string_num = resource_id & 0x000f;
X+    for (i = 0; i < string_num; i++)
X+	p += *p + 1;
X+    
X+    TRACE("strlen = %d\n", (int)*p );
X+    
X+    if (buffer == NULL) return *p;
X+    i = min(buflen - 1, *p);
X+    if (i > 0) {
X+	memcpy(buffer, p + 1, i * sizeof (WCHAR));
X+	buffer[i] = (WCHAR) 0;
X+    } else {
X+	if (buflen > 1) {
X+	    buffer[0] = (WCHAR) 0;
X+	    return 0;
X+	}
X+#if 0
X+	WARN("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
X+#endif
X+    }
X+
X+    TRACE("String loaded !\n");
X+    return i;
X+}
X 
X 
X /**********************************************************************
X@@ -303,57 +353,6 @@
X     HeapFree( GetProcessHeap(), 0, wbuf );
X 
X     return retval;
X-}
X-
X-/**********************************************************************
X- *	LoadStringW		(USER32.376)
X- */
X-INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
X-                            LPWSTR buffer, INT buflen )
X-{
X-    HGLOBAL hmem;
X-    HRSRC hrsrc;
X-    WCHAR *p;
X-    int string_num;
X-    int i;
X-
X-    if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
X-	resource_id = (UINT)(-((INT)resource_id));
X-    TRACE("instance = %04x, id = %04x, buffer = %08x, "
X-          "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
X-
X-    /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out 
X-     * 20 - 31. */
X-    hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1),
X-                             RT_STRINGW );
X-    if (!hrsrc) return 0;
X-    hmem = LoadResource( instance, hrsrc );
X-    if (!hmem) return 0;
X-    
X-    p = LockResource(hmem);
X-    string_num = resource_id & 0x000f;
X-    for (i = 0; i < string_num; i++)
X-	p += *p + 1;
X-    
X-    TRACE("strlen = %d\n", (int)*p );
X-    
X-    if (buffer == NULL) return *p;
X-    i = min(buflen - 1, *p);
X-    if (i > 0) {
X-	memcpy(buffer, p + 1, i * sizeof (WCHAR));
X-	buffer[i] = (WCHAR) 0;
X-    } else {
X-	if (buflen > 1) {
X-	    buffer[0] = (WCHAR) 0;
X-	    return 0;
X-	}
X-#if 0
X-	WARN("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
X-#endif
X-    }
X-
X-    TRACE("String loaded !\n");
X-    return i;
X }
X 
X /* Messages...used by FormatMessage32* (KERNEL32.something)
X--- lib/videocodec/VideoDecoder.cpp.orig	Sat Sep 16 17:11:41 2000
X+++ lib/videocodec/VideoDecoder.cpp	Sat Sep 16 17:16:25 2000
X@@ -20,7 +20,6 @@
X #include <fcntl.h>
X #include <sys/mman.h>
X #include <sys/types.h>
X-#include <malloc.h>
X #include <stdio.h>
X #include <unistd.h>
X #include <strstream>
X--- lib/avifile/Cache.h.orig	Sat Sep 16 17:22:11 2000
X+++ lib/avifile/Cache.h	Sat Sep 16 17:22:14 2000
X@@ -2,7 +2,7 @@
X #include <default.h>
X #define _LARGEFILE64_SOURCE
X #include <unistd.h>
X-#include <malloc.h>
X+#include <stdlib.h>
X #include <string.h>
X #include <stdio.h>
X #include <pthread.h>
X--- lib/avifile/FastReadStream.cpp.orig	Sat Sep 16 17:23:45 2000
X+++ lib/avifile/FastReadStream.cpp	Sat Sep 16 17:23:47 2000
X@@ -8,7 +8,7 @@
X #include <features.h>
X #endif
X #include <unistd.h>
X-#include <malloc.h>
X+#include <stdlib.h>
X 
X #ifdef __FreeBSD__
X #define lseek64 lseek
X--- lib/avifile/AviRead.h.orig	Sat Sep 16 17:25:10 2000
X+++ lib/avifile/AviRead.h	Sat Sep 16 17:25:13 2000
X@@ -10,7 +10,7 @@
X #include <avifmt.h>
X #include <default.h>
X #include <unistd.h>
X-#include <malloc.h>
X+#include <stdlib.h>
X #include <string.h>
X #include <stdio.h>
X #include <pthread.h>
X--- lib/avifile/AviWrite.h.orig	Sat Sep 16 17:26:35 2000
X+++ lib/avifile/AviWrite.h	Sat Sep 16 17:26:37 2000
X@@ -11,7 +11,7 @@
X #include <avifmt.h>
X #include <default.h>
X #include <unistd.h>
X-#include <malloc.h>
X+#include <stdlib.h>
X #include <string.h>
X #include <stdio.h>
X #include <pthread.h>
X--- samples/benchmark/main.cpp.orig	Sat Sep 16 17:28:22 2000
X+++ samples/benchmark/main.cpp	Sat Sep 16 17:28:24 2000
X@@ -9,7 +9,6 @@
X #include <config.h>
X 
X #include <stdio.h>
X-#include <malloc.h>
X #include <signal.h>
X #include <iostream.h>
X #include <unistd.h>
X--- samples/benchmark/renderer.cpp.orig	Sat Sep 16 17:29:28 2000
X+++ samples/benchmark/renderer.cpp	Sat Sep 16 17:29:29 2000
X@@ -14,7 +14,7 @@
X #include <sys/ipc.h>
X #include <sys/shm.h>                               
X 
X-#include <malloc.h>
X+#include <stdlib.h>
X #include <pthread.h>
X #include "renderer.h"
X #include "RegAccess.h"
X--- player/renderer.cpp.orig	Sat Sep 16 22:31:56 2000
X+++ player/renderer.cpp	Sat Sep 16 22:32:02 2000
X@@ -16,7 +16,7 @@
X #include <sys/ipc.h>
X #include <sys/shm.h>                               
X 
X-#include <malloc.h>
X+#include <stdlib.h>
X #include <pthread.h>
X #include "renderer.h"
X #include "RegAccess.h"
END-of-graphics/avifile/patches/patch-ad
echo x - graphics/avifile/Makefile
sed 's/^X//' >graphics/avifile/Makefile << 'END-of-graphics/avifile/Makefile'
X# New ports collection makefile for:   avifile
X# Date created: 	16 September 2000
X# Whom: 		Holger Lamm
X#
X# $FreeBSD$
X#
X
XPORTNAME=	avifile
XPORTVERSION=	0.47.1
XCATEGORIES=	graphics
XMASTER_SITES=	http://divx.euro.ru/
XDISTFILES=	avifile-${PORTVERSION}${EXTRACT_SUFX} binaries.zip
XEXTRACT_ONLY=	avifile-${PORTVERSION}${EXTRACT_SUFX}
X
XMAINTAINER=	holger@eit.uni-kl.de
X
XLIB_DEPENDS=	qt2.4:${PORTSDIR}/x11-toolkits/qt22 \
X		SDL-1.1.2:${PORTSDIR}/devel/sdl-devel
XBUILD_DEPENDS=	unzip:${PORTSDIR}/archivers/unzip
X
XONLY_FOR_ARCHS= i386
XUSE_GMAKE=	yes
XUSE_XLIB=	yes
XHAS_CONFIGURE=	yes
X
XSDL_CONFIG?=	${LOCALBASE}/bin/sdl11-config
XMOC?=		${X11BASE}/bin/moc2
X
XCONFIGURE_ENV=	SDL_CONFIG="${SDL_CONFIG}" \
X		MOC="${MOC}"
XCONFIGURE_ARGS= --enable-mmx \
X		--with-qt-includes=${X11BASE}/include/qt2 \
X		--with-win32-path=${LOCALBASE}/lib/win32
X
Xpre-install:
X		unzip ${DISTDIR}/binaries.zip -d ${LOCALBASE}/lib/win32
X		strip ${WRKSRC}/bin/aviplay ${WRKSRC}/bin/benchmark
X.include <bsd.port.mk>
END-of-graphics/avifile/Makefile
exit


>Release-Note:
>Audit-Trail:
>Unformatted:


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




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