aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authorriggs <riggs@FreeBSD.org>2014-02-15 04:00:13 +0800
committerriggs <riggs@FreeBSD.org>2014-02-15 04:00:13 +0800
commita7aeb43d8750f6625f90bc02f17b79824b447ef6 (patch)
tree13eaf9dcabfe26ad3633f2cb17e684394a1f295f /multimedia
parent9cf756873e212f5edae1bc5832b5882d53366778 (diff)
downloadfreebsd-ports-graphics-a7aeb43d8750f6625f90bc02f17b79824b447ef6.tar.gz
freebsd-ports-graphics-a7aeb43d8750f6625f90bc02f17b79824b447ef6.tar.zst
freebsd-ports-graphics-a7aeb43d8750f6625f90bc02f17b79824b447ef6.zip
- Update port to upstream release 0.9.9
- Stagify - USES cleanups PR: ports/186387 Submitted by: Arjan Gijsberts <arjan@liralab.it> Approved by: jadawin (co-mentor)
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/handbrake/Makefile97
-rw-r--r--multimedia/handbrake/distinfo32
-rw-r--r--multimedia/handbrake/files/patch-contrib-ffmpeg-A04-x86-asm-h.patch14
-rw-r--r--multimedia/handbrake/files/patch-contrib-mp4v2-P01-freebsd-clang-namespace.patch120
-rw-r--r--multimedia/handbrake/files/patch-contrib_fontconfig_module.defs11
-rw-r--r--multimedia/handbrake/files/patch-contrib_freetype_module.defs8
-rw-r--r--multimedia/handbrake/files/patch-contrib_libass_module.defs14
-rw-r--r--multimedia/handbrake/files/patch-custom.defs19
-rw-r--r--multimedia/handbrake/files/patch-libhb_module.defs12
-rw-r--r--multimedia/handbrake/files/patch-make_include_contrib.defs62
-rw-r--r--multimedia/handbrake/files/patch-make_include_gcc.defs20
-rw-r--r--multimedia/handbrake/files/patch-test_module.defs23
12 files changed, 281 insertions, 151 deletions
diff --git a/multimedia/handbrake/Makefile b/multimedia/handbrake/Makefile
index fa9dbbb1acc..6a1d4f8340b 100644
--- a/multimedia/handbrake/Makefile
+++ b/multimedia/handbrake/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= handbrake
-PORTVERSION= 0.9.8
-PORTREVISION= 2
+PORTVERSION= 0.9.9
CATEGORIES= multimedia
MASTER_SITES= SF/${PORTNAME}/${PORTVERSION} \
http://download.handbrake.fr/handbrake/contrib/:contrib
@@ -11,24 +10,16 @@ DISTFILES= HandBrake-${PORTVERSION}.tar.bz2 \
a52dec-0.7.4.tar.gz:contrib \
faac-1.28.tar.gz:contrib \
faad2-2.7.tar.gz:contrib \
- ffmpeg-v0.7-1696-gcae4f4b.tar.bz2:contrib \
- fontconfig-2.8.0.tar.gz:contrib \
- freetype-2.4.7.tar.bz2:contrib \
+ libav-v9.6.tar.bz2:contrib \
lame-3.98.tar.gz:contrib \
- libass-0.10.0-1.tar.gz:contrib \
- libbluray-0.0.1-pre-213-ga869da8.tar.gz:contrib \
+ libbluray-0.2.3.tar.bz2:contrib \
libdca-r81-strapped.tar.gz:contrib \
libdvdnav-svn1168.tar.gz:contrib \
libdvdread-svn1168.tar.gz:contrib \
libmkv-0.6.5-0-g82075ae.tar.gz:contrib \
- libogg-1.3.0.tar.gz:contrib \
- libsamplerate-0.1.4.tar.gz:contrib \
- libtheora-1.1.0.tar.bz2:contrib \
- libvorbis-aotuv_b6.03.tar.bz2:contrib \
- libxml2-2.7.7.tar.gz:contrib \
mp4v2-trunk-r355.tar.bz2:contrib \
mpeg2dec-0.5.1.tar.gz:contrib \
- x264-r2146-bcd41db.tar.gz:contrib
+ x264-r2273-b3065e6.tar.gz:contrib
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= ports@FreeBSD.org
@@ -37,10 +28,20 @@ COMMENT= Versatile DVD ripper and video transcoder
LICENSE= GPLv2
BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm
-LIB_DEPENDS= libfribidi.so:${PORTSDIR}/converters/fribidi
+LIB_DEPENDS= libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig \
+ libfreetype.so:${PORTSDIR}/print/freetype2 \
+ libfribidi.so:${PORTSDIR}/converters/fribidi \
+ libxml2.so:${PORTSDIR}/textproc/libxml2 \
+ libass.so:${PORTSDIR}/multimedia/libass \
+ libogg.so:${PORTSDIR}/audio/libogg \
+ libvorbis.so:${PORTSDIR}/audio/libvorbis \
+ libvorbisenc.so:${PORTSDIR}/audio/libvorbis \
+ libtheoradec.so:${PORTSDIR}/multimedia/libtheora \
+ libtheoraenc.so:${PORTSDIR}/multimedia/libtheora \
+ libsamplerate.so:${PORTSDIR}/audio/libsamplerate
RUN_DEPENDS= ${LOCALBASE}/lib/libdvdcss.so:${PORTSDIR}/multimedia/libdvdcss
-USES= gmake pkgconfig
+USES= gmake pkgconfig iconv
USE_AUTOTOOLS= libtool aclocal
LIBTOOLFILES= configure
USE_PYTHON_BUILD= yes
@@ -63,7 +64,6 @@ OPTIONS_DEFINE= X11
X11_DESC= Build GTK+2 based GUI program
OPTIONS_DEFAULT= X11
-NO_STAGE= yes
.include <bsd.port.pre.mk>
# Recent GNU binutils are required to handle inline SSSE3 asm (in x264), and
@@ -85,6 +85,13 @@ PLIST_FILES+= bin/HandBrake
CONFIGURE_ARGS+= --disable-gtk
.endif
+# Enforce linking to the system c++ standard lib
+.if ${OSVERSION} >= 1000054
+LDFLAGS+= -lc++
+.else
+LDFLAGS+= -lstdc++
+.endif
+
run-autotools-aclocal:
@${DO_NADA}
@@ -92,52 +99,64 @@ run-autotools-aclocal:
# considered good in FreeBSD. Instead, we will prepare everything manually.
post-extract: .SILENT
# Unversioned directories can be copied in a loop
-.for d in a52dec lame libdca libdvdnav libdvdread libsamplerate mpeg2dec x264
+.for d in a52dec lame libdca libdvdnav libdvdread mpeg2dec x264
${MKDIR} ${BUILD_WRKSRC}/contrib/${d}
${MV} ${WRKDIR}/${d} ${BUILD_WRKSRC}/contrib/${d}
.endfor
# Others had to be processed one by one due to irregular (versioned) names
- cd ${BUILD_WRKSRC}/contrib && ${MKDIR} faac faad2 ffmpeg fontconfig \
- freetype libass libbluray libmkv libogg libtheora libvorbis \
- libxml2 mp4v2
+ cd ${BUILD_WRKSRC}/contrib && ${MKDIR} faac faad2 ffmpeg libbluray libmkv mp4v2
${MV} ${WRKDIR}/faac-1.28 ${BUILD_WRKSRC}/contrib/faac
${MV} ${WRKDIR}/faad2-2.7 ${BUILD_WRKSRC}/contrib/faad2
- ${MV} ${WRKDIR}/ffmpeg-v0.7-1696-gcae4f4b \
- ${BUILD_WRKSRC}/contrib/ffmpeg
- ${MV} ${WRKDIR}/fontconfig-2.8.0 ${BUILD_WRKSRC}/contrib/fontconfig
- ${MV} ${WRKDIR}/freetype-2.4.7 ${BUILD_WRKSRC}/contrib/freetype
- ${MV} ${WRKDIR}/libass-0.10.0-1 ${BUILD_WRKSRC}/contrib/libass
- ${MV} ${WRKDIR}/libbluray-0.0.1-pre-213-ga869da8 \
- ${BUILD_WRKSRC}/contrib/libbluray
+ ${MV} ${WRKDIR}/libav-v9.6 ${BUILD_WRKSRC}/contrib/ffmpeg/libav-v9.6
+ ${MV} ${WRKDIR}/libbluray-0.2.3 ${BUILD_WRKSRC}/contrib/libbluray
${MV} ${WRKDIR}/libmkv-0.6.5-0-g82075ae ${BUILD_WRKSRC}/contrib/libmkv
- ${MV} ${WRKDIR}/libogg-1.3.0 ${BUILD_WRKSRC}/contrib/libogg
- ${MV} ${WRKDIR}/libtheora-1.1.0 ${BUILD_WRKSRC}/contrib/libtheora
- ${MV} ${WRKDIR}/aotuv-b6.03_20110424 ${BUILD_WRKSRC}/contrib/libvorbis
- ${MV} ${WRKDIR}/libxml2-2.7.7 ${BUILD_WRKSRC}/contrib/libxml2
${MV} ${WRKDIR}/mp4v2-trunk-r355 ${BUILD_WRKSRC}/contrib/mp4v2
-# Remove one patch file that does not apply cleanly
- ${RM} ${WRKSRC}/contrib/fontconfig/A00-config.patch
# Avoid conflict with `print/harfbuzz' (also installs "hb.h")
${MV} ${WRKSRC}/libhb/hb.h ${WRKSRC}/libhb/hb-of-handbrake.h
+# Mark all bundled dependencies as extracted
+ ${TOUCH} ${BUILD_WRKSRC}/contrib/a52dec/.stamp.extract
+ ${TOUCH} ${BUILD_WRKSRC}/contrib/faac/.stamp.extract
+ ${TOUCH} ${BUILD_WRKSRC}/contrib/faad2/.stamp.extract
+ ${TOUCH} ${BUILD_WRKSRC}/contrib/ffmpeg/.stamp.extract
+ ${TOUCH} ${BUILD_WRKSRC}/contrib/lame/.stamp.extract
+ ${TOUCH} ${BUILD_WRKSRC}/contrib/libbluray/.stamp.extract
+ ${TOUCH} ${BUILD_WRKSRC}/contrib/libdca/.stamp.extract
+ ${TOUCH} ${BUILD_WRKSRC}/contrib/libdvdnav/.stamp.extract
+ ${TOUCH} ${BUILD_WRKSRC}/contrib/libdvdread/.stamp.extract
+ ${TOUCH} ${BUILD_WRKSRC}/contrib/libmkv/.stamp.extract
+ ${TOUCH} ${BUILD_WRKSRC}/contrib/mp4v2/.stamp.extract
+ ${TOUCH} ${BUILD_WRKSRC}/contrib/mpeg2dec/.stamp.extract
+ ${TOUCH} ${BUILD_WRKSRC}/contrib/x264/.stamp.extract
post-patch:
@${REINPLACE_CMD} -e 's|machine/soundcard|sys/soundcard|' \
${BUILD_WRKSRC}/contrib/a52dec/a52dec/libao/audio_out_oss.c
@${REINPLACE_CMD} -e 's|-ldl|-lc| ; s|\[dl\]|[c]|' \
- ${BUILD_WRKSRC}/contrib/libbluray/libbluray-0.0.1-pre-213-ga869da8/configure.ac
+ ${BUILD_WRKSRC}/contrib/libbluray/libbluray-0.2.3/configure.ac
@${REINPLACE_CMD} -e 's|<malloc|<stdlib|' ${WRKSRC}/libhb/fifo.c
- @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \
- ${WRKSRC}/contrib/libass/module.defs \
- ${WRKSRC}/libhb/module.defs ${WRKSRC}/test/module.defs
@${REINPLACE_CMD} -e 's|libdvdcss\.so\.2|libdvdcss.so|' \
${BUILD_WRKSRC}/contrib/libdvdread/libdvdread/src/dvd_input.c
@${FIND} ${WRKSRC} -type f -name '*.[ch]' -print0 | ${XARGS} -0 \
${REINPLACE_CMD} -e '/#include/s|hb\.h|hb-of-handbrake.h|'
+ @${REINPLACE_CMD} -e "s|ToolProbe( 'GCC.gcc', 'gcc',|ToolProbe( 'GCC.gcc', '${CC}',|" \
+ ${WRKSRC}/make/configure.py
+ @${REINPLACE_CMD} -e 's|avcodec avformat avutil avresample|avformat avcodec avresample avutil|' \
+ ${WRKSRC}/libhb/module.defs ${WRKSRC}/test/module.defs
+ ${TR} -d '\r' < ${WRKSRC}/contrib/mpeg2dec/A02-gwluserdata.patch > ${WRKDIR}/A02-gwluserdata.patch
+ ${MV} ${WRKDIR}/A02-gwluserdata.patch ${WRKSRC}/contrib/mpeg2dec/
+ @${REINPLACE_CMD} -E \
+ -e 's|%%REP_CC%%|${CC}|g' \
+ -e 's|%%REP_CXX%%|${CXX}|g' \
+ -e 's|%%REP_ARCHS%%|${CPUTYPE}|g' \
+ -e 's|%%REP_I%%|-I${LOCALBASE}/include|g' \
+ -e 's|%%REP_L%%|-L${LOCALBASE}/lib|g' \
+ -e 's|%%REP_ICONV%%|${ICONV_LIB:S/-l//}|g' \
+ ${WRKSRC}/custom.defs
do-install:
- ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/HandBrakeCLI ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/HandBrakeCLI ${STAGEDIR}${PREFIX}/bin
.if ${PORT_OPTIONS:MX11}
- ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/gtk/src/ghb ${PREFIX}/bin/HandBrake
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/gtk/src/ghb ${STAGEDIR}${PREFIX}/bin/HandBrake
.endif
.include <bsd.port.post.mk>
diff --git a/multimedia/handbrake/distinfo b/multimedia/handbrake/distinfo
index 4c9ea6e2a53..a5748bc2a30 100644
--- a/multimedia/handbrake/distinfo
+++ b/multimedia/handbrake/distinfo
@@ -1,23 +1,17 @@
-SHA256 (handbrake/HandBrake-0.9.8.tar.bz2) = dba75a9ff772e419c01d75532c1bf0d7253e73d7ead184eee755cd4c133dc798
-SIZE (handbrake/HandBrake-0.9.8.tar.bz2) = 3156964
+SHA256 (handbrake/HandBrake-0.9.9.tar.bz2) = a71dd774104cda00cfb51a813550351d638253791f2f419d04a66f3158a835b3
+SIZE (handbrake/HandBrake-0.9.9.tar.bz2) = 9315199
SHA256 (handbrake/a52dec-0.7.4.tar.gz) = 54981ab08fc09a675b9924372cf0cca5aa5363b918c4c19065c2d40e2858be47
SIZE (handbrake/a52dec-0.7.4.tar.gz) = 242978
SHA256 (handbrake/faac-1.28.tar.gz) = c5141199f4cfb17d749c36ba8cfe4b25f838da67c22f0fec40228b6b9c3d19df
SIZE (handbrake/faac-1.28.tar.gz) = 678891
SHA256 (handbrake/faad2-2.7.tar.gz) = ee26ed1e177c0cd8fa8458a481b14a0b24ca0b51468c8b4c8b676fd3ceccd330
SIZE (handbrake/faad2-2.7.tar.gz) = 1137407
-SHA256 (handbrake/ffmpeg-v0.7-1696-gcae4f4b.tar.bz2) = f39b2ea8f47db9c84c9bb091707312cd19b927d8f4a957c20222add1a5dd2497
-SIZE (handbrake/ffmpeg-v0.7-1696-gcae4f4b.tar.bz2) = 4242565
-SHA256 (handbrake/fontconfig-2.8.0.tar.gz) = fa2a1c6eea654d9fce7a4b1220f10c99cdec848dccaf1625c01f076b31382335
-SIZE (handbrake/fontconfig-2.8.0.tar.gz) = 1548409
-SHA256 (handbrake/freetype-2.4.7.tar.bz2) = ba22620479954582371286268ef75e6e932c0270ee67d6797bbf3ed9d31a5d77
-SIZE (handbrake/freetype-2.4.7.tar.bz2) = 1490543
+SHA256 (handbrake/libav-v9.6.tar.bz2) = ea41941866fb64d7e363684a4705574f65786bd9eb0fe1f796dee4c0d459aa52
+SIZE (handbrake/libav-v9.6.tar.bz2) = 4672723
SHA256 (handbrake/lame-3.98.tar.gz) = 40235e84dfe4760ad3f352590a64b7bda1502a386c97d06229df356426e37686
SIZE (handbrake/lame-3.98.tar.gz) = 1411318
-SHA256 (handbrake/libass-0.10.0-1.tar.gz) = a0c652f4a5c1bfd58cd47ff627fff2dfbd471b40f765aa96fd1b251c0058b867
-SIZE (handbrake/libass-0.10.0-1.tar.gz) = 745314
-SHA256 (handbrake/libbluray-0.0.1-pre-213-ga869da8.tar.gz) = 4aa7127201a5d3d4148d99c37c7701ede6e0707456dacc8a59464dc68e231b76
-SIZE (handbrake/libbluray-0.0.1-pre-213-ga869da8.tar.gz) = 241927
+SHA256 (handbrake/libbluray-0.2.3.tar.bz2) = 2c65cfb02aeec31721f9ea65ee2c085a9bfe163e99dd01b52ccb3f53ba205eea
+SIZE (handbrake/libbluray-0.2.3.tar.bz2) = 465239
SHA256 (handbrake/libdca-r81-strapped.tar.gz) = ab2519af6c2f12411a2bd674b83615af9b0d5fb09f28ad5dab714ea1bfab9df1
SIZE (handbrake/libdca-r81-strapped.tar.gz) = 523282
SHA256 (handbrake/libdvdnav-svn1168.tar.gz) = 7cf4ff6ab0b5d3db3c300fc3cdb24e1ad59f22dd90352df075a604bc698d01c7
@@ -26,19 +20,9 @@ SHA256 (handbrake/libdvdread-svn1168.tar.gz) = a489b618962e31a2b151b2e6d7b0c3fcb
SIZE (handbrake/libdvdread-svn1168.tar.gz) = 946033
SHA256 (handbrake/libmkv-0.6.5-0-g82075ae.tar.gz) = 7314a296c68f42b826164074a96e247e52d8ef9287c21ebc5fe1bf9e73643e97
SIZE (handbrake/libmkv-0.6.5-0-g82075ae.tar.gz) = 32742
-SHA256 (handbrake/libogg-1.3.0.tar.gz) = a8de807631014615549d2356fd36641833b8288221cea214f8a72750efe93780
-SIZE (handbrake/libogg-1.3.0.tar.gz) = 425144
-SHA256 (handbrake/libsamplerate-0.1.4.tar.gz) = 4b4af3ecaee05c8875a9b113c6a2f816f06f283fb882914e57b21c0b08b67b75
-SIZE (handbrake/libsamplerate-0.1.4.tar.gz) = 4259244
-SHA256 (handbrake/libtheora-1.1.0.tar.bz2) = 74be9fe9f85d18c45bdcbb018cebf12c74e2234aeecb4d4c4cb92d80bdd287e2
-SIZE (handbrake/libtheora-1.1.0.tar.bz2) = 1785634
-SHA256 (handbrake/libvorbis-aotuv_b6.03.tar.bz2) = 95455420f07e4b3abdf32bda9f5921e9ed3f1afdc3739098dc090150a42fd7fd
-SIZE (handbrake/libvorbis-aotuv_b6.03.tar.bz2) = 1250659
-SHA256 (handbrake/libxml2-2.7.7.tar.gz) = af5b781418ba4fff556fa43c50086658ea8a2f31909c2b625c2ce913a1d9eb68
-SIZE (handbrake/libxml2-2.7.7.tar.gz) = 4868502
SHA256 (handbrake/mp4v2-trunk-r355.tar.bz2) = 5b7d4e62df506b1246463da82cc2f02415eb462e6ccd5848f98f5cdcfc1f3d4f
SIZE (handbrake/mp4v2-trunk-r355.tar.bz2) = 475488
SHA256 (handbrake/mpeg2dec-0.5.1.tar.gz) = 161539061aa89864968a5150ed6c6a028a830c4868f7dd7c500732baef47fb71
SIZE (handbrake/mpeg2dec-0.5.1.tar.gz) = 522405
-SHA256 (handbrake/x264-r2146-bcd41db.tar.gz) = 7b3d0ad309426ad49ff21df4d2ee5553b5769bc2bf2b7ae50f37f5fc72d190b1
-SIZE (handbrake/x264-r2146-bcd41db.tar.gz) = 656089
+SHA256 (handbrake/x264-r2273-b3065e6.tar.gz) = 956c82c9318740ef3744cf6e752fb6181be0716273e2e8976306624f0864a815
+SIZE (handbrake/x264-r2273-b3065e6.tar.gz) = 681489
diff --git a/multimedia/handbrake/files/patch-contrib-ffmpeg-A04-x86-asm-h.patch b/multimedia/handbrake/files/patch-contrib-ffmpeg-A04-x86-asm-h.patch
new file mode 100644
index 00000000000..bdd64731757
--- /dev/null
+++ b/multimedia/handbrake/files/patch-contrib-ffmpeg-A04-x86-asm-h.patch
@@ -0,0 +1,14 @@
+--- /dev/null 2014-02-09 20:55:00.000000000 +0100
++++ contrib/ffmpeg/A04-x86-asm-h.patch 2014-02-09 20:55:09.548807959 +0100
+@@ -0,0 +1,11 @@
++--- a/libavutil/x86/asm.h 2014-02-09 20:38:46.964875000 +0100
+++++ b/libavutil/x86/asm.h 2014-02-09 20:44:57.928849417 +0100
++@@ -68,7 +68,7 @@
++ typedef int x86_reg;
++ #endif
++
++-#define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE))
+++#define HAVE_7REGS (ARCH_X86_64)
++ #define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE))
++
++ #if ARCH_X86_64 && defined(PIC)
diff --git a/multimedia/handbrake/files/patch-contrib-mp4v2-P01-freebsd-clang-namespace.patch b/multimedia/handbrake/files/patch-contrib-mp4v2-P01-freebsd-clang-namespace.patch
new file mode 100644
index 00000000000..8b1baf17060
--- /dev/null
+++ b/multimedia/handbrake/files/patch-contrib-mp4v2-P01-freebsd-clang-namespace.patch
@@ -0,0 +1,120 @@
+--- /dev/null 2014-02-09 17:00:00.000000000 +0100
++++ contrib/mp4v2/P01-freebsd-clang-namespace.patch 2014-02-09 16:52:59.124808788 +0100
+@@ -0,0 +1,117 @@
++diff -Naur mp4v2-trunk-r355.orig/src/bmff/typebmff.cpp mp4v2-trunk-r355/src/bmff/typebmff.cpp
++--- mp4v2-trunk-r355.orig/src/bmff/typebmff.cpp 2009-05-21 04:52:31.000000000 +0200
+++++ mp4v2-trunk-r355/src/bmff/typebmff.cpp 2014-02-06 04:18:15.000000000 +0100
++@@ -23,19 +23,12 @@
++
++ #include "impl.h"
++
++-// VStudio idiocy prevents defining template instanced static data
++-// in a namespace. Workaround it by defining in global scope.
++-// Other platforms will continue to put things in the proper namespace.
++-#if defined( _MSC_VER )
++-using namespace mp4v2::impl::bmff;
++-#else
++-namespace mp4v2 { namespace impl { namespace bmff {
++-#endif
+++namespace mp4v2 { namespace impl {
++
++ ///////////////////////////////////////////////////////////////////////////////
++
++ template <>
++-const EnumLanguageCode::Entry EnumLanguageCode::data[] = {
+++const bmff::EnumLanguageCode::Entry bmff::EnumLanguageCode::data[] = {
++ { mp4v2::impl::bmff::ILC_AAR, "aar", "Afar" },
++ { mp4v2::impl::bmff::ILC_ABK, "abk", "Abkhazian" },
++ { mp4v2::impl::bmff::ILC_ACE, "ace", "Achinese" },
++@@ -526,9 +519,7 @@
++
++ ///////////////////////////////////////////////////////////////////////////////
++
++-#if defined( _MSC_VER )
++-namespace mp4v2 { namespace impl { namespace bmff {
++-#endif
+++namespace bmff {
++
++ ///////////////////////////////////////////////////////////////////////////////
++
++diff -Naur mp4v2-trunk-r355.orig/src/itmf/type.cpp mp4v2-trunk-r355/src/itmf/type.cpp
++--- mp4v2-trunk-r355.orig/src/itmf/type.cpp 2009-05-21 04:52:29.000000000 +0200
+++++ mp4v2-trunk-r355/src/itmf/type.cpp 2014-02-06 04:18:19.000000000 +0100
++@@ -24,19 +24,12 @@
++
++ #include "impl.h"
++
++-// VStudio idiocy prevents defining template instanced static data
++-// in a namespace. Workaround it by defining in global scope.
++-// Other platforms will continue to put things in the proper namespace.
++-#if defined( _MSC_VER )
++-using namespace mp4v2::impl::itmf;
++-#else
++-namespace mp4v2 { namespace impl { namespace itmf {
++-#endif
+++namespace mp4v2 { namespace impl {
++
++ ///////////////////////////////////////////////////////////////////////////////
++
++ template <>
++-const EnumBasicType::Entry EnumBasicType::data[] = {
+++const itmf::EnumBasicType::Entry itmf::EnumBasicType::data[] = {
++ { mp4v2::impl::itmf::BT_IMPLICIT, "implicit", "implicit" },
++ { mp4v2::impl::itmf::BT_UTF8, "utf8", "UTF-8" },
++ { mp4v2::impl::itmf::BT_UTF16, "utf16", "UTF-16" },
++@@ -64,7 +57,7 @@
++ ///////////////////////////////////////////////////////////////////////////////
++
++ template <>
++-const EnumGenreType::Entry EnumGenreType::data[] = {
+++const itmf::EnumGenreType::Entry itmf::EnumGenreType::data[] = {
++ { mp4v2::impl::itmf::GENRE_BLUES, "blues", "Blues" },
++ { mp4v2::impl::itmf::GENRE_CLASSIC_ROCK, "classicrock", "Classic Rock" },
++ { mp4v2::impl::itmf::GENRE_COUNTRY, "country", "Country" },
++@@ -200,7 +193,7 @@
++ ///////////////////////////////////////////////////////////////////////////////
++
++ template <>
++-const EnumStikType::Entry EnumStikType::data[] = {
+++const itmf::EnumStikType::Entry itmf::EnumStikType::data[] = {
++ { mp4v2::impl::itmf::STIK_OLD_MOVIE, "oldmovie", "Movie" },
++ { mp4v2::impl::itmf::STIK_NORMAL, "normal", "Normal" },
++ { mp4v2::impl::itmf::STIK_AUDIOBOOK, "audiobook", "Audio Book" },
++@@ -216,7 +209,7 @@
++ ///////////////////////////////////////////////////////////////////////////////
++
++ template <>
++-const EnumAccountType::Entry EnumAccountType::data[] = {
+++const itmf::EnumAccountType::Entry itmf::EnumAccountType::data[] = {
++ { mp4v2::impl::itmf::AT_ITUNES, "itunes", "iTunes" },
++ { mp4v2::impl::itmf::AT_AOL, "aol", "AOL" },
++
++@@ -226,7 +219,7 @@
++ ///////////////////////////////////////////////////////////////////////////////
++
++ template <>
++-const EnumCountryCode::Entry EnumCountryCode::data[] = {
+++const itmf::EnumCountryCode::Entry itmf::EnumCountryCode::data[] = {
++ { mp4v2::impl::itmf::CC_USA, "usa", "United States" },
++ { mp4v2::impl::itmf::CC_USA, "fra", "France" },
++ { mp4v2::impl::itmf::CC_DEU, "ger", "Germany" },
++@@ -256,7 +249,7 @@
++ ///////////////////////////////////////////////////////////////////////////////
++
++ template <>
++-const EnumContentRating::Entry EnumContentRating::data[] = {
+++const itmf::EnumContentRating::Entry itmf::EnumContentRating::data[] = {
++ { mp4v2::impl::itmf::CR_NONE, "none", "None" },
++ { mp4v2::impl::itmf::CR_CLEAN, "clean", "Clean" },
++ { mp4v2::impl::itmf::CR_EXPLICIT, "explicit", "Explicit" },
++@@ -266,9 +259,7 @@
++
++ ///////////////////////////////////////////////////////////////////////////////
++
++-#if defined( _MSC_VER )
++-namespace mp4v2 { namespace impl { namespace itmf {
++-#endif
+++namespace itmf {
++
++ ///////////////////////////////////////////////////////////////////////////////
++
diff --git a/multimedia/handbrake/files/patch-contrib_fontconfig_module.defs b/multimedia/handbrake/files/patch-contrib_fontconfig_module.defs
deleted file mode 100644
index 7e5b8114037..00000000000
--- a/multimedia/handbrake/files/patch-contrib_fontconfig_module.defs
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./contrib/fontconfig/module.defs.orig 2010-09-28 18:10:49.000000000 -0400
-+++ ./contrib/fontconfig/module.defs 2011-05-24 05:50:46.060808283 -0400
-@@ -19,6 +19,8 @@
- FONTCONFIG.config_archoption = --with-arch=i386
- else ifeq ($(BUILD.system),linux)
- FONTCONFIG.cc_archoption =
-+else ifeq ($(BUILD.system),freebsd)
-+ FONTCONFIG.cc_archoption =
- else
- FONTCONFIG.cc_archoption = -arch $(FONTCONFIG.GCC.archs)
- FONTCONFIG.config_archoption = --with-arch=$(FONTCONFIG.GCC.archs)
diff --git a/multimedia/handbrake/files/patch-contrib_freetype_module.defs b/multimedia/handbrake/files/patch-contrib_freetype_module.defs
deleted file mode 100644
index 439375baea8..00000000000
--- a/multimedia/handbrake/files/patch-contrib_freetype_module.defs
+++ /dev/null
@@ -1,8 +0,0 @@
---- ./contrib/freetype/module.defs.orig 2010-09-28 18:10:49.000000000 -0400
-+++ ./contrib/freetype/module.defs 2011-05-24 05:50:46.062809316 -0400
-@@ -3,3 +3,5 @@
-
- FREETYPE.FETCH.url = http://download.m0k.org/handbrake/contrib/freetype-2.3.9.tar.gz
- FREETYPE.EXTRACT.tarbase = freetype-2.3.9
-+FREETYPE.CONFIGURE.env.GNUMAKE = GNUMAKE="gmake"
-+FREETYPE.CONFIGURE.env.args += !GNUMAKE
diff --git a/multimedia/handbrake/files/patch-contrib_libass_module.defs b/multimedia/handbrake/files/patch-contrib_libass_module.defs
deleted file mode 100644
index b29f633b495..00000000000
--- a/multimedia/handbrake/files/patch-contrib_libass_module.defs
+++ /dev/null
@@ -1,14 +0,0 @@
---- ./contrib/libass/module.defs.orig 2010-09-28 18:10:49.000000000 -0400
-+++ ./contrib/libass/module.defs 2011-05-24 05:50:46.096807667 -0400
-@@ -7,9 +7,9 @@
- # Disable as many external dependencies as I can get away with
- # and tell configure where to find our version of freetype
- LIBASS.CONFIGURE.extra = \
-- --disable-png --disable-enca \
-+ --disable-png --disable-enca --disable-harfbuzz \
- FREETYPE_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lfreetype" \
-- FREETYPE_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include/freetype2" \
-+ FREETYPE_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include/freetype2 -I/usr/local/include" \
- FONTCONFIG_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lfontconfig" \
- FONTCONFIG_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include"
-
diff --git a/multimedia/handbrake/files/patch-custom.defs b/multimedia/handbrake/files/patch-custom.defs
new file mode 100644
index 00000000000..b361f9cad19
--- /dev/null
+++ b/multimedia/handbrake/files/patch-custom.defs
@@ -0,0 +1,19 @@
+--- /dev/null 2014-02-09 17:00:00.000000000 +0100
++++ custom.defs 2014-02-09 16:52:59.125808519 +0100
+@@ -0,0 +1,16 @@
++################################################################################
++# for Generic GCC custom setting
++
++GCC.gcc = %%REP_CC%%
++GCC.gxx = %%REP_CXX%%
++GCC.archs = %%REP_ARCHS%%
++GCC.args.I += %%REP_I%%
++GCC.args.L += %%REP_L%%
++
++
++################################################################################
++# for CLI custom setting
++
++LIBHB.GCC.D += SYS_FREEBSD
++TEST.GCC.l += pthread m %%REP_ICONV%%
++
diff --git a/multimedia/handbrake/files/patch-libhb_module.defs b/multimedia/handbrake/files/patch-libhb_module.defs
deleted file mode 100644
index e28b7fa6555..00000000000
--- a/multimedia/handbrake/files/patch-libhb_module.defs
+++ /dev/null
@@ -1,12 +0,0 @@
---- ./libhb/module.defs.orig 2010-10-23 13:21:56.000000000 -0400
-+++ ./libhb/module.defs 2011-05-24 05:50:46.097808812 -0400
-@@ -47,6 +47,9 @@
- LIBHB.c += $(wildcard $(LIBHB.src/)platform/macosx/*.c)
- else ifeq ($(BUILD.system),linux)
- LIBHB.GCC.D += SYS_LINUX _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64
-+else ifeq ($(BUILD.system),freebsd)
-+ LIBHB.GCC.D += SYS_FREEBSD
-+ LIBHB.GCC.I += /usr/local/include
- else ifeq ($(BUILD.system),mingw)
- LIBHB.GCC.D += SYS_MINGW PTW32_STATIC_LIB
- LIBHB.GCC.args.extra.dylib++ += -Wl,--enable-auto-import -static
diff --git a/multimedia/handbrake/files/patch-make_include_contrib.defs b/multimedia/handbrake/files/patch-make_include_contrib.defs
index 33d27bd7e2f..4bde4643a92 100644
--- a/multimedia/handbrake/files/patch-make_include_contrib.defs
+++ b/multimedia/handbrake/files/patch-make_include_contrib.defs
@@ -1,22 +1,44 @@
---- ./make/include/contrib.defs.orig 2010-04-25 17:15:43.000000000 -0400
-+++ ./make/include/contrib.defs 2011-05-24 05:50:46.071806770 -0400
-@@ -28,7 +28,7 @@
- $(1).FETCH.url = FETCH_IS_UNDEFINED
- $(1).FETCH.target = $$($(1).FETCH.tar)
- define $(1).FETCH
-- $$(call FETCH,$$@,$$($(1).FETCH.url))
-+# $$(call FETCH,$$@,$$($(1).FETCH.url))
- endef
+--- make/include/contrib.defs.orig 2011-08-26 21:35:18.802615405 +0900
++++ make/include/contrib.defs 2011-08-26 21:35:24.468798054 +0900
+@@ -204,26 +204,26 @@
+ ##
+ ## target: fetch
+ ##
+-$($(1).name).fetch: $$($(1).FETCH.target)
+-
+-$$($(1).FETCH.target): | $$(dir $$($(1).FETCH.target))
+- $$($(1).FETCH)
++#$($(1).name).fetch: $$($(1).FETCH.target)
++#
++#$$($(1).FETCH.target): | $$(dir $$($(1).FETCH.target))
++# $$($(1).FETCH)
- ##
-@@ -38,8 +38,8 @@
- $(1).EXTRACT.dir/ = $$($(1).build/)$$($(1).EXTRACT.tarbase)/
- $(1).EXTRACT.target = $$($(1).build/).stamp.extract
- define $(1).EXTRACT
-- $$(RM.exe) -fr $$($(1).EXTRACT.dir/)
-- $$(TAR.exe) xfC $$($(1).FETCH.tar) $$($(1).build/)
-+# $$(RM.exe) -fr $$($(1).EXTRACT.dir/)
-+# $$(TAR.exe) xfC $$($(1).FETCH.tar) $$($(1).build/)
- $$(TOUCH.exe) $$@
- endef
+ ##
+ ## target: extract
+ ## must touch dir after extraction because old timestamp is restored via tar.
+ ##
+-$($(1).name).extract: $$($(1).EXTRACT.target)
+-
+-$$($(1).EXTRACT.target): | $$(dir $$($(1).EXTRACT.target))
+-$$($(1).EXTRACT.target): $$($(1).FETCH.target)
+- $$($(1).EXTRACT)
+-
+-$($(1).name).extract.touch:
+- $$(TOUCH.exe) $$($(1).EXTRACT.target)
+-
+-$($(1).name).extract.untouch:
+- $$(RM.exe) -f $$($(1).EXTRACT.target)
++#$($(1).name).extract: $$($(1).EXTRACT.target)
++#
++#$$($(1).EXTRACT.target): | $$(dir $$($(1).EXTRACT.target))
++#$$($(1).EXTRACT.target): $$($(1).FETCH.target)
++# $$($(1).EXTRACT)
++#
++#$($(1).name).extract.touch:
++# $$(TOUCH.exe) $$($(1).EXTRACT.target)
++#
++#$($(1).name).extract.untouch:
++# $$(RM.exe) -f $$($(1).EXTRACT.target)
+ ##
+ ## target: patch
diff --git a/multimedia/handbrake/files/patch-make_include_gcc.defs b/multimedia/handbrake/files/patch-make_include_gcc.defs
new file mode 100644
index 00000000000..5c5d80221a5
--- /dev/null
+++ b/multimedia/handbrake/files/patch-make_include_gcc.defs
@@ -0,0 +1,20 @@
+--- make/include/gcc.defs.orig 2011-08-22 15:08:08.322100000 +0900
++++ make/include/gcc.defs 2011-10-15 20:34:17.737925255 +0900
+@@ -47,7 +47,7 @@
+ GCC.args.ML = -fmessage-length=0
+ GCC.args.H = -H
+ GCC.args.W = -W$(1)
+-GCC.args.archs = -arch $(1)
++GCC.args.archs = -march=$(1)
+ GCC.args.sysroot = --sysroot=$(1)
+ GCC.args.ldsysroot = -syslibroot $(1)
+ GCC.args.minver = -mmacosx-version-min=$(1)
+@@ -85,7 +85,7 @@
+
+ define import.GCC
+ $(1).GCC.gcc = $$(GCC.gcc)
+- $(1).GCC.gxx = $$(dir $$($(1).GCC.gcc))$$(subst gcc,g++,$$(notdir $$($(1).GCC.gcc)))
++ $(1).GCC.gxx = $$(if $$(filter ./,$$(dir $$($(1).GCC.gcc))),,$$(dir $$($(1).GCC.gcc)))$$(subst gcc,g++,$$(notdir $$($(1).GCC.gcc)))
+
+ $(1).GCC.pipe = $$(GCC.pipe)
+ $(1).GCC.strip = $$(if $$(filter none,$$($(1).GCC.g)),1)
diff --git a/multimedia/handbrake/files/patch-test_module.defs b/multimedia/handbrake/files/patch-test_module.defs
deleted file mode 100644
index 575876503e1..00000000000
--- a/multimedia/handbrake/files/patch-test_module.defs
+++ /dev/null
@@ -1,23 +0,0 @@
---- ./test/module.defs.orig 2010-09-28 18:10:49.000000000 -0400
-+++ ./test/module.defs 2011-05-24 05:50:46.097808812 -0400
-@@ -10,8 +10,8 @@
- TEST.exe = $(BUILD/)$(call TARGET.exe,$(HB.name)CLI)
-
- TEST.libs = $(LIBHB.a) $(foreach n, \
-- a52 ass avcodec avformat avutil dca dvdnav dvdread faac fontconfig freetype mkv mpeg2 mp3lame mp4v2 \
-- ogg samplerate swscale theora vorbis vorbisenc x264 xml2 bluray, \
-+ a52 ass avformat avcodec avutil dca dvdnav dvdread faac fontconfig freetype mkv mpeg2 mp3lame mp4v2 \
-+ samplerate swscale theora vorbis vorbisenc ogg x264 xml2 bluray, \
- $(CONTRIB.build/)lib/lib$(n).a )
-
- TEST.install.exe = $(DESTDIR)$(PREFIX/)bin/$(notdir $(TEST.exe))
-@@ -50,6 +50,9 @@
- TEST.GCC.l += iconv
- else ifeq ($(BUILD.system),linux)
- TEST.GCC.l += pthread dl m
-+else ifeq ($(BUILD.system),freebsd)
-+ TEST.GCC.l += pthread iconv
-+ TEST.GCC.L += /usr/local/lib
- else ifeq ($(BUILD.system),solaris)
- TEST.GCC.l += pthread nsl socket
- else ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system))