From b2e7e72476fa42639184f2c0fbf00ac9e7658867 Mon Sep 17 00:00:00 2001 From: Alexander Leidinger Date: Sun, 29 Mar 2015 20:13:07 +0000 Subject: [PATCH] - update to 10.1 - new vpx support in 10.x is disabled (build problems) - this is all but quick, and surely a dirty update (e.g. the CC hack in the port-Makefile) - at least it doesn't segfault on startup like the 9.9 this replaces - this port needs a maintainer which is able to handle more than 50 shades of grey --- multimedia/handbrake/Makefile | 65 +++++++++++-------- multimedia/handbrake/distinfo | 36 +++++----- ...patch-build_contrib_x264_x264_common_cpu.c | 29 --------- .../patch-build_contrib_x264_x264_configure | 23 ------- .../files/patch-make_include_gcc.defs | 9 --- .../files/patch-make_include_main.defs | 15 ++++- 6 files changed, 69 insertions(+), 108 deletions(-) delete mode 100644 multimedia/handbrake/files/patch-build_contrib_x264_x264_common_cpu.c diff --git a/multimedia/handbrake/Makefile b/multimedia/handbrake/Makefile index 27fdcdcd4114..acd9c3e234ea 100644 --- a/multimedia/handbrake/Makefile +++ b/multimedia/handbrake/Makefile @@ -2,25 +2,26 @@ # $FreeBSD$ PORTNAME= handbrake -PORTVERSION= 0.9.9 -PORTREVISION= 3 +PORTVERSION= 0.10.1 +#PORTREVISION= 1 CATEGORIES= multimedia -MASTER_SITES= SF/${PORTNAME}/${PORTVERSION} \ - http://download.handbrake.fr/handbrake/contrib/:contrib +MASTER_SITES= http://download.handbrake.fr/releases/${PORTVERSION}/ \ + http://download.handbrake.fr/handbrake/contrib/:contrib \ + http://download.handbrake.fr/contrib/:contrib DISTFILES= HandBrake-${PORTVERSION}.tar.bz2 \ a52dec-0.7.4.tar.gz:contrib \ faac-1.28.tar.gz:contrib \ faad2-2.7.tar.gz:contrib \ - libav-v9.6.tar.bz2:contrib \ + fdk-aac-v0.1.1-6-gbae4553.tar.bz2:contrib \ + libav-v10.1.tar.bz2:contrib \ lame-3.98.tar.gz:contrib \ - libbluray-0.2.3.tar.bz2:contrib \ + libbluray-0.5.0.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 \ - mp4v2-trunk-r355.tar.bz2:contrib \ - mpeg2dec-0.5.1.tar.gz:contrib \ - x264-r2273-b3065e6.tar.gz:contrib + libdvdnav-5.0.1-0-gaa3659d.tar.gz:contrib \ + libdvdread-5.0.0-6-gcb1ae87.tar.gz:contrib \ + libvpx-v1.3.0.tar.bz2:contrib \ + x264-r2479-dd79a61.tar.gz:contrib \ + x265-9329-0d30d2641875-1.5.tar.bz2:contrib DIST_SUBDIR= ${PORTNAME} MAINTAINER= ports@FreeBSD.org @@ -75,6 +76,8 @@ BUILD_DEPENDS+= ${LOCALBASE}/bin/ld:${PORTSDIR}/devel/binutils CONFIGURE_ENV+= COMPILER_PATH=${LOCALBASE}/bin MAKE_ENV+= COMPILER_PATH=${LOCALBASE}/bin .endif +CC!=/usr/bin/which ${CC} +MAKE_ENV+=ACLOCAL=${LOCALBASE}/bin/aclocal .if ${PORT_OPTIONS:MX11} CONFIGURE_ARGS+= --disable-gtk-update-checks --disable-gst @@ -83,7 +86,7 @@ LIBS+= -L${LOCALBASE}/lib LIB_DEPENDS+= libdbus-glib-1.so:${PORTSDIR}/devel/dbus-glib \ libnotify.so:${PORTSDIR}/devel/libnotify USES+= gettext -USE_GNOME+= gtk20 +USE_GNOME+= gtk30 PLIST_FILES+= bin/HandBrake .else CONFIGURE_ARGS+= --disable-gtk @@ -100,43 +103,52 @@ LDFLAGS+= -lstdc++ # 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 mpeg2dec x264 +.for d in a52dec lame libdca 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 libbluray libmkv mp4v2 + cd ${BUILD_WRKSRC}/contrib && ${MKDIR} faac faad2 fdkaac ffmpeg libbluray libdvdnav \ + libdvdread libvpx x265 ${MV} ${WRKDIR}/faac-1.28 ${BUILD_WRKSRC}/contrib/faac ${MV} ${WRKDIR}/faad2-2.7 ${BUILD_WRKSRC}/contrib/faad2 - ${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}/mp4v2-trunk-r355 ${BUILD_WRKSRC}/contrib/mp4v2 + ${MV} ${WRKDIR}/fdk-aac-v0.1.1-6-gbae4553 ${BUILD_WRKSRC}/contrib/fdkaac + ${MV} ${WRKDIR}/libav-v10.1 ${BUILD_WRKSRC}/contrib/ffmpeg/libav-v10.1 + ${MV} ${WRKDIR}/libbluray-0.5.0 ${BUILD_WRKSRC}/contrib/libbluray + ${MV} ${WRKDIR}/libdvdnav-5.0.1-0-gaa3659d ${BUILD_WRKSRC}/contrib/libdvdnav + ${MV} ${WRKDIR}/libdvdread-5.0.0-6-gcb1ae87 ${BUILD_WRKSRC}/contrib/libdvdread + ${MV} ${WRKDIR}/libvpx-v1.3.0 ${BUILD_WRKSRC}/contrib/libvpx + ${MV} ${WRKDIR}/x265-9329-0d30d2641875-1.5 ${BUILD_WRKSRC}/contrib/x265 # 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/fdkaac/.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/libvpx/.stamp.extract ${TOUCH} ${BUILD_WRKSRC}/contrib/x264/.stamp.extract + ${TOUCH} ${BUILD_WRKSRC}/contrib/x265/.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.2.3/configure.ac + @${REINPLACE_CMD} -e 's|-ldl|-lc| ; s|\[dl\]|[c]| ; s|ACLOCAL=.*|ACLOCAL=aclocal|g' \ + ${BUILD_WRKSRC}/contrib/libbluray/libbluray-0.5.0/configure + @${REINPLACE_CMD} -e 's|ACLOCAL = @ACLOCAL@|ACLOCAL = ${LOCALBASE}/bin/aclocal|g' \ + -e 's|-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT||g' \ + ${BUILD_WRKSRC}/contrib/libbluray/libbluray-0.5.0/Makefile.in \ + ${BUILD_WRKSRC}/contrib/libbluray/libbluray-0.5.0/src/Makefile.in @${REINPLACE_CMD} \ -e '/GHB_PACKAGES=/s/gthread-2.0/& gmodule-2.0/' \ -e 's/-lhb/& ${ICONV_LIB}/' \ + -e 's:-lxml2:& ../../contrib/lib/libx265.a ../../contrib/lib/libfdk-aac.a:g' \ ${WRKSRC}/gtk/configure.ac @${REINPLACE_CMD} -e 's| ${WRKDIR}/A02-gwluserdata.patch - ${MV} ${WRKDIR}/A02-gwluserdata.patch ${WRKSRC}/contrib/mpeg2dec/ + @${TR} -d '\r' < ${WRKSRC}/contrib/ffmpeg/A06-frame-threading-state.patch > ${WRKDIR}/A06-frame-threading-state.patch + @${MV} ${WRKDIR}/A06-frame-threading-state.patch ${WRKSRC}/contrib/ffmpeg/ + @${REINPLACE_CMD} -e 's:/lib/cpp:${CPP}:g' ${BUILD_WRKSRC}/contrib/fdkaac/fdk-aac-v0.1.1-6-gbae4553/configure @${REINPLACE_CMD} -E \ -e 's|%%REP_CC%%|${CC}|g' \ -e 's|%%REP_CXX%%|${CXX}|g' \ diff --git a/multimedia/handbrake/distinfo b/multimedia/handbrake/distinfo index a5748bc2a300..eb952dd0985a 100644 --- a/multimedia/handbrake/distinfo +++ b/multimedia/handbrake/distinfo @@ -1,28 +1,28 @@ -SHA256 (handbrake/HandBrake-0.9.9.tar.bz2) = a71dd774104cda00cfb51a813550351d638253791f2f419d04a66f3158a835b3 -SIZE (handbrake/HandBrake-0.9.9.tar.bz2) = 9315199 +SHA256 (handbrake/HandBrake-0.10.1.tar.bz2) = 7ea42031fd4d5efd04903a9aae79c952c50fd43b6f7bf08fd1a93f6b358a23f5 +SIZE (handbrake/HandBrake-0.10.1.tar.bz2) = 10441776 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/libav-v9.6.tar.bz2) = ea41941866fb64d7e363684a4705574f65786bd9eb0fe1f796dee4c0d459aa52 -SIZE (handbrake/libav-v9.6.tar.bz2) = 4672723 +SHA256 (handbrake/fdk-aac-v0.1.1-6-gbae4553.tar.bz2) = f08584d59a02db5facf548ae860c64d2870db63477f605af763c161a1508dcbc +SIZE (handbrake/fdk-aac-v0.1.1-6-gbae4553.tar.bz2) = 1843256 +SHA256 (handbrake/libav-v10.1.tar.bz2) = bc3807426d4e73fe8c245730b0df4ba95766cf7e17e47c738ee302f73d066ac9 +SIZE (handbrake/libav-v10.1.tar.bz2) = 5325944 SHA256 (handbrake/lame-3.98.tar.gz) = 40235e84dfe4760ad3f352590a64b7bda1502a386c97d06229df356426e37686 SIZE (handbrake/lame-3.98.tar.gz) = 1411318 -SHA256 (handbrake/libbluray-0.2.3.tar.bz2) = 2c65cfb02aeec31721f9ea65ee2c085a9bfe163e99dd01b52ccb3f53ba205eea -SIZE (handbrake/libbluray-0.2.3.tar.bz2) = 465239 +SHA256 (handbrake/libbluray-0.5.0.tar.bz2) = d414b548ff97c081e1a2f337c0904f44e65d91a00d2efa4a46a1ecd3de285b4d +SIZE (handbrake/libbluray-0.5.0.tar.bz2) = 555298 SHA256 (handbrake/libdca-r81-strapped.tar.gz) = ab2519af6c2f12411a2bd674b83615af9b0d5fb09f28ad5dab714ea1bfab9df1 SIZE (handbrake/libdca-r81-strapped.tar.gz) = 523282 -SHA256 (handbrake/libdvdnav-svn1168.tar.gz) = 7cf4ff6ab0b5d3db3c300fc3cdb24e1ad59f22dd90352df075a604bc698d01c7 -SIZE (handbrake/libdvdnav-svn1168.tar.gz) = 1844832 -SHA256 (handbrake/libdvdread-svn1168.tar.gz) = a489b618962e31a2b151b2e6d7b0c3fcb42cccc196ec7cb352c559898c3f1f1e -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/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-r2273-b3065e6.tar.gz) = 956c82c9318740ef3744cf6e752fb6181be0716273e2e8976306624f0864a815 -SIZE (handbrake/x264-r2273-b3065e6.tar.gz) = 681489 +SHA256 (handbrake/libdvdnav-5.0.1-0-gaa3659d.tar.gz) = 574b7af7ff52e21048ab62c0b14271e651faafb5d46f8efc64dbd82ff34e162b +SIZE (handbrake/libdvdnav-5.0.1-0-gaa3659d.tar.gz) = 127921 +SHA256 (handbrake/libdvdread-5.0.0-6-gcb1ae87.tar.gz) = d2e4200c3c5d5f812892f9c14851c94e2f707d54e7328946c6397ac999f15f17 +SIZE (handbrake/libdvdread-5.0.0-6-gcb1ae87.tar.gz) = 124494 +SHA256 (handbrake/libvpx-v1.3.0.tar.bz2) = d3dcc8d84af51c6c382b214397c62402e37a799e8ebcda6f4217aef0010451a9 +SIZE (handbrake/libvpx-v1.3.0.tar.bz2) = 2084229 +SHA256 (handbrake/x264-r2479-dd79a61.tar.gz) = 7307a83085f4110f8ae690748f00b5acb4882ec34b83ef260fec264c018c49e9 +SIZE (handbrake/x264-r2479-dd79a61.tar.gz) = 785781 +SHA256 (handbrake/x265-9329-0d30d2641875-1.5.tar.bz2) = ff9ef4c9aae3b20497b4d1630bd89c1079a7904ac01227ba35366b9c5f9586d4 +SIZE (handbrake/x265-9329-0d30d2641875-1.5.tar.bz2) = 588124 diff --git a/multimedia/handbrake/files/patch-build_contrib_x264_x264_common_cpu.c b/multimedia/handbrake/files/patch-build_contrib_x264_x264_common_cpu.c deleted file mode 100644 index 878e8517567e..000000000000 --- a/multimedia/handbrake/files/patch-build_contrib_x264_x264_common_cpu.c +++ /dev/null @@ -1,29 +0,0 @@ ---- ./build/contrib/x264/x264/common/cpu.c.orig 2010-12-14 15:00:07.000000000 -0500 -+++ ./build/contrib/x264/x264/common/cpu.c 2011-05-24 05:50:46.053810885 -0400 -@@ -237,7 +237,7 @@ - - #elif ARCH_PPC - --#if SYS_MACOSX || SYS_OPENBSD -+#if SYS_MACOSX || SYS_OPENBSD || SYS_FREEBSD - #include - uint32_t x264_cpu_detect( void ) - { -@@ -245,12 +245,16 @@ - uint32_t cpu = 0; - #if SYS_OPENBSD - int selectors[2] = { CTL_MACHDEP, CPU_ALTIVEC }; --#else -+#elif SYS_MACOSX - int selectors[2] = { CTL_HW, HW_VECTORUNIT }; - #endif - int has_altivec = 0; - size_t length = sizeof( has_altivec ); -+#if SYS_MACOSX || SYS_OPENBSD - int error = sysctl( selectors, 2, &has_altivec, &length, NULL, 0 ); -+#else -+ int error = sysctlbyname("hw.altivec", &has_altivec, &length, NULL, 0 ); -+#endif - - if( error == 0 && has_altivec != 0 ) - cpu |= X264_CPU_ALTIVEC; diff --git a/multimedia/handbrake/files/patch-build_contrib_x264_x264_configure b/multimedia/handbrake/files/patch-build_contrib_x264_x264_configure index 82993b845bdb..0d1bc0fcb91a 100644 --- a/multimedia/handbrake/files/patch-build_contrib_x264_x264_configure +++ b/multimedia/handbrake/files/patch-build_contrib_x264_x264_configure @@ -26,29 +26,6 @@ [ ${arg#-L} != $arg ] && arg=-libpath:${arg#-L} [ $arg = -Wl,--large-address-aware ] && arg=-largeaddressaware [ $arg = -s ] && arg= -@@ -396,10 +396,10 @@ - host_os="${host#*-}" - - # test for use of Intel Compiler --if [[ $host_os = mingw* || $host_os = cygwin* ]]; then -- if [[ `basename "$CC"` = icl* ]]; then -+if [ -z "${host_os%%mingw*}" -o -z "${host_os%%cygwin*}" ]; then -+ if [ "${CC%%icl*}" != "${CC}" ]; then - # Windows Intel Compiler creates dependency generation with absolute Windows paths, Cygwin's make does not support Windows paths. -- [[ $host_os = cygwin* ]] && die "Windows Intel Compiler support requires MSYS" -+ [ -z "${host_os%%cygwin*}" ] && die "Windows Intel Compiler support requires MSYS" - compiler=ICL - CFLAGS="$CFLAGS -Qstd=c99 -nologo -Qms0 -DHAVE_STRING_H -Iextras" - QPRE="-Q" -@@ -408,7 +408,7 @@ - cpp_check "" "" "_MSC_VER >= 1400" || die "Windows Intel Compiler support requires Visual Studio 2005 or newer" - fi - else -- if [[ `basename "$CC"` = icc* ]]; then -+ if [ "${CC%%icc*}" != "${CC}" ]; then - AR="xiar" - compiler=ICC - QPRE="-" @@ -496,11 +496,15 @@ AS="yasm" ASFLAGS="$ASFLAGS -O2" diff --git a/multimedia/handbrake/files/patch-make_include_gcc.defs b/multimedia/handbrake/files/patch-make_include_gcc.defs index 5c5d80221a5f..7bca41333bde 100644 --- a/multimedia/handbrake/files/patch-make_include_gcc.defs +++ b/multimedia/handbrake/files/patch-make_include_gcc.defs @@ -9,12 +9,3 @@ 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-make_include_main.defs b/multimedia/handbrake/files/patch-make_include_main.defs index 19eee7e980ff..d741d565c6a6 100644 --- a/multimedia/handbrake/files/patch-make_include_main.defs +++ b/multimedia/handbrake/files/patch-make_include_main.defs @@ -1,6 +1,15 @@ ---- ./make/include/main.defs.orig 2012-06-09 05:45:19.000000000 +0800 -+++ ./make/include/main.defs 2012-08-23 16:08:07.000000000 +0800 -@@ -88,6 +88,11 @@ +--- make/include/main.defs.orig 2014-10-16 01:32:41.000000000 +0200 ++++ make/include/main.defs 2015-03-29 17:09:49.690928000 +0200 +@@ -62,7 +62,7 @@ + endif + + MODULES += contrib/ffmpeg +-MODULES += contrib/libvpx ++#MODULES += contrib/libvpx + MODULES += contrib/libdvdread + MODULES += contrib/libdvdnav + MODULES += contrib/libbluray +@@ -125,6 +125,11 @@ MODULES += gtk endif