Index: head/multimedia/handbrake/Makefile =================================================================== --- head/multimedia/handbrake/Makefile (revision 518317) +++ head/multimedia/handbrake/Makefile (revision 518318) @@ -1,119 +1,118 @@ # Created by: Andrew Thompson # $FreeBSD$ PORTNAME= handbrake DISTVERSION= 1.2.2 PORTREVISION= 1 CATEGORIES= multimedia DIST_SUBDIR= ${PORTNAME} MAINTAINER= naito.yuichiro@gmail.com COMMENT= Versatile DVD ripper and video transcoder LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING -ONLY_FOR_ARCHS= amd64 i386 -ONLY_FOR_ARCHS_REASON= invokes x86 assembler +ONLY_FOR_ARCHS= amd64 i386 powerpc64 BUILD_DEPENDS= bash:shells/bash \ nasm:devel/nasm \ cmake:devel/cmake LIB_DEPENDS= libdbus-1.so:devel/dbus \ libharfbuzz.so:print/harfbuzz \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libfribidi.so:converters/fribidi \ libxml2.so:textproc/libxml2 \ libass.so:multimedia/libass \ libspeex.so:audio/speex \ libogg.so:audio/libogg \ libvorbis.so:audio/libvorbis \ libvorbisenc.so:audio/libvorbis \ libtheoradec.so:multimedia/libtheora \ libtheoraenc.so:multimedia/libtheora \ libsamplerate.so:audio/libsamplerate \ libx264.so:multimedia/libx264 \ libmp3lame.so:audio/lame \ libopus.so:audio/opus \ libjansson.so:devel/jansson CONTRIB_FILES= fdk-aac-0.1.5.tar.gz \ ffmpeg-4.1.tar.bz2 \ libbluray-1.0.2.tar.bz2 \ libdvdnav-6.0.0.tar.bz2 \ libdvdread-6.0.0.tar.bz2 \ libvpx-1.7.0.tar.gz \ x265_2.9.tar.gz MASTER_SITES+= https://download.handbrake.fr/contrib/:contrib DISTFILES+= ${CONTRIB_FILES:S/$/:contrib/} .if !defined(PACKAGE_BUILDING) # DVDCSS version hardcoded in contrib/libdvdread/libdvdread-5.0.0-6-gcb1ae87/src/dvd_input.c (dlopen'ed) LIB_DEPENDS+= libdvdcss.so:multimedia/libdvdcss .endif GNU_CONFIGURE= yes -USES= autoreconf:build compiler:features gmake iconv \ +USES= autoreconf:build compiler:c11 gmake iconv \ libtool:build localbase:ldflags pkgconfig python:2.7,build MAKE_ENV= V=1 ACLOCAL=${LOCALBASE}/bin/aclocal USE_GITHUB= yes GH_ACCOUNT= HandBrake GH_PROJECT= HandBrake CONFIGURE_ARGS= --force --enable-x265 CONFIGURE_TARGET= build BUILD_WRKSRC= ${WRKSRC}/build INSTALL_WRKSRC= ${WRKSRC}/build MAKEFILE= GNUmakefile ALL_TARGET= # INSTALL_TARGET= install-strip NOPRECIOUSMAKEVARS= yes # for ffmpeg and x264 # Enforce linking to bundled libraries instead of system libraries LDFLAGS+= -L${BUILD_WRKSRC}/contrib/lib OPTIONS_DEFINE= FDK_AAC X11 OPTIONS_DEFAULT= X11 OPTIONS_SUB= yes FDK_AAC_DESC= Enable non-free Fraunhofer FDK AAC codec X11_DESC= Build GTK+3 based GUI program FDK_AAC_CONFIGURE_ENABLE= fdk-aac FDK_AAC_VARS= LICENSE+=FDK_AAC LICENSE_COMB=multi LICENSE_NAME_FDK_AAC= Software License for The Fraunhofer FDK AAC Codec Library for Android LICENSE_FILE_FDK_AAC= ${WRKDIR}/${DISTFILES:Mfdk*:R:R}/NOTICE LICENSE_PERMS_FDK_AAC= dist-mirror pkg-mirror auto-accept X11_CONFIGURE_ENV= COMPILER_PATH=${LOCALBASE}/bin X11_MAKE_ENV= COMPILER_PATH=${LOCALBASE}/bin X11_CONFIGURE_ON= --disable-gtk-update-checks X11_CONFIGURE_OFF= --disable-gtk X11_LIB_DEPENDS= libvpx.so:multimedia/libvpx \ libnotify.so:devel/libnotify X11_USES= gettext desktop-file-utils gnome X11_USE= gstreamer1=gdkpixbuf,libav \ gnome=gtk30,intltool,cairo,gdkpixbuf2 # HandBrake tries to fetch its dependencies during build phase, which is not -# considered good in FreeBSD. Instead, we will provided the downloaded files. +# considered good in FreeBSD. Instead, we will provide the downloaded files. post-extract: .SILENT ${MKDIR} ${WRKSRC}/download .for f in ${CONTRIB_FILES} ${CP} ${DISTDIR}/${DIST_SUBDIR}/${f} ${WRKSRC}/download .endfor # Install version information. ${CP} ${FILESDIR}/version.txt ${WRKSRC} # Following patches reduces warnings with clang. ${CP} ${FILESDIR}/P00-freebsd-libavutil-x86-asm-h.patch ${WRKSRC}/contrib/ffmpeg ${CP} ${FILESDIR}/P01-freebsd-ifo_types.h.patch ${WRKSRC}/contrib/libdvdread post-install-X11-on: ${LN} -sf ghb ${STAGEDIR}${PREFIX}/bin/HandBrake .include Index: head/multimedia/handbrake/files/patch-contrib_libvpx_P05-freebsd-ppc.patch =================================================================== --- head/multimedia/handbrake/files/patch-contrib_libvpx_P05-freebsd-ppc.patch (nonexistent) +++ head/multimedia/handbrake/files/patch-contrib_libvpx_P05-freebsd-ppc.patch (revision 518318) @@ -0,0 +1,14 @@ +--- contrib/libvpx/P05-freebsd-ppc.patch.orig 2019-11-12 14:12:26 UTC ++++ contrib/libvpx/P05-freebsd-ppc.patch +@@ -0,0 +1,11 @@ ++--- libvpx-1.7.0/vpx_ports/ppc_cpudetect.c.orig 2019-11-12 15:11:30.139706000 +0100 +++++ libvpx-1.7.0/vpx_ports/ppc_cpudetect.c ++@@ -11,8 +11,6 @@ ++ #include ++ #include ++ #include ++-#include ++-#include ++ ++ #include "./vpx_config.h" ++ #include "vpx_ports/ppc.h" Property changes on: head/multimedia/handbrake/files/patch-contrib_libvpx_P05-freebsd-ppc.patch ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/multimedia/handbrake/files/patch-contrib_x265_P01-freebsd-ppc.patch =================================================================== --- head/multimedia/handbrake/files/patch-contrib_x265_P01-freebsd-ppc.patch (nonexistent) +++ head/multimedia/handbrake/files/patch-contrib_x265_P01-freebsd-ppc.patch (revision 518318) @@ -0,0 +1,53 @@ +--- contrib/x265/P01-freebsd-ppc.patch.orig 2019-11-12 19:13:27 UTC ++++ contrib/x265/P01-freebsd-ppc.patch +@@ -0,0 +1,50 @@ ++--- x265_2.9/source/common/cpu.cpp.orig 2019-11-12 20:19:28.629150000 +0100 +++++ x265_2.9/source/common/cpu.cpp ++@@ -127,6 +127,7 @@ ++ { ++ return(enable512); ++ } +++ ++ uint32_t cpu_detect(bool benableavx512 ) ++ { ++ ++--- x265_2.9/source/common/quant.cpp.orig 2019-11-12 20:19:34.848807000 +0100 +++++ x265_2.9/source/common/quant.cpp ++@@ -723,6 +723,7 @@ ++ X265_CHECK(coeffNum[cgScanPos] == 0, "count of coeff failure\n"); ++ uint32_t scanPosBase = (cgScanPos << MLS_CG_SIZE); ++ uint32_t blkPos = codeParams.scan[scanPosBase]; +++#if X265_ARCH_X86 ++ bool enable512 = detect512(); ++ if (enable512) ++ primitives.cu[log2TrSize - 2].psyRdoQuant(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos); ++@@ -731,6 +732,10 @@ ++ primitives.cu[log2TrSize - 2].psyRdoQuant_1p(m_resiDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost,blkPos); ++ primitives.cu[log2TrSize - 2].psyRdoQuant_2p(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos); ++ } +++#else +++ primitives.cu[log2TrSize - 2].psyRdoQuant_1p(m_resiDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, blkPos); +++ primitives.cu[log2TrSize - 2].psyRdoQuant_2p(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos); +++#endif ++ } ++ } ++ else ++@@ -805,6 +810,7 @@ ++ uint32_t blkPos = codeParams.scan[scanPosBase]; ++ if (usePsyMask) ++ { +++#if X265_ARCH_X86 ++ bool enable512 = detect512(); ++ ++ if (enable512) ++@@ -814,6 +820,10 @@ ++ primitives.cu[log2TrSize - 2].psyRdoQuant_1p(m_resiDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, blkPos); ++ primitives.cu[log2TrSize - 2].psyRdoQuant_2p(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos); ++ } +++#else +++ primitives.cu[log2TrSize - 2].psyRdoQuant_1p(m_resiDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, blkPos); +++ primitives.cu[log2TrSize - 2].psyRdoQuant_2p(m_resiDctCoeff, m_fencDctCoeff, costUncoded, &totalUncodedCost, &totalRdCost, &psyScale, blkPos); +++#endif ++ blkPos = codeParams.scan[scanPosBase]; ++ for (int y = 0; y < MLS_CG_SIZE; y++) ++ { Property changes on: head/multimedia/handbrake/files/patch-contrib_x265_P01-freebsd-ppc.patch ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/multimedia/handbrake/files/patch-make_variant_freebsd.defs =================================================================== --- head/multimedia/handbrake/files/patch-make_variant_freebsd.defs (nonexistent) +++ head/multimedia/handbrake/files/patch-make_variant_freebsd.defs (revision 518318) @@ -0,0 +1,8 @@ +--- make/variant/freebsd.defs.orig 2019-02-22 17:23:51.000000000 +0100 ++++ make/variant/freebsd.defs 2019-11-17 20:08:28.821497000 +0100 +@@ -15,4 +15,4 @@ + + GCC.MAJOR_VERSION = $(shell $(GCC.gcc) -dumpversion | cut -f 1 -d .) + GCC.LDFLAGS = -lc++ -Wl,-rpath=$(LOCALBASE)/lib/gcc$(GCC.MAJOR_VERSION) +-LDFLAGS += $(if $(findstring gcc, $(GCC.gcc)), $(GCC.LDFLAGS), ) ++LDFLAGS += $(if $(findstring gcc, $(GCC.gcc)), $(if $(findstring x86, $(GCC.archs)), $(GCC.LDFLAGS), ), ) Property changes on: head/multimedia/handbrake/files/patch-make_variant_freebsd.defs ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property