View | Details | Raw Unified | Return to bug 118458
Collapse All | Expand All

(-)handbrake/Makefile (-45 / +62 lines)
Lines 5-68 Link Here
5
# $FreeBSD: ports/multimedia/handbrake/Makefile,v 1.20 2007/10/04 02:01:27 edwin Exp $
5
# $FreeBSD: ports/multimedia/handbrake/Makefile,v 1.20 2007/10/04 02:01:27 edwin Exp $
6
#
6
#
7
7
8
PORTNAME=	handbrake
8
PORTNAME=				handbrake
9
PORTVERSION=	0.7.1
9
PORTVERSION=		0.9.1
10
PORTREVISION=	5
10
CATEGORIES=			multimedia
11
CATEGORIES=	multimedia
11
MASTER_SITES=		http://saintdevelopment.com/mirror/handbrake/:main \
12
MASTER_SITES=	http://download.m0k.org/${PORTNAME}/ \
12
								http://junk.phantomgorilla.com/hb/:main \
13
		http://www.mirrors.ausmac.net/ftp/AudioVisual-SW/HandBrake/ \
13
								http://daigertech.com/handbrake/:main \
14
		http://apple.doit.wisc.edu/mirrors/ausmac/Audio-SW/HandBrake/
14
								http://www.mirrors.ausmac.net/ftp/Audio-SW/HandBrake/testing/:main \
15
DISTNAME=	HandBrake-${PORTVERSION}
15
								http://asshatandi.com/:main \
16
								http://download.m0k.org/handbrake/testing/:main \
17
								http://download.m0k.org/handbrake/contrib/:contrib
18
DISTFILES=    HandBrake-${PORTVERSION}.tar.gz:main \
19
							faac-1.24.tar.gz:contrib \
20
							lame-3.96.1.tar.gz:contrib \
21
							libdca-r81-strapped.tar.gz:contrib \
22
							libdvdcss-1.2.9.tar.gz:contrib \
23
							libdvdread-0.9.7.tar.gz:contrib \
24
							libmkv-0.6.1.2.tar.gz:contrib \
25
							libogg-1.1.2.tar.gz:contrib \
26
							libvorbis-aotuv_b5.tar.gz:contrib \
27
							mpeg2dec-0.4.1.tar.gz:contrib \
28
							mpeg4ip-1.3.tar.gz:contrib \
29
							xvidcore-1.1.2.tar.gz:contrib \
30
							ffmpeg-9816.tar.gz:contrib \
31
							x264-r665.tar.gz:contrib \
32
							a52dec-0.7.4.tar.gz:contrib \
33
							libsamplerate-0.1.2.tar.gz:contrib
34
DIST_SUBDIR=	handbrake
16
35
17
MAINTAINER=	multimedia@FreeBSD.org
36
MAINTAINER=	multimedia@FreeBSD.org
18
COMMENT=	A DVD to MPEG-4 ripper and encoder
37
COMMENT=	A DVD to MPEG-4 ripper and encoder
19
38
20
BUILD_DEPENDS=	jam:${PORTSDIR}/devel/jam
39
BUILD_DEPENDS=	jam:${PORTSDIR}/devel/jam
21
LIB_DEPENDS=	a52.0:${PORTSDIR}/audio/liba52 \
22
		dvdcss.2:${PORTSDIR}/multimedia/libdvdcss \
23
		dvdread.5:${PORTSDIR}/multimedia/libdvdread \
24
		faac.0:${PORTSDIR}/audio/faac \
25
		mp3lame.0:${PORTSDIR}/audio/lame \
26
		mp4v2.0:${PORTSDIR}/multimedia/mpeg4ip-libmp4v2 \
27
		mpeg2.0:${PORTSDIR}/multimedia/libmpeg2 \
28
		ogg.5:${PORTSDIR}/audio/libogg \
29
		samplerate.1:${PORTSDIR}/audio/libsamplerate \
30
		vorbis.4:${PORTSDIR}/audio/libvorbis \
31
		xvidcore.4:${PORTSDIR}/multimedia/xvid \
32
		x264.50:${PORTSDIR}/multimedia/x264 \
33
		avcodec.1:${PORTSDIR}/multimedia/ffmpeg
34
40
35
BROKEN=		Does not compile
41
USE_GMAKE=	yes
36
37
WRKSRC=		${WRKDIR}/HandBrake-${PORTVERSION}
38
HAS_CONFIGURE=	yes
42
HAS_CONFIGURE=	yes
43
44
WRKSRC=		${WRKDIR}/HandBrake
39
PLIST_FILES=	bin/handbrake
45
PLIST_FILES=	bin/handbrake
40
46
41
JAM?=		${LOCALBASE}/bin/jam
47
JAM?=		${LOCALBASE}/bin/jam
42
SYSCTL_CMD?=	/sbin/sysctl
48
APPLY?=	/usr/bin/apply
43
WITH_DVD_DEVICE?=	acd0
49
50
.include <bsd.port.pre.mk>
44
51
45
EXTRACT_AFTER_ARGS=	| ${TAR} -xf - --exclude beos \
52
# nasm/yasm needed by x264
46
			--exclude contrib \
53
.if ${ARCH}=="i386"
47
			--exclude gtk2 \
54
BUILD_DEPENDS+=	nasm:${PORTSDIR}/devel/nasm
48
			--exclude macosx \
55
.else
49
			--exclude wx
56
BUILD_DEPENDS+=	yasm>=0.6.0:${PORTSDIR}/devel/yasm
50
57
.endif
51
post-patch:
58
52
	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g ; \
59
MAKE_ENV+=	ARCH=${ARCH} MAKE=${GMAKE}
53
		s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g ; s|HBTest|${PORTNAME}|g' \
60
54
			${WRKSRC}/configure ${WRKSRC}/Jamfile \
61
pre-patch:
55
			${WRKSRC}/libhb/Jamfile ${WRKSRC}/test/test.c
62
	@${APPLY} "${MV} %1 ${WRKSRC}/contrib/" \
56
	@${REINPLACE_CMD} -e 's|/usr/sbin/sysctl|${SYSCTL_CMD}|g' \
63
		${WRKDIR}/a52dec \
57
		${WRKSRC}/libhb/ports.c
64
		${WRKDIR}/faac \
58
	@${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|g' \
65
		${WRKDIR}/ffmpeg \
59
		${WRKSRC}/libhb/fifo.c
66
		${WRKDIR}/lame \
67
		${WRKDIR}/libdca \
68
		${WRKDIR}/libdvdcss \
69
		${WRKDIR}/libdvdread \
70
		${WRKDIR}/libmkv \
71
		${WRKDIR}/libogg \
72
		${WRKDIR}/libsamplerate \
73
		${WRKDIR}/libvorbis \
74
		${WRKDIR}/mpeg2dec \
75
		${WRKDIR}/mpeg4ip \
76
		${WRKDIR}/x264 \
77
		${WRKDIR}/xvidcore
60
78
61
# jam -dx, it will giving a verbose of build.
62
do-build:
79
do-build:
63
	@(cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${JAM} -dx)
80
	@(cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${JAM})
64
81
65
do-install:
82
do-install:
66
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/
83
	${INSTALL_PROGRAM} ${WRKSRC}/HandBrakeCLI ${PREFIX}/bin/handbrake
67
84
68
.include <bsd.port.mk>
85
.include <bsd.port.post.mk>
(-)handbrake/distinfo (-3 / +48 lines)
Lines 1-3 Link Here
1
MD5 (HandBrake-0.7.1.tar.gz) = 0053ebfa950959286024333b4964907e
1
MD5 (handbrake/HandBrake-0.9.1.tar.gz) = 0eefe9189d59a0bfd9aeee41fd3d01a2
2
SHA256 (HandBrake-0.7.1.tar.gz) = 6f42e31bc882cbefc8bda4584faa42f6382108b0574ef62ce5b94898d2846042
2
SHA256 (handbrake/HandBrake-0.9.1.tar.gz) = ae29b03dfd9724d7856f8b44a5a52bc60ad0af2846efe7db302d90dccc57d54b
3
SIZE (HandBrake-0.7.1.tar.gz) = 254694
3
SIZE (handbrake/HandBrake-0.9.1.tar.gz) = 1160277
4
MD5 (handbrake/faac-1.24.tar.gz) = 81dc3efd98f1f2da0ac8bfa315284e95
5
SHA256 (handbrake/faac-1.24.tar.gz) = 8eda7b69669f9d57c114d740555eb8bab29e4add90fade1aed41dd2ac1d19df6
6
SIZE (handbrake/faac-1.24.tar.gz) = 627837
7
MD5 (handbrake/lame-3.96.1.tar.gz) = 9a38f646c2b32c4ef50b4f19b0bafcae
8
SHA256 (handbrake/lame-3.96.1.tar.gz) = 93091a5b9342d587a2e97571559ac4cdfbe4a67ec046d7f079d2a0849454e45d
9
SIZE (handbrake/lame-3.96.1.tar.gz) = 1262685
10
MD5 (handbrake/libdca-r81-strapped.tar.gz) = 448bab6df6e4f738e4afaa6ebc085d65
11
SHA256 (handbrake/libdca-r81-strapped.tar.gz) = ab2519af6c2f12411a2bd674b83615af9b0d5fb09f28ad5dab714ea1bfab9df1
12
SIZE (handbrake/libdca-r81-strapped.tar.gz) = 523282
13
MD5 (handbrake/libdvdcss-1.2.9.tar.gz) = 3d15875225e8738e9a8300bede32fbab
14
SHA256 (handbrake/libdvdcss-1.2.9.tar.gz) = f967f061a41c9e9fe21cca1ef1fc0e7c377145fa23c39d9df8d16a3af5b623bc
15
SIZE (handbrake/libdvdcss-1.2.9.tar.gz) = 390930
16
MD5 (handbrake/libdvdread-0.9.7.tar.gz) = a89a8532d5f850014f375bd3f5972082
17
SHA256 (handbrake/libdvdread-0.9.7.tar.gz) = 18cf0ee3887264f09f2e23672923aec821ae9b806415ae0d78d0e310c1304c1f
18
SIZE (handbrake/libdvdread-0.9.7.tar.gz) = 388570
19
MD5 (handbrake/libmkv-0.6.1.2.tar.gz) = be5d3a31477efb54766c8d9da89e1865
20
SHA256 (handbrake/libmkv-0.6.1.2.tar.gz) = 5d14627e98e0e8e3ff94ad11cb37dd5a35e909c5ba6444ef9e8b53b937ff3f3b
21
SIZE (handbrake/libmkv-0.6.1.2.tar.gz) = 334575
22
MD5 (handbrake/libogg-1.1.2.tar.gz) = 4018e57063a9e5ce35145d73bea4b18b
23
SHA256 (handbrake/libogg-1.1.2.tar.gz) = 0572ac9027caadb6ee4c2e3c87f98b045a66216ff2006041b12fceb5fb2f0332
24
SIZE (handbrake/libogg-1.1.2.tar.gz) = 423463
25
MD5 (handbrake/libvorbis-aotuv_b5.tar.gz) = e282d60273dcc8cc6602f65b434f3591
26
SHA256 (handbrake/libvorbis-aotuv_b5.tar.gz) = 1e3c5b974e3d16a924eb0af12516a2b0b14aae24d46d32395cd997d833e84509
27
SIZE (handbrake/libvorbis-aotuv_b5.tar.gz) = 1345888
28
MD5 (handbrake/mpeg2dec-0.4.1.tar.gz) = 1b446bb8e627b21820b065fd7071214b
29
SHA256 (handbrake/mpeg2dec-0.4.1.tar.gz) = 8029b7d96dbcee9dc2d140fd872a2cded3eadb8cb6679dc75edc717c18445c44
30
SIZE (handbrake/mpeg2dec-0.4.1.tar.gz) = 498874
31
MD5 (handbrake/mpeg4ip-1.3.tar.gz) = fdc1b857485842f8daa2b17d77a45e69
32
SHA256 (handbrake/mpeg4ip-1.3.tar.gz) = 052b2fc6a880a3c7834a9a60b9520f6e8e7846534e4c99fb15e6675a75eff2a3
33
SIZE (handbrake/mpeg4ip-1.3.tar.gz) = 4719855
34
MD5 (handbrake/xvidcore-1.1.2.tar.gz) = 671480af5816332c86f7ca74a2c90258
35
SHA256 (handbrake/xvidcore-1.1.2.tar.gz) = b7ee6b752e5a4682605ba11bd52b80f02f72f7b1b23721d721e0a1c83f493aa6
36
SIZE (handbrake/xvidcore-1.1.2.tar.gz) = 740185
37
MD5 (handbrake/ffmpeg-9816.tar.gz) = cfc6b97f830eddccbbb82b97ee6e3b78
38
SHA256 (handbrake/ffmpeg-9816.tar.gz) = 23a38e102fa3d2df67e17e21a52d068665580d4fa5bb1d0e6ca4abb5a23894f2
39
SIZE (handbrake/ffmpeg-9816.tar.gz) = 2706937
40
MD5 (handbrake/x264-r665.tar.gz) = a0fbe36eb7b03e61a96dd146e9c1ebbc
41
SHA256 (handbrake/x264-r665.tar.gz) = b61d2122ff559867d173413b1f3eba649d614a5a2e3be90642375d79bd79d30e
42
SIZE (handbrake/x264-r665.tar.gz) = 751198
43
MD5 (handbrake/a52dec-0.7.4.tar.gz) = ce5a978bb359f642dcbd24c6e14a45a7
44
SHA256 (handbrake/a52dec-0.7.4.tar.gz) = 54981ab08fc09a675b9924372cf0cca5aa5363b918c4c19065c2d40e2858be47
45
SIZE (handbrake/a52dec-0.7.4.tar.gz) = 242978
46
MD5 (handbrake/libsamplerate-0.1.2.tar.gz) = d53fbef1b1674bfee9d4fee5c2d0b627
47
SHA256 (handbrake/libsamplerate-0.1.2.tar.gz) = c2bcb7de8cb15ea6cf68a211db5920fd22beb69071b80823714ecfde7eb398fa
48
SIZE (handbrake/libsamplerate-0.1.2.tar.gz) = 711602
(-)handbrake/files/patch-Jamfile (-43 lines)
Lines 1-43 Link Here
1
--- Jamfile.orig	Thu Feb 23 18:29:33 2006
2
+++ Jamfile	Mon Jun 26 00:03:33 2006
3
@@ -6,16 +6,8 @@
4
 
5
 SubDir TOP ;
6
 
7
-# libhb + contrib libraries
8
-HB_LIBS = libhb.a
9
-          contrib/lib/liba52.a        contrib/lib/libavcodec.a
10
-          contrib/lib/libavutil.a     contrib/lib/libdvdread.a
11
-          contrib/lib/libdvdcss.a     contrib/lib/libfaac.a
12
-          contrib/lib/libmp3lame.a    contrib/lib/libmp4v2.a
13
-          contrib/lib/libmpeg2.a      contrib/lib/libvorbis.a
14
-          contrib/lib/libvorbisenc.a  contrib/lib/libogg.a
15
-          contrib/lib/libsamplerate.a contrib/lib/libx264.a
16
-          contrib/lib/libxvidcore.a ;
17
+# libhb
18
+HB_LIBS = libhb.a ;
19
 
20
 # Interfaces
21
 TEST_BIN = HBTest ;
22
@@ -63,6 +55,14 @@
23
     #ObjectC++Flags  $(WX_SRC) : `wx-config --cflags` ;
24
     #Main            $(WX_BIN) : $(WX_SRC) ;
25
 }
26
+if $(OS) = FREEBSD
27
+{
28
+    SystemLibraries $(TEST_BIN) : -L%%LOCALBASE%%/lib %%PTHREAD_LIBS%% -la52
29
+	    -lavcodec -ldvdcss -ldvdread -lfaac -lmp3lame -lmp4v2 -lmpeg2
30
+	    -logg -lsamplerate -lvorbis -lvorbisenc -lxvidcore -lx264
31
+	    $(EXTRA_LIBS) ;
32
+    ObjectCcFlags   $(TEST_SRC) : -I%%LOCALBASE%%/include ;
33
+}
34
 
35
 ObjectHdrs     $(UI_SRC) : $(TOP)/libhb ;
36
 LinkLibraries  $(UI_BIN) : $(HB_LIBS) ;
37
@@ -71,6 +71,4 @@
38
 NotFile package ;
39
 Depends package : $(HB_PACKAGES) ;
40
 
41
-SubInclude TOP contrib ;
42
 SubInclude TOP libhb ;
43
-
(-)handbrake/files/patch-Jamrules (-12 lines)
Lines 1-12 Link Here
1
--- Jamrules.orig	Sun May  7 21:21:57 2006
2
+++ Jamrules	Sun May  7 21:22:12 2006
3
@@ -80,3 +80,9 @@
4
       zip -9 -r $(<) "HandBrake $(HB_VERSION)" && \
5
       rm -rf "HandBrake $(HB_VERSION)"
6
 }
7
+
8
+rule SystemLibraries
9
+{
10
+    LINKLIBS on [ FAppendSuffix $(<) : $(SUFEXE) ] +=  $(>) ;
11
+}
12
+
(-)handbrake/files/patch-configure (-15 / +5 lines)
Lines 1-24 Link Here
1
--- configure.orig	Thu Feb 23 18:29:33 2006
1
--- ../../work/HandBrake/configure	2007-10-08 22:57:25.000000000 +0200
2
+++ configure	Sun Jun 25 23:37:46 2006
2
+++ configure	2007-12-06 02:39:18.000000000 +0100
3
@@ -1,9 +1,9 @@
3
@@ -1,8 +1,8 @@
4
 #! /bin/sh
4
 #! /bin/sh
5
 
5
 
6
-CC="gcc"
6
-CC="gcc"
7
-CXX="g++"
7
-CXX="g++"
8
-CCFLAGS="$CCFLAGS -Wall -g"
8
-CCFLAGS="$CCFLAGS -Wall -g"
9
-OPTIM="$OPTIM -O3 -funroll-loops"
10
+CC="${CC-gcc}"
9
+CC="${CC-gcc}"
11
+CXX="${CXX-g++}"
10
+CXX="${CXX-g++}"
12
+CCFLAGS="${CFLAGS--Wall -g}"
11
+CCFLAGS="${CFLAGS--Wall -g}"
13
+OPTIM=""
12
 OPTIM="$OPTIM -O3 -funroll-loops"
13
 LINKLIBS="-lz"
14
 
14
 
15
 # System-specific flags
16
 SYSTEM=`uname -s`
17
@@ -36,6 +36,7 @@
18
     ;;
19
 
20
   FreeBSD)
21
+    CCFLAGS="$CCFLAGS -Wall"
22
     DEFINES="$DEFINES SYS_FREEBSD"
23
     LINKLIBS="$LINKLIBS -pthread"
24
     ;;
(-)handbrake/files/patch-contrib-Jamfile (+235 lines)
Line 0 Link Here
1
--- ../../work_old/HandBrake/contrib/Jamfile	2007-10-08 22:57:23.000000000 +0200
2
+++ contrib/Jamfile	2007-12-06 03:42:57.000000000 +0100
3
@@ -23,9 +23,10 @@
4
 }
5
 actions Wget
6
 {
7
-    $(RM) $(<) &&
8
-    $(WGET) $(<) `cat $(>)` &&
9
-    ( touch $(<) || true )
10
+#    $(RM) $(<) &&
11
+#    $(WGET) $(<) `cat $(>)` &&
12
+#    ( touch $(<) || true )
13
+    true
14
 }
15
 
16
 # liba52
17
@@ -36,10 +37,9 @@
18
 }
19
 actions LibA52
20
 {
21
-
22
     cd `dirname $(>)` && CONTRIB=`pwd` &&
23
-    rm -rf a52dec && tar xzf a52dec.tar.gz && cd a52dec && patch -p1 < ../patch-a52dec.patch &&
24
-    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && make && make install &&
25
+    cd a52dec && patch -p1 < ../patch-a52dec.patch &&
26
+    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && $(MAKE) && $(MAKE) install &&
27
     strip -S $CONTRIB/lib/liba52.a
28
 }
29
 Wget   $(SUBDIR)/a52dec.tar.gz : $(SUBDIR)/version_a52dec.txt ;
30
@@ -59,13 +59,12 @@
31
 actions LibAvCodec
32
 {
33
     cd `dirname $(>)` && CONTRIB=`pwd` &&
34
-    rm -rf ffmpeg && tar xzf ffmpeg.tar.gz &&
35
     cd ffmpeg && $(FFMPEG_PATCH) &&
36
     ./configure --prefix=$CONTRIB --enable-gpl --enable-pthreads --enable-swscaler --disable-audio-beos --disable-shared --enable-static \
37
         --disable-decoders --enable-decoder=mp2 --disable-parsers --enable-parser=mpegaudio \
38
         --disable-encoders --enable-encoder=mpeg4 --enable-encoder=ac3 --enable-encoder=snow \
39
         --disable-muxers --enable-muxer=ipod --disable-demuxers --disable-protocols --disable-bsfs &&
40
-    make && make install &&
41
+    $(MAKE) && $(MAKE) install &&
42
     strip -S $CONTRIB/lib/libavcodec.a
43
 }
44
 Wget       $(SUBDIR)/ffmpeg.tar.gz    : $(SUBDIR)/version_ffmpeg.txt ;
45
@@ -97,8 +96,8 @@
46
     actions LibDvdCss
47
     {
48
         cd `dirname $(>)` && CONTRIB=`pwd` &&
49
-        rm -rf libdvdcss && tar xzf libdvdcss.tar.gz && cd libdvdcss &&
50
-        ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && make && make install &&
51
+	cd libdvdcss &&
52
+        ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && $(MAKE) && $(MAKE) install &&
53
         strip -S $CONTRIB/lib/libdvdcss.a
54
     }
55
     Wget      $(SUBDIR)/libdvdcss.tar.gz : $(SUBDIR)/version_libdvdcss.txt ;
56
@@ -114,8 +113,8 @@
57
 actions LibDCA
58
 {
59
     cd `dirname $(>)` && CONTRIB=`pwd` &&
60
-    rm -rf libdca && tar xzf libdca.tar.gz && cd libdca && patch -p1 < ../patch-libdca.patch &&
61
-    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && make && make install &&
62
+    cd libdca && patch -p1 < ../patch-libdca.patch &&
63
+    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && $(MAKE) && $(MAKE) install &&
64
     strip -S $CONTRIB/lib/libdca.a
65
 }
66
 Wget   $(SUBDIR)/libdca.tar.gz : $(SUBDIR)/version_libdca.txt ;
67
@@ -132,9 +131,9 @@
68
     actions LibDvdRead
69
     {
70
         cd `dirname $(>)` && CONTRIB=`pwd` &&
71
-        rm -rf libdvdread && tar xzf libdvdread.tar.gz && cd libdvdread &&
72
+	cd libdvdread &&
73
         ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared --with-libdvdcss=$CONTRIB &&
74
-        make && make install &&
75
+        $(MAKE) && $(MAKE) install &&
76
         strip -S $CONTRIB/lib/libdvdread.a
77
     }
78
 }
79
@@ -144,9 +143,9 @@
80
     actions LibDvdRead
81
     {
82
         cd `dirname $(>)` && CONTRIB=`pwd` &&
83
-        rm -rf libdvdread && tar xzf libdvdread.tar.gz && cd libdvdread &&
84
+	cd libdvdread &&
85
         ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared &&
86
-        make && make install &&
87
+        $(MAKE) && $(MAKE) install &&
88
         strip -S $CONTRIB/lib/libdvdread.a
89
     }
90
 }
91
@@ -162,9 +161,9 @@
92
 actions LibFaac
93
 {
94
     cd `dirname $(>)` && CONTRIB=`pwd` &&
95
-    rm -rf faac && tar xzf faac.tar.gz && cd faac &&
96
+    cd faac &&
97
     ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared --enable-static &&
98
-    make && make install &&
99
+    $(MAKE) && $(MAKE) install &&
100
     strip -S $CONTRIB/lib/libfaac.a
101
 }
102
 Wget    $(SUBDIR)/faac.tar.gz   : $(SUBDIR)/version_faac.txt ;
103
@@ -179,9 +178,9 @@
104
 actions LibMp3Lame
105
 {
106
     cd `dirname $(>)` && CONTRIB=`pwd` &&
107
-    rm -rf lame && tar xzf lame.tar.gz && cd lame &&
108
+    cd lame &&
109
     ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared &&
110
-    make && make install &&
111
+    $(MAKE) && $(MAKE) install &&
112
     strip -S $CONTRIB/lib/libmp3lame.a
113
 }
114
 Wget       $(SUBDIR)/lame.tar.gz      : $(SUBDIR)/version_lame.txt ;
115
@@ -198,10 +197,10 @@
116
     actions LibMp4v2
117
     {
118
         cd `dirname $(>)` && CONTRIB=`pwd` &&
119
-        rm -rf mpeg4ip && tar xzf mpeg4ip.tar.gz && cd mpeg4ip &&
120
+	cd mpeg4ip &&
121
         patch -p1 < ../patch-mpeg4ip.patch && patch -p0 < ../patch-mpeg4ip-pascal-str.patch &&
122
         ./bootstrap --cache-file=$CONTRIB/config.cache --disable-mp3lame --disable-faac --disable-x264 --disable-server --disable-player &&
123
-        make -C lib/mp4v2 libmp4v2.la && cp lib/mp4v2/.libs/libmp4v2.a $CONTRIB/lib &&
124
+        $(MAKE) -C lib/mp4v2 libmp4v2.la && cp lib/mp4v2/.libs/libmp4v2.a $CONTRIB/lib &&
125
         cp mpeg4ip_config.h include/mpeg4ip.h include/mpeg4ip_version.h \
126
             include/mpeg4ip_win32.h lib/mp4v2/*.h $CONTRIB/include &&
127
         strip -S $CONTRIB/lib/libmp4v2.a
128
@@ -212,10 +211,10 @@
129
     actions LibMp4v2
130
     {
131
         cd `dirname $(>)` && CONTRIB=`pwd` &&
132
-        rm -rf mpeg4ip && tar xzf mpeg4ip.tar.gz && cd mpeg4ip &&
133
+	cd mpeg4ip &&
134
         patch -p1 < ../patch-mpeg4ip.patch && patch -p1 < ../patch_mpeg4ip_cygwin.patch && patch -p0 < ../patch-mpeg4ip-pascal-str.patch &&
135
         ./bootstrap --cache-file=$CONTRIB/config.cache --disable-mp3lame --disable-faac --disable-x264 --disable-server --disable-player &&
136
-        make -C lib/mp4v2 libmp4v2.la && cp lib/mp4v2/.libs/libmp4v2.a $CONTRIB/lib &&
137
+        $(MAKE) -C lib/mp4v2 libmp4v2.la && cp lib/mp4v2/.libs/libmp4v2.a $CONTRIB/lib &&
138
         cp mpeg4ip_config.h include/mpeg4ip.h include/mpeg4ip_version.h \
139
             include/mpeg4ip_win32.h lib/mp4v2/*.h $CONTRIB/include &&
140
         strip -S $CONTRIB/lib/libmp4v2.a
141
@@ -232,9 +231,9 @@
142
 actions LibMkv
143
 {
144
     cd `dirname $(>)` && CONTRIB=`pwd` &&
145
-    rm -rf libmkv && tar xzf libmkv.tar.gz && cd libmkv &&
146
+    cd libmkv &&
147
     ./configure --disable-shared --enable-static --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache &&
148
-    make && make install &&
149
+    $(MAKE) && $(MAKE) install &&
150
     strip -S $CONTRIB/lib/libmkv.a
151
 }
152
 Wget    $(SUBDIR)/libmkv.tar.gz : $(SUBDIR)/version_libmkv.txt ;
153
@@ -249,9 +248,9 @@
154
 actions LibMpeg2
155
 {
156
     cd `dirname $(>)` && CONTRIB=`pwd` &&
157
-    rm -rf mpeg2dec && tar xzf mpeg2dec.tar.gz && cd mpeg2dec && patch -p1 < ../patch-libmpeg2.patch &&
158
+    cd mpeg2dec && patch -p1 < ../patch-libmpeg2.patch &&
159
     ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared --disable-sdl &&
160
-    make && make install &&
161
+    $(MAKE) && $(MAKE) install &&
162
     strip -S $CONTRIB/lib/libmpeg2.a
163
 }
164
 Wget     $(SUBDIR)/mpeg2dec.tar.gz : $(SUBDIR)/version_mpeg2dec.txt ;
165
@@ -266,9 +265,9 @@
166
 actions LibOgg
167
 {
168
     cd `dirname $(>)` && CONTRIB=`pwd` &&
169
-    rm -rf libogg && tar xzf libogg.tar.gz && cd libogg &&
170
+    cd libogg &&
171
     ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared &&
172
-    make && make install &&
173
+    $(MAKE) && $(MAKE) install &&
174
     strip -S $CONTRIB/lib/libogg.a
175
 }
176
 Wget   $(SUBDIR)/libogg.tar.gz : $(SUBDIR)/version_libogg.txt ;
177
@@ -283,9 +282,9 @@
178
 actions LibSampleRate
179
 {
180
     cd `dirname $(>)` && CONTRIB=`pwd` &&
181
-    rm -rf libsamplerate && tar xzf libsamplerate.tar.gz && cd libsamplerate &&
182
+    cd libsamplerate &&
183
     ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared &&
184
-    make && make install &&
185
+    $(MAKE) && $(MAKE) install &&
186
     strip -S $CONTRIB/lib/libsamplerate.a
187
 }
188
 Wget          $(SUBDIR)/libsamplerate.tar.gz : $(SUBDIR)/version_libsamplerate.txt ;
189
@@ -300,9 +299,9 @@
190
 actions LibVorbis
191
 {
192
     cd `dirname $(>)` && CONTRIB=`pwd` &&
193
-    rm -rf libvorbis && tar xzf libvorbis.tar.gz && cd libvorbis &&
194
+    cd libvorbis &&
195
     ./configure --prefix=$CONTRIB --with-ogg=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared &&
196
-    make && make install &&
197
+    $(MAKE) && $(MAKE) install &&
198
     strip -S $CONTRIB/lib/libvorbis.a
199
 }
200
 Wget      $(SUBDIR)/libvorbis.tar.gz : $(SUBDIR)/version_libvorbis.txt ;
201
@@ -339,9 +338,9 @@
202
 actions LibX264
203
 {
204
     cd `dirname $(>)` && CONTRIB=`pwd` &&
205
-    rm -rf x264 && tar xzf x264.tar.gz && cd x264 && $(LIBX264_PATCH)
206
-    ./configure --prefix=$CONTRIB --enable-pthread && make &&
207
-    make install &&
208
+    cd x264 && $(LIBX264_PATCH)
209
+    ./configure --prefix=$CONTRIB --enable-pthread && $(MAKE) &&
210
+    $(MAKE) install &&
211
     strip -S $CONTRIB/lib/libx264.a
212
 }
213
 Wget    $(SUBDIR)/x264.tar.gz   : $(SUBDIR)/version_x264.txt ;
214
@@ -365,9 +364,8 @@
215
 actions LibXvidCore
216
 {
217
     cd `dirname $(>)` && CONTRIB=`pwd` &&
218
-    rm -rf xvidcore && tar xzf xvidcore.tar.gz &&
219
     cd xvidcore && $(LIBXVIDCORE_PATCH)
220
-    cd build/generic/ && ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && make libxvidcore.a &&
221
+    cd build/generic/ && ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && $(MAKE) libxvidcore.a &&
222
     cp ./=build/libxvidcore.a $CONTRIB/lib/ &&
223
     cp ../../src/xvid.h $CONTRIB/include/ &&
224
     strip -S $CONTRIB/lib/libxvidcore.a
225
@@ -386,9 +384,8 @@
226
     actions Zlib
227
     {
228
         cd `dirname $(>)` && CONTRIB=`pwd` &&
229
-        rm -rf zlib && tar xzf zlib.tar.gz &&
230
         cd zlib && ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache &&
231
-        make && make install && touch $CONTRIB/.contrib &&
232
+        $(MAKE) && $(MAKE) install && touch $CONTRIB/.contrib &&
233
         strip -S $CONTRIB/lib/libz.a
234
     }
235
     Wget  $(SUBDIR)/zlib.tar.gz : $(SUBDIR)/version_zlib.txt ;
(-)handbrake/files/patch-contrib-a52dec-libao-audio_out_oss.c (+11 lines)
Line 0 Link Here
1
--- ../../work/HandBrake/contrib/a52dec/libao/audio_out_oss.c	2002-04-28 12:23:02.000000000 +0200
2
+++ contrib/a52dec/libao/audio_out_oss.c	2007-12-06 03:06:05.000000000 +0100
3
@@ -35,7 +35,7 @@
4
 #if defined(__OpenBSD__)
5
 #include <soundcard.h>
6
 #elif defined(__FreeBSD__)
7
-#include <machine/soundcard.h>
8
+#include <sys/soundcard.h>
9
 #ifndef AFMT_S16_NE
10
 #include <machine/endian.h>
11
 #if BYTE_ORDER == LITTLE_ENDIAN
(-)handbrake/files/patch-contrib-libsamplerate-configure (+20 lines)
Line 0 Link Here
1
--- ../../work/HandBrake/contrib/libsamplerate/configure	2004-09-12 04:57:51.000000000 +0200
2
+++ contrib/libsamplerate/configure	2007-12-06 03:14:12.000000000 +0100
3
@@ -22293,7 +22293,7 @@
4
 # Now use the information from the checking stage.
5
 
6
 # Need to make examples directory before tests directory.
7
-subdirs="src doc examples tests"
8
+subdirs="src doc examples"
9
 
10
 
11
 cat >>confdefs.h <<\_ACEOF
12
@@ -22321,7 +22321,7 @@
13
 
14
 
15
 
16
-                                                                                                    ac_config_files="$ac_config_files Makefile src/Version_script Win32/Makefile Win32/Makefile.mingw src/Makefile examples/Makefile tests/Makefile doc/Makefile libsamplerate.spec samplerate.pc"
17
+                                                                                                    ac_config_files="$ac_config_files Makefile src/Version_script Win32/Makefile Win32/Makefile.mingw src/Makefile examples/Makefile doc/Makefile libsamplerate.spec samplerate.pc"
18
 
19
 cat >confcache <<\_ACEOF
20
 # This file is a shell script that caches the results of configure
(-)handbrake/files/patch-contrib-x264-Makefile (+20 lines)
Line 0 Link Here
1
--- ../HandBrake_old/contrib/x264/Makefile	2007-07-15 22:45:03.000000000 +0200
2
+++ contrib/x264/Makefile	2007-12-06 01:17:21.000000000 +0100
3
@@ -18,7 +18,7 @@
4
 endif
5
 
6
 # MMX/SSE optims
7
-ifeq ($(ARCH),X86)
8
+ifeq ($(ARCH),i386)
9
 ifneq ($(AS),)
10
 SRCS   += common/i386/mc-c.c common/i386/predict-c.c
11
 ASMSRC  = common/i386/dct-a.asm common/i386/cpu-a.asm \
12
@@ -32,7 +32,7 @@
13
 endif
14
 
15
 # MMX/SSE optims
16
-ifeq ($(ARCH),X86_64)
17
+ifeq ($(ARCH),amd64)
18
 ifneq ($(AS),)
19
 SRCS   += common/i386/mc-c.c common/i386/predict-c.c
20
 ASMSRC  = common/amd64/dct-a.asm common/amd64/cpu-a.asm \
(-)handbrake/files/patch-contrib-x264-configure (+11 lines)
Line 0 Link Here
1
--- ../HandBrake_old/contrib/x264/configure	2007-07-15 22:45:03.000000000 +0200
2
+++ contrib/x264/configure	2007-12-06 01:16:03.000000000 +0100
3
@@ -160,7 +160,7 @@
4
     fi
5
     as_check || AS="nasm"
6
     ;;
7
-  x86_64)
8
+  x86_64 | amd64)
9
     ARCH="X86_64"
10
     AS="yasm"
11
     ASFLAGS="-f elf -m amd64"
(-)handbrake/files/patch-libhb-fifo.c (+13 lines)
Line 0 Link Here
1
--- HandBrake_old/libhb/fifo.c	2007-10-08 22:57:08.000000000 +0200
2
+++ libhb/fifo.c	2007-12-04 05:55:37.000000000 +0100
3
@@ -6,9 +6,7 @@
4
 
5
 #include "hb.h"
6
 
7
-#ifndef SYS_DARWIN
8
-#include <malloc.h>
9
-#endif
10
+#include <stdlib.h>
11
 
12
 /* Fifo */
13
 struct hb_fifo_s
(-)handbrake/files/patch-libhb-ports.c (+46 lines)
Line 0 Link Here
1
--- HandBrake_old/libhb/ports.c	2007-10-08 22:57:08.000000000 +0200
2
+++ libhb/ports.c	2007-12-04 07:48:47.000000000 +0100
3
@@ -28,6 +28,11 @@
4
 #include <netinet/in.h>
5
 //#endif
6
 
7
+#if defined(__FreeBSD__)
8
+#include <sys/types.h>
9
+#include <sys/sysctl.h>
10
+#endif
11
+
12
 #include "hb.h"
13
 
14
 /************************************************************************
15
@@ -105,21 +110,17 @@
16
         cpu_count = info.cpu_count;
17
     }
18
 
19
-#elif defined( SYS_DARWIN ) || defined( SYS_FREEBSD )
20
-    FILE * info;
21
-    char   buffer[16];
22
-
23
-    if( ( info = popen( "/usr/sbin/sysctl hw.ncpu", "r" ) ) )
24
+#elif defined(__FreeBSD__)
25
     {
26
-        memset( buffer, 0, 16 );
27
-        if( fgets( buffer, 15, info ) )
28
-        {
29
-            if( sscanf( buffer, "hw.ncpu: %d", &cpu_count ) != 1 )
30
-            {
31
-                cpu_count = 1;
32
-            }
33
-        }
34
-        fclose( info );
35
+        int mib[2];
36
+        size_t len;
37
+
38
+        mib[0] = CTL_HW;
39
+        mib[1] = HW_NCPU;
40
+        len = sizeof(cpu_count);
41
+
42
+        if(sysctl(mib, 2, &cpu_count, &len, NULL, 0) != 0)
43
+          cpu_count = 1;
44
     }
45
 
46
 #elif defined( SYS_LINUX )
(-)handbrake/files/patch-libhb_Jamfile (-9 lines)
Lines 1-9 Link Here
1
--- libhb/Jamfile.orig	Sun Jun 25 23:12:27 2006
2
+++ libhb/Jamfile	Sun Jun 25 23:13:58 2006
3
@@ -14,5 +14,5 @@
4
 
5
 Library libhb : $(LIBHB_SRC) ;
6
 
7
-ObjectCcFlags $(LIBHB_SRC) : -I$(TOP)/contrib/include ;
8
+ObjectHdrs $(LIBHB_SRC) : %%LOCALBASE%%/include ;
9
 ObjectDefines $(LIBHB_SRC) : __LIBHB__ ;
(-)handbrake/files/patch-libhb_encx264.c (-11 lines)
Lines 1-11 Link Here
1
--- libhb/encx264.c.orig	Sat Aug 26 02:34:47 2006
2
+++ libhb/encx264.c	Sat Aug 26 02:36:02 2006
3
@@ -79,7 +79,7 @@
4
     else
5
     {
6
         /* Rate control */
7
-        param.rc.b_cbr     = 1;
8
+        param.rc.i_rc_method     = 1;
9
         param.rc.i_bitrate = job->vbitrate;
10
         switch( job->pass )
11
         {
(-)handbrake/pkg-descr (-18 / +28 lines)
Lines 1-20 Link Here
1
HandBrake is a GPL'd multi-platform, multithreaded DVD to MPEG-4 ripper and
1
HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded
2
converter. HandBrake was originally available on the BeOS, but now has been
2
DVD to MPEG-4 converter, available for MacOS X, Linux, Windows and
3
ported over to MacOS X, GNU/Linux and FreeBSD.
3
FreeBSD.
4
4
5
Features:
5
Supported sources:
6
 * Can encode directly from DVDs (even encrypted ones) or from VIDEO_TS
6
7
   folders
7
    * Any DVD-like source: VIDEO_TS folder, DVD image or real DVD
8
 * Supports AC3, LPCM and MPEG audio tracks
8
      (encrypted or unencrypted, but protection methods other than CSS
9
 * Outputs MP4, AVI or OGM files
9
      are not supported and must be handled externally with third-party
10
 * Outputs AAC, MP3 or Vorbis audio
10
      software), and some .VOB and .TS files
11
 * Supports 2-pass encoding
11
    * PAL or NTSC
12
 * Supports encoding of two audio tracks
12
    * AC-3, DTS, LPCM or MPEG audio tracks
13
 * Includes a bitrate calculator
13
14
 * Supports picture deinterlacing, cropping and scaling
14
Outputs:
15
15
16
Known limitations:
16
    * File format: MP4, MKV, AVI or OGM
17
 * Does not handle DTS audio tracks
17
    * Video: MPEG-4 or H.264 (1 or 2 passes or constant quantizer/rate
18
 * Does not handle single VOB files or any other file format
18
      encoding)
19
    * Audio: AAC, MP3, Vorbis or AC-3 pass-through (supports encoding
20
      of several audio tracks)
21
22
Misc features:
23
24
    * Chapter selection
25
    * Basic subtitle support (burned into the picture)
26
    * Integrated bitrate calculator
27
    * Picture deinterlacing, cropping and scaling
28
    * Grayscale encoding
19
29
20
WWW: http://handbrake.m0k.org/
30
WWW: http://handbrake.m0k.org/

Return to bug 118458