Index: head/multimedia/handbrake/Makefile =================================================================== --- head/multimedia/handbrake/Makefile (revision 438042) +++ head/multimedia/handbrake/Makefile (revision 438043) @@ -1,126 +1,130 @@ # Created by: Andrew Thompson # $FreeBSD$ PORTNAME= handbrake PORTVERSION= 1.0.3 +PORTREVISION= 1 CATEGORIES= multimedia DIST_SUBDIR= ${PORTNAME} MAINTAINER= ports@FreeBSD.org COMMENT= Versatile DVD ripper and video transcoder LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= bash:shells/bash \ yasm:devel/yasm \ 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 \ 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 BROKEN_aarch64= Fails to build: invokes x86 asm BROKEN_armv6= Fails to build: invokes x86 asm USE_GITHUB= yes XGH_ACCOUNT= HandBrake XGH_PROJECT= HandBrake CONTRIB_FILES= fdk-aac-0.1.4.tar.gz \ libav-12.tar.gz \ libbluray-0.9.3.tar.bz2 \ libdvdnav-5.0.1.tar.bz2 \ libdvdread-5.0.0-6-gcb1ae87.tar.gz \ libvpx-1.5.0.tar.bz2 \ x265_2.1-1.tar.gz MASTER_SITES+= http://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 USE_GCC= yes USES= autoreconf:build compiler:features gmake iconv \ libtool:build localbase:ldflags pkgconfig python:build MAKE_ENV= V=1 ACLOCAL=${LOCALBASE}/bin/aclocal WRKSRC= ${WRKDIR}/HandBrake-${PORTVERSION} 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 # Enforce linking to the system c++ standard lib LDFLAGS+= -l${COMPILER_FEATURES:Mlib*c++:S/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 .include # Recent GNU binutils are required to handle inline SSSE3 asm (in x264), and # to support --exclude-libs option for ld(1) when building GUI program .if ${PORT_OPTIONS:MX11} CONFIGURE_ENV+= COMPILER_PATH=${LOCALBASE}/bin MAKE_ENV+= COMPILER_PATH=${LOCALBASE}/bin CONFIGURE_ARGS+= --disable-gtk-update-checks --disable-gst BUILD_DEPENDS+= ${LOCALBASE}/bin/ld:devel/binutils LIB_DEPENDS+= libvpx.so:multimedia/libvpx \ libdbus-glib-1.so:devel/dbus-glib \ libnotify.so:devel/libnotify USES+= gettext USE_GNOME+= gtk30 intltool cairo gdkpixbuf2 .else CONFIGURE_ARGS+= --disable-gtk .endif # HandBrake tries to fetch its dependencies during build phase, which is not # considered good in FreeBSD. Instead, we will provided the downloaded files. post-extract: .SILENT ${MKDIR} ${WRKSRC}/download .for f in ${CONTRIB_FILES} ${CP} ${DISTDIR}/${DIST_SUBDIR}/${f} ${WRKSRC}/download .endfor + +#post-patch: +# ${REINPLACE_CMD} -e 's|%%CC%%|${CC}|g' ${WRKSRC}/make/configure.py post-install-X11-on: ${LN} -sf ghb ${STAGEDIR}${PREFIX}/bin/HandBrake .include Index: head/multimedia/handbrake/files/patch-make_configure.py =================================================================== --- head/multimedia/handbrake/files/patch-make_configure.py (revision 438042) +++ head/multimedia/handbrake/files/patch-make_configure.py (revision 438043) @@ -1,63 +1,72 @@ --- make/configure.py.orig 2017-02-25 20:56:19 UTC +++ make/configure.py @@ -590,6 +590,9 @@ class ArchAction( Action ): pass elif host.match( '*-*-solaris*' ): pass + elif host.match( '*-*-freebsd.*' ): + self.mode['i386'] = 'i386-portsbuild-freebsd%s' % (host.release) + self.mode['amd64'] = 'amd64-portsbuild-freebsd%s' % (host.release) else: self.msg_pass = 'WARNING' @@ -1294,13 +1297,13 @@ def createCLI(): h = IfHost( 'enable assembly code in non-contrib modules', 'NOMATCH*-*-darwin*', 'NOMATCH*-*-linux*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--enable-asm', default=False, action='store_true', help=h ) - h = IfHost( 'disable GTK GUI', '*-*-linux*', none=optparse.SUPPRESS_HELP ).value + h = IfHost( 'disable GTK GUI', '*-*-linux*', '*-*-freebsd*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--disable-gtk', default=False, action='store_true', help=h ) - h = IfHost( 'disable GTK GUI update checks', '*-*-linux*', none=optparse.SUPPRESS_HELP ).value + h = IfHost( 'disable GTK GUI update checks', '*-*-linux*', '*-*-freebsd*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--disable-gtk-update-checks', default=False, action='store_true', help=h ) h = IfHost( 'enable GTK GUI (mingw)', '*-*-mingw*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--enable-gtk-mingw', default=False, action='store_true', help=h ) - h = IfHost( 'disable gstreamer (live preview)', '*-*-linux*', none=optparse.SUPPRESS_HELP ).value + h = IfHost( 'disable gstreamer (live preview)', '*-*-linux*', '*-*-freebsd*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--disable-gst', default=False, action='store_true', help=h ) h = IfHost( 'enable use of Intel Quick Sync Video hardware acceleration', '*-*-*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--enable-qsv', default=False, action='store_true', help=h ) @@ -1352,7 +1355,7 @@ def createCLI(): h = IfHost( 'Build and use local pkg-config', '*-*-darwin*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--enable-local-pkgconfig', default=False, action='store_true', help=h ) - h = IfHost( 'Build extra contribs for flatpak packaging', '*-*-linux*', none=optparse.SUPPRESS_HELP ).value + h = IfHost( 'Build extra contribs for flatpak packaging', '*-*-linux*', '*-*-freebsd*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--flatpak', default=False, action='store_true', help=h ) cli.add_option_group( grp ) +@@ -1517,7 +1520,7 @@ try: + class Tools: + ar = ToolProbe( 'AR.exe', 'ar' ) + cp = ToolProbe( 'CP.exe', 'cp' ) +- gcc = ToolProbe( 'GCC.gcc', 'gcc', IfHost( 'gcc-4', '*-*-cygwin*' )) ++ gcc = ToolProbe( 'GCC.gcc', 'gcc', IfHost( os.environ['CC'], '*-*-freebsd*' )) + + if host.match( '*-*-darwin*' ): + gmake = ToolProbe( 'GMAKE.exe', 'make', 'gmake' ) @@ -1924,10 +1927,15 @@ int main() doc.add( 'GCC.sysroot', '' ) doc.add( 'GCC.minver', '' ) + if build.match( '*-*-freebsd*' ): + doc.add( 'HAS.pthread', 1 ) + if build.match( 'i?86-*' ): doc.add( 'LIBHB.GCC.D', 'ARCH_X86_32', append=True ) elif build.match( 'x86_64-*' ): doc.add( 'LIBHB.GCC.D', 'ARCH_X86_64', append=True ) + elif build.match( 'amd64-*' ): + doc.add( 'LIBHB.GCC.D', 'ARCH_X86_64', append=True ) if options.enable_asm and ( not Tools.yasm.fail or options.enable_local_yasm ): asm = '' @@ -1940,7 +1948,7 @@ int main() else: doc.add( 'LIBHB.YASM.f', 'elf32' ) doc.add( 'LIBHB.YASM.m', 'x86' ) - elif build.match( 'x86_64-*' ): + elif build.match( 'x86_64-*' ) or build.match( 'amd64-*' ): asm = 'x86' doc.add( 'LIBHB.GCC.D', 'HAVE_MMX ARCH_X86_64', append=True ) if build.match( '*-*-darwin*' ):