aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/handbrake-gtk2/Makefile53
-rw-r--r--multimedia/handbrake-gtk2/files/ffmpeg-patch56
-rw-r--r--multimedia/handbrake-gtk2/files/patch-Jamfile19
-rw-r--r--multimedia/handbrake-gtk2/files/patch-core_FfmpegEnc.c18
-rw-r--r--multimedia/handbrake-gtk2/files/patch-core_HandBrake.c11
-rw-r--r--multimedia/handbrake-gtk2/files/patch-core_MpgaDec.c11
-rw-r--r--multimedia/handbrake-gtk2/files/patch-core_Scale.c13
-rw-r--r--multimedia/handbrake/Makefile53
-rw-r--r--multimedia/handbrake/files/ffmpeg-patch56
-rw-r--r--multimedia/handbrake/files/patch-Jamfile19
-rw-r--r--multimedia/handbrake/files/patch-core_FfmpegEnc.c18
-rw-r--r--multimedia/handbrake/files/patch-core_HandBrake.c11
-rw-r--r--multimedia/handbrake/files/patch-core_MpgaDec.c11
-rw-r--r--multimedia/handbrake/files/patch-core_Scale.c13
14 files changed, 56 insertions, 306 deletions
diff --git a/multimedia/handbrake-gtk2/Makefile b/multimedia/handbrake-gtk2/Makefile
index 8012a975a15c..95290ce90d08 100644
--- a/multimedia/handbrake-gtk2/Makefile
+++ b/multimedia/handbrake-gtk2/Makefile
@@ -7,12 +7,10 @@
PORTNAME= handbrake
PORTVERSION= 0.6.2
+PORTREVISION= 1
CATEGORIES= multimedia
-MASTER_SITES= http://people.via.ecp.fr/~titer/handbrake/ \
- http://download.videolan.org/pub/videolan/vlc/0.8.1/contrib/:ffmpeg
-DISTFILES= HandBrake-${PORTVERSION}-src${EXTRACT_SUFX} \
- ${FFMPEG_DIST}:ffmpeg
-EXTRACT_ONLY= HandBrake-${PORTVERSION}-src${EXTRACT_SUFX}
+MASTER_SITES= http://people.via.ecp.fr/~titer/handbrake/
+DISTNAME= HandBrake-${PORTVERSION}-src
MAINTAINER= andy@fud.org.nz
COMMENT= A DVD to MPEG-4 ripper and encoder
@@ -20,20 +18,18 @@ COMMENT= A DVD to MPEG-4 ripper and encoder
BUILD_DEPENDS= jam:${PORTSDIR}/devel/jam \
nasm:${PORTSDIR}/devel/nasm
LIB_DEPENDS= a52.0:${PORTSDIR}/audio/liba52 \
+ avcodec.1:${PORTSDIR}/multimedia/ffmpeg \
dvdcss.2:${PORTSDIR}/multimedia/libdvdcss \
dvdread.3:${PORTSDIR}/multimedia/libdvdread \
faac.0:${PORTSDIR}/audio/faac \
mp3lame.0:${PORTSDIR}/audio/lame \
- mp4.0:${PORTSDIR}/multimedia/mpeg4ip \
+ mp4v2.0:${PORTSDIR}/multimedia/mpeg4ip-libmp4v2 \
mpeg2.0:${PORTSDIR}/multimedia/libmpeg2 \
ogg.5:${PORTSDIR}/audio/libogg \
samplerate.1:${PORTSDIR}/audio/libsamplerate \
vorbis.3:${PORTSDIR}/audio/libvorbis \
xvidcore.4:${PORTSDIR}/multimedia/xvid
-FFMPEG_SNAP= 20041113
-FFMPEG_DIST= ffmpeg-${FFMPEG_SNAP}.tar.bz2
-FFMPEG_SRC_DIR= ${WRKDIR}/ffmpeg-${FFMPEG_SNAP}
PLIST_FILES= bin/handbrake
WRKSRC= ${WRKDIR}/HandBrake-${PORTVERSION}
@@ -43,35 +39,16 @@ USE_X_PREFIX= yes
SYSCTL_CMD?= /sbin/sysctl
-FFMPEG_CONFIGURE_ARGS+= --enable-gpl --disable-ffserver \
- --enable-memalign-hack \
- --cc="${CC}" \
- --make="${GMAKE}" \
- --extra-ldflags="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
- --extra-cflags="${CFLAGS} -I${LOCALBASE}/include -I${X11BASE}/include" \
- --extra-libs"-lm" \
- --disable-debug \
- --enable-pp \
- --enable-pthreads \
- --enable-faac \
- --enable-mp3lame \
- --enable-a52 \
- --enable-xvid
-
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
USE_GETOPT_LONG= yes
-MAKE_ENV= EXTRA_LIBS="-lcipher"
+MAKE_ENV= EXTRA_LIBS="-lcipher -lgnugetopt"
WITH_DVD_DEVICE?= acd0c
.else
WITH_DVD_DEVICE?= acd0
.endif
-post-extract:
- cd ${WRKDIR}; ${BZIP2_CMD} ${EXTRACT_BEFORE_ARGS} \
- ${_DISTDIR}/${FFMPEG_DIST} ${EXTRACT_AFTER_ARGS}
-
do-build:
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} jam)
@@ -91,23 +68,5 @@ post-patch:
# sysctl
@${REINPLACE_CMD} -e 's|/usr/sbin/sysctl|${SYSCTL_CMD}|' \
${BUILD_WRKSRC}/core/HandBrake.c
-# ffmpeg
-.if ${OSVERSION} < 502119
- @${REINPLACE_CMD} -e 's|roundf|rintf|' \
- ${FFMPEG_SRC_DIR}/libavcodec/xvidff.c
-.endif
- @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|' \
- -e 's|-Wall||' \
- ${FFMPEG_SRC_DIR}/configure
- cd ${FFMPEG_SRC_DIR} && \
- ${PATCH} -p0 < ${PATCHDIR}/ffmpeg-patch
-
-pre-configure:
- cd ${FFMPEG_SRC_DIR} \
- && ${SETENV} ${SCRIPTS_ENV} ${CONFIGURE_ENV} \
- ${SH} ./configure ${CONFIGURE_ARGS} ${FFMPEG_CONFIGURE_ARGS}
- cd ${FFMPEG_SRC_DIR}/libavcodec \
- && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} Makefile \
- ${MAKE_ARGS} all
.include <bsd.port.post.mk>
diff --git a/multimedia/handbrake-gtk2/files/ffmpeg-patch b/multimedia/handbrake-gtk2/files/ffmpeg-patch
deleted file mode 100644
index 2a4b7280ae5e..000000000000
--- a/multimedia/handbrake-gtk2/files/ffmpeg-patch
+++ /dev/null
@@ -1,56 +0,0 @@
---- libavcodec/liba52/resample_mmx.c 2004/05/01 14:38:45 1.1
-+++ libavcodec/liba52/resample_mmx.c 2004/05/01 14:58:39
-@@ -7,10 +7,10 @@
- and it would mean (C / MMX2 / MMX / 3DNOW) versions
- */
-
--static uint64_t __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL;
--static uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL;
--static uint64_t __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL;
--static uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL;
-+static uint64_t __attribute__((used)) __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL;
-+static uint64_t __attribute__((used)) __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL;
-+static uint64_t __attribute__((used)) __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL;
-+static uint64_t __attribute__((used)) __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL;
-
- static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){
- int32_t * f = (int32_t *) _f;
-
---- Makefile.orig Fri Oct 22 04:08:47 2004
-+++ Makefile Fri Oct 22 04:12:43 2004
-@@ -81,28 +81,29 @@
- all: lib $(PROG) $(PROGTEST) $(VHOOK) $(QTFASTSTART) $(DOC)
-
- lib:
-- $(MAKE) -C libavcodec all
-- $(MAKE) -C libavformat all
-+ $(MAKE) LDFLAGS="$(LDFLAGS)" -C libavcodec all
-+ $(MAKE) LDFLAGS="$(LDFLAGS)" -C libavformat all
-+
-
- ffmpeg_g$(EXESUF): ffmpeg.o cmdutils.o .libs
-- $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(FFLIBS) $(EXTRALIBS)
-+ $(CC) $(FFLIBS) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(EXTRALIBS)
-
- ffmpeg$(EXESUF): ffmpeg_g$(EXESUF)
- cp -p $< $@
- $(STRIP) $@
-
- ffserver$(EXESUF): ffserver.o .libs
-- $(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS)
-+ $(CC) $(FFLIBS) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(EXTRALIBS)
-
- ffplay_g$(EXESUF): ffplay.o cmdutils.o .libs
-- $(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(FFLIBS) $(EXTRALIBS) $(SDL_LIBS)
-+ $(CC) $(FFLIBS) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(FFLIBS) $(EXTRALIBS) $(SDL_LIBS)
-
- ffplay$(EXESUF): ffplay_g$(EXESUF)
- cp -p $< $@
- $(STRIP) $@
-
- output_example$(EXESUF): output_example.o .libs
-- $(CC) $(LDFLAGS) -o $@ output_example.o $(FFLIBS) $(EXTRALIBS)
-+ $(CC) $(FFLIBS) $(LDFLAGS) -o $@ output_example.o $(EXTRALIBS)
-
- qt-faststart$(EXESUF): qt-faststart.c
- $(CC) qt-faststart.c -o qt-faststart$(EXESUF)
diff --git a/multimedia/handbrake-gtk2/files/patch-Jamfile b/multimedia/handbrake-gtk2/files/patch-Jamfile
index beb1759b08a5..49153375b27e 100644
--- a/multimedia/handbrake-gtk2/files/patch-Jamfile
+++ b/multimedia/handbrake-gtk2/files/patch-Jamfile
@@ -1,20 +1,21 @@
--- Jamfile.orig Wed May 26 05:51:32 2004
-+++ Jamfile Mon Nov 22 20:29:09 2004
-@@ -54,6 +54,20 @@
++++ Jamfile Sun Dec 19 11:14:57 2004
+@@ -54,6 +54,21 @@
ObjectCcFlags $(GTK2_SRC) : `pkg-config gtk+-2.0 --cflags` ;
Main $(GTK2_BIN) : $(GTK2_SRC) ;
}
+if $(OS) = FREEBSD
+{
+ HB_LIBS = libhb.a libx264.a ;
-+ SystemLibraries $(TEST_BIN) : %%LIBAVCODEC%%/libavcodec.a
-+ -L%%PREFIX%%/lib %%PTHREAD_LIBS%% -la52
++ SystemLibraries $(TEST_BIN) : -L%%PREFIX%%/lib %%PTHREAD_LIBS%% -la52
++ -lavcodec -ldvdcss -ldvdread -lfaac -lmp3lame -lmp4v2 -lmpeg2
++ -logg -lsamplerate -lvorbis -lvorbisenc -lxvidcore
++ $(EXTRA_LIBS) ;
++ SystemLibraries $(GTK2_BIN) : -L%%PREFIX%%/lib %%PTHREAD_LIBS%%
++ $(EXTRA_LIBS) `pkg-config gtk+-2.0 --libs` -la52 -lavcodec
+ -ldvdcss -ldvdread -lfaac -lmp3lame -lmp4v2 -lmpeg2 -logg
-+ -lsamplerate -lvorbis -lvorbisenc -lxvidcore $(EXTRA_LIBS) ;
-+ SystemLibraries $(GTK2_BIN) : %%LIBAVCODEC%%/libavcodec.a
-+ -L%%PREFIX%%/lib %%PTHREAD_LIBS%% $(EXTRA_LIBS) `pkg-config gtk+-2.0 --libs`
-+ -la52 -ldvdcss -ldvdread -lfaac -lmp3lame -lmp4v2
-+ -lmpeg2 -logg -lsamplerate -lvorbis -lvorbisenc -lxvidcore ;
++ -lsamplerate -lvorbis -lvorbisenc -lxvidcore ;
++ ObjectCcFlags $(TEST_SRC) : -I%%PREFIX%%/include ;
+ ObjectCcFlags $(GTK2_SRC) : `pkg-config gtk+-2.0 --cflags` ;
+ Main $(GTK2_BIN) : $(GTK2_SRC) ;
+}
diff --git a/multimedia/handbrake-gtk2/files/patch-core_FfmpegEnc.c b/multimedia/handbrake-gtk2/files/patch-core_FfmpegEnc.c
index 09e2a7af55b0..f1a61bebebb6 100644
--- a/multimedia/handbrake-gtk2/files/patch-core_FfmpegEnc.c
+++ b/multimedia/handbrake-gtk2/files/patch-core_FfmpegEnc.c
@@ -1,11 +1,11 @@
---- core/FfmpegEnc.c.orig Mon Nov 22 21:55:47 2004
-+++ core/FfmpegEnc.c Mon Nov 22 21:28:42 2004
-@@ -7,7 +7,7 @@
- #include "HBInternal.h"
+--- core/FfmpegEnc.c.orig Sun Dec 19 11:16:49 2004
++++ core/FfmpegEnc.c Sun Dec 19 11:16:58 2004
+@@ -132,7 +132,7 @@
+ }
- /* libavcodec */
--#include "ffmpeg/avcodec.h"
-+#include "avcodec.h"
+ HBBufferClose( &scaledBuffer );
+- free( frame );
++ av_free( frame );
- struct HBWork
- {
+ return 1;
+ }
diff --git a/multimedia/handbrake-gtk2/files/patch-core_HandBrake.c b/multimedia/handbrake-gtk2/files/patch-core_HandBrake.c
index 367fb978f25d..1c77b0015cd9 100644
--- a/multimedia/handbrake-gtk2/files/patch-core_HandBrake.c
+++ b/multimedia/handbrake-gtk2/files/patch-core_HandBrake.c
@@ -1,14 +1,5 @@
--- core/HandBrake.c.orig Wed May 26 05:51:32 2004
-+++ core/HandBrake.c Mon Nov 22 21:57:36 2004
-@@ -7,7 +7,7 @@
- #include "HBInternal.h"
-
- /* libavcodec */
--#include "ffmpeg/avcodec.h"
-+#include "avcodec.h"
-
- /* Local prototypes */
- static void HandBrakeThread( void * );
++++ core/HandBrake.c Sun Dec 19 11:02:32 2004
@@ -277,7 +277,8 @@
img_resample_full_init( t->outWidth, t->outHeight,
t->inWidth, t->inHeight,
diff --git a/multimedia/handbrake-gtk2/files/patch-core_MpgaDec.c b/multimedia/handbrake-gtk2/files/patch-core_MpgaDec.c
deleted file mode 100644
index 7c0501c01011..000000000000
--- a/multimedia/handbrake-gtk2/files/patch-core_MpgaDec.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- core/MpgaDec.c.orig Mon Nov 22 21:58:23 2004
-+++ core/MpgaDec.c Mon Nov 22 21:28:54 2004
-@@ -6,7 +6,7 @@
-
- #include "HBInternal.h"
-
--#include "ffmpeg/avcodec.h"
-+#include "avcodec.h"
-
- struct HBWork
- {
diff --git a/multimedia/handbrake-gtk2/files/patch-core_Scale.c b/multimedia/handbrake-gtk2/files/patch-core_Scale.c
index 56de0cc6dda8..d0d33d091703 100644
--- a/multimedia/handbrake-gtk2/files/patch-core_Scale.c
+++ b/multimedia/handbrake-gtk2/files/patch-core_Scale.c
@@ -1,14 +1,5 @@
---- core/Scale.c.orig Mon Nov 22 21:59:25 2004
-+++ core/Scale.c Mon Nov 22 21:59:48 2004
-@@ -6,7 +6,7 @@
-
- #include "HBInternal.h"
-
--#include "ffmpeg/avcodec.h"
-+#include "avcodec.h"
-
- struct HBWork
- {
+--- core/Scale.c.orig Wed May 26 05:51:32 2004
++++ core/Scale.c Sun Dec 19 11:02:44 2004
@@ -52,7 +52,8 @@
img_resample_full_init( title->outWidth, title->outHeight,
title->inWidth, title->inHeight,
diff --git a/multimedia/handbrake/Makefile b/multimedia/handbrake/Makefile
index 8012a975a15c..95290ce90d08 100644
--- a/multimedia/handbrake/Makefile
+++ b/multimedia/handbrake/Makefile
@@ -7,12 +7,10 @@
PORTNAME= handbrake
PORTVERSION= 0.6.2
+PORTREVISION= 1
CATEGORIES= multimedia
-MASTER_SITES= http://people.via.ecp.fr/~titer/handbrake/ \
- http://download.videolan.org/pub/videolan/vlc/0.8.1/contrib/:ffmpeg
-DISTFILES= HandBrake-${PORTVERSION}-src${EXTRACT_SUFX} \
- ${FFMPEG_DIST}:ffmpeg
-EXTRACT_ONLY= HandBrake-${PORTVERSION}-src${EXTRACT_SUFX}
+MASTER_SITES= http://people.via.ecp.fr/~titer/handbrake/
+DISTNAME= HandBrake-${PORTVERSION}-src
MAINTAINER= andy@fud.org.nz
COMMENT= A DVD to MPEG-4 ripper and encoder
@@ -20,20 +18,18 @@ COMMENT= A DVD to MPEG-4 ripper and encoder
BUILD_DEPENDS= jam:${PORTSDIR}/devel/jam \
nasm:${PORTSDIR}/devel/nasm
LIB_DEPENDS= a52.0:${PORTSDIR}/audio/liba52 \
+ avcodec.1:${PORTSDIR}/multimedia/ffmpeg \
dvdcss.2:${PORTSDIR}/multimedia/libdvdcss \
dvdread.3:${PORTSDIR}/multimedia/libdvdread \
faac.0:${PORTSDIR}/audio/faac \
mp3lame.0:${PORTSDIR}/audio/lame \
- mp4.0:${PORTSDIR}/multimedia/mpeg4ip \
+ mp4v2.0:${PORTSDIR}/multimedia/mpeg4ip-libmp4v2 \
mpeg2.0:${PORTSDIR}/multimedia/libmpeg2 \
ogg.5:${PORTSDIR}/audio/libogg \
samplerate.1:${PORTSDIR}/audio/libsamplerate \
vorbis.3:${PORTSDIR}/audio/libvorbis \
xvidcore.4:${PORTSDIR}/multimedia/xvid
-FFMPEG_SNAP= 20041113
-FFMPEG_DIST= ffmpeg-${FFMPEG_SNAP}.tar.bz2
-FFMPEG_SRC_DIR= ${WRKDIR}/ffmpeg-${FFMPEG_SNAP}
PLIST_FILES= bin/handbrake
WRKSRC= ${WRKDIR}/HandBrake-${PORTVERSION}
@@ -43,35 +39,16 @@ USE_X_PREFIX= yes
SYSCTL_CMD?= /sbin/sysctl
-FFMPEG_CONFIGURE_ARGS+= --enable-gpl --disable-ffserver \
- --enable-memalign-hack \
- --cc="${CC}" \
- --make="${GMAKE}" \
- --extra-ldflags="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
- --extra-cflags="${CFLAGS} -I${LOCALBASE}/include -I${X11BASE}/include" \
- --extra-libs"-lm" \
- --disable-debug \
- --enable-pp \
- --enable-pthreads \
- --enable-faac \
- --enable-mp3lame \
- --enable-a52 \
- --enable-xvid
-
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
USE_GETOPT_LONG= yes
-MAKE_ENV= EXTRA_LIBS="-lcipher"
+MAKE_ENV= EXTRA_LIBS="-lcipher -lgnugetopt"
WITH_DVD_DEVICE?= acd0c
.else
WITH_DVD_DEVICE?= acd0
.endif
-post-extract:
- cd ${WRKDIR}; ${BZIP2_CMD} ${EXTRACT_BEFORE_ARGS} \
- ${_DISTDIR}/${FFMPEG_DIST} ${EXTRACT_AFTER_ARGS}
-
do-build:
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} jam)
@@ -91,23 +68,5 @@ post-patch:
# sysctl
@${REINPLACE_CMD} -e 's|/usr/sbin/sysctl|${SYSCTL_CMD}|' \
${BUILD_WRKSRC}/core/HandBrake.c
-# ffmpeg
-.if ${OSVERSION} < 502119
- @${REINPLACE_CMD} -e 's|roundf|rintf|' \
- ${FFMPEG_SRC_DIR}/libavcodec/xvidff.c
-.endif
- @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|' \
- -e 's|-Wall||' \
- ${FFMPEG_SRC_DIR}/configure
- cd ${FFMPEG_SRC_DIR} && \
- ${PATCH} -p0 < ${PATCHDIR}/ffmpeg-patch
-
-pre-configure:
- cd ${FFMPEG_SRC_DIR} \
- && ${SETENV} ${SCRIPTS_ENV} ${CONFIGURE_ENV} \
- ${SH} ./configure ${CONFIGURE_ARGS} ${FFMPEG_CONFIGURE_ARGS}
- cd ${FFMPEG_SRC_DIR}/libavcodec \
- && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} Makefile \
- ${MAKE_ARGS} all
.include <bsd.port.post.mk>
diff --git a/multimedia/handbrake/files/ffmpeg-patch b/multimedia/handbrake/files/ffmpeg-patch
deleted file mode 100644
index 2a4b7280ae5e..000000000000
--- a/multimedia/handbrake/files/ffmpeg-patch
+++ /dev/null
@@ -1,56 +0,0 @@
---- libavcodec/liba52/resample_mmx.c 2004/05/01 14:38:45 1.1
-+++ libavcodec/liba52/resample_mmx.c 2004/05/01 14:58:39
-@@ -7,10 +7,10 @@
- and it would mean (C / MMX2 / MMX / 3DNOW) versions
- */
-
--static uint64_t __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL;
--static uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL;
--static uint64_t __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL;
--static uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL;
-+static uint64_t __attribute__((used)) __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL;
-+static uint64_t __attribute__((used)) __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL;
-+static uint64_t __attribute__((used)) __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL;
-+static uint64_t __attribute__((used)) __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL;
-
- static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){
- int32_t * f = (int32_t *) _f;
-
---- Makefile.orig Fri Oct 22 04:08:47 2004
-+++ Makefile Fri Oct 22 04:12:43 2004
-@@ -81,28 +81,29 @@
- all: lib $(PROG) $(PROGTEST) $(VHOOK) $(QTFASTSTART) $(DOC)
-
- lib:
-- $(MAKE) -C libavcodec all
-- $(MAKE) -C libavformat all
-+ $(MAKE) LDFLAGS="$(LDFLAGS)" -C libavcodec all
-+ $(MAKE) LDFLAGS="$(LDFLAGS)" -C libavformat all
-+
-
- ffmpeg_g$(EXESUF): ffmpeg.o cmdutils.o .libs
-- $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(FFLIBS) $(EXTRALIBS)
-+ $(CC) $(FFLIBS) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(EXTRALIBS)
-
- ffmpeg$(EXESUF): ffmpeg_g$(EXESUF)
- cp -p $< $@
- $(STRIP) $@
-
- ffserver$(EXESUF): ffserver.o .libs
-- $(CC) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(FFLIBS) $(EXTRALIBS)
-+ $(CC) $(FFLIBS) $(LDFLAGS) $(FFSLDFLAGS) -o $@ ffserver.o $(EXTRALIBS)
-
- ffplay_g$(EXESUF): ffplay.o cmdutils.o .libs
-- $(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(FFLIBS) $(EXTRALIBS) $(SDL_LIBS)
-+ $(CC) $(FFLIBS) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(FFLIBS) $(EXTRALIBS) $(SDL_LIBS)
-
- ffplay$(EXESUF): ffplay_g$(EXESUF)
- cp -p $< $@
- $(STRIP) $@
-
- output_example$(EXESUF): output_example.o .libs
-- $(CC) $(LDFLAGS) -o $@ output_example.o $(FFLIBS) $(EXTRALIBS)
-+ $(CC) $(FFLIBS) $(LDFLAGS) -o $@ output_example.o $(EXTRALIBS)
-
- qt-faststart$(EXESUF): qt-faststart.c
- $(CC) qt-faststart.c -o qt-faststart$(EXESUF)
diff --git a/multimedia/handbrake/files/patch-Jamfile b/multimedia/handbrake/files/patch-Jamfile
index beb1759b08a5..49153375b27e 100644
--- a/multimedia/handbrake/files/patch-Jamfile
+++ b/multimedia/handbrake/files/patch-Jamfile
@@ -1,20 +1,21 @@
--- Jamfile.orig Wed May 26 05:51:32 2004
-+++ Jamfile Mon Nov 22 20:29:09 2004
-@@ -54,6 +54,20 @@
++++ Jamfile Sun Dec 19 11:14:57 2004
+@@ -54,6 +54,21 @@
ObjectCcFlags $(GTK2_SRC) : `pkg-config gtk+-2.0 --cflags` ;
Main $(GTK2_BIN) : $(GTK2_SRC) ;
}
+if $(OS) = FREEBSD
+{
+ HB_LIBS = libhb.a libx264.a ;
-+ SystemLibraries $(TEST_BIN) : %%LIBAVCODEC%%/libavcodec.a
-+ -L%%PREFIX%%/lib %%PTHREAD_LIBS%% -la52
++ SystemLibraries $(TEST_BIN) : -L%%PREFIX%%/lib %%PTHREAD_LIBS%% -la52
++ -lavcodec -ldvdcss -ldvdread -lfaac -lmp3lame -lmp4v2 -lmpeg2
++ -logg -lsamplerate -lvorbis -lvorbisenc -lxvidcore
++ $(EXTRA_LIBS) ;
++ SystemLibraries $(GTK2_BIN) : -L%%PREFIX%%/lib %%PTHREAD_LIBS%%
++ $(EXTRA_LIBS) `pkg-config gtk+-2.0 --libs` -la52 -lavcodec
+ -ldvdcss -ldvdread -lfaac -lmp3lame -lmp4v2 -lmpeg2 -logg
-+ -lsamplerate -lvorbis -lvorbisenc -lxvidcore $(EXTRA_LIBS) ;
-+ SystemLibraries $(GTK2_BIN) : %%LIBAVCODEC%%/libavcodec.a
-+ -L%%PREFIX%%/lib %%PTHREAD_LIBS%% $(EXTRA_LIBS) `pkg-config gtk+-2.0 --libs`
-+ -la52 -ldvdcss -ldvdread -lfaac -lmp3lame -lmp4v2
-+ -lmpeg2 -logg -lsamplerate -lvorbis -lvorbisenc -lxvidcore ;
++ -lsamplerate -lvorbis -lvorbisenc -lxvidcore ;
++ ObjectCcFlags $(TEST_SRC) : -I%%PREFIX%%/include ;
+ ObjectCcFlags $(GTK2_SRC) : `pkg-config gtk+-2.0 --cflags` ;
+ Main $(GTK2_BIN) : $(GTK2_SRC) ;
+}
diff --git a/multimedia/handbrake/files/patch-core_FfmpegEnc.c b/multimedia/handbrake/files/patch-core_FfmpegEnc.c
index 09e2a7af55b0..f1a61bebebb6 100644
--- a/multimedia/handbrake/files/patch-core_FfmpegEnc.c
+++ b/multimedia/handbrake/files/patch-core_FfmpegEnc.c
@@ -1,11 +1,11 @@
---- core/FfmpegEnc.c.orig Mon Nov 22 21:55:47 2004
-+++ core/FfmpegEnc.c Mon Nov 22 21:28:42 2004
-@@ -7,7 +7,7 @@
- #include "HBInternal.h"
+--- core/FfmpegEnc.c.orig Sun Dec 19 11:16:49 2004
++++ core/FfmpegEnc.c Sun Dec 19 11:16:58 2004
+@@ -132,7 +132,7 @@
+ }
- /* libavcodec */
--#include "ffmpeg/avcodec.h"
-+#include "avcodec.h"
+ HBBufferClose( &scaledBuffer );
+- free( frame );
++ av_free( frame );
- struct HBWork
- {
+ return 1;
+ }
diff --git a/multimedia/handbrake/files/patch-core_HandBrake.c b/multimedia/handbrake/files/patch-core_HandBrake.c
index 367fb978f25d..1c77b0015cd9 100644
--- a/multimedia/handbrake/files/patch-core_HandBrake.c
+++ b/multimedia/handbrake/files/patch-core_HandBrake.c
@@ -1,14 +1,5 @@
--- core/HandBrake.c.orig Wed May 26 05:51:32 2004
-+++ core/HandBrake.c Mon Nov 22 21:57:36 2004
-@@ -7,7 +7,7 @@
- #include "HBInternal.h"
-
- /* libavcodec */
--#include "ffmpeg/avcodec.h"
-+#include "avcodec.h"
-
- /* Local prototypes */
- static void HandBrakeThread( void * );
++++ core/HandBrake.c Sun Dec 19 11:02:32 2004
@@ -277,7 +277,8 @@
img_resample_full_init( t->outWidth, t->outHeight,
t->inWidth, t->inHeight,
diff --git a/multimedia/handbrake/files/patch-core_MpgaDec.c b/multimedia/handbrake/files/patch-core_MpgaDec.c
deleted file mode 100644
index 7c0501c01011..000000000000
--- a/multimedia/handbrake/files/patch-core_MpgaDec.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- core/MpgaDec.c.orig Mon Nov 22 21:58:23 2004
-+++ core/MpgaDec.c Mon Nov 22 21:28:54 2004
-@@ -6,7 +6,7 @@
-
- #include "HBInternal.h"
-
--#include "ffmpeg/avcodec.h"
-+#include "avcodec.h"
-
- struct HBWork
- {
diff --git a/multimedia/handbrake/files/patch-core_Scale.c b/multimedia/handbrake/files/patch-core_Scale.c
index 56de0cc6dda8..d0d33d091703 100644
--- a/multimedia/handbrake/files/patch-core_Scale.c
+++ b/multimedia/handbrake/files/patch-core_Scale.c
@@ -1,14 +1,5 @@
---- core/Scale.c.orig Mon Nov 22 21:59:25 2004
-+++ core/Scale.c Mon Nov 22 21:59:48 2004
-@@ -6,7 +6,7 @@
-
- #include "HBInternal.h"
-
--#include "ffmpeg/avcodec.h"
-+#include "avcodec.h"
-
- struct HBWork
- {
+--- core/Scale.c.orig Wed May 26 05:51:32 2004
++++ core/Scale.c Sun Dec 19 11:02:44 2004
@@ -52,7 +52,8 @@
img_resample_full_init( title->outWidth, title->outHeight,
title->inWidth, title->inHeight,