Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jun 2019 08:41:42 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r504171 - in branches/2019Q2: Mk www/firefox www/firefox/files
Message-ID:  <201906140841.x5E8fg4g026936@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Fri Jun 14 08:41:42 2019
New Revision: 504171
URL: https://svnweb.freebsd.org/changeset/ports/504171

Log:
  MFH: r504160
  
  www/firefox: switch to system aom/dav1d
  
  Obtained from:	upstream (via Gentoo)
  Approved by:	ports-secteam blanket

Added:
  branches/2019Q2/www/firefox/files/patch-bug1559213
     - copied unchanged from r504160, head/www/firefox/files/patch-bug1559213
Modified:
  branches/2019Q2/Mk/bsd.gecko.mk
  branches/2019Q2/www/firefox/Makefile
Directory Properties:
  branches/2019Q2/   (props changed)

Modified: branches/2019Q2/Mk/bsd.gecko.mk
==============================================================================
--- branches/2019Q2/Mk/bsd.gecko.mk	Fri Jun 14 07:46:35 2019	(r504170)
+++ branches/2019Q2/Mk/bsd.gecko.mk	Fri Jun 14 08:41:42 2019	(r504171)
@@ -157,7 +157,12 @@ RUSTFLAGS+=	${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/
 .endif
 
 # Standard depends
-_ALL_DEPENDS=	event ffi graphite harfbuzz hunspell icu jpeg nspr nss png pixman sqlite vpx webp
+_ALL_DEPENDS=	av1 event ffi graphite harfbuzz hunspell icu jpeg nspr nss png pixman sqlite vpx webp
+
+.if exists(${FILESDIR}/patch-bug1559213)
+av1_LIB_DEPENDS=	libaom.so:multimedia/aom libdav1d.so:multimedia/dav1d
+av1_MOZ_OPTIONS=	--with-system-av1
+.endif
 
 event_LIB_DEPENDS=	libevent.so:devel/libevent
 event_MOZ_OPTIONS=	--with-system-libevent

Modified: branches/2019Q2/www/firefox/Makefile
==============================================================================
--- branches/2019Q2/www/firefox/Makefile	Fri Jun 14 07:46:35 2019	(r504170)
+++ branches/2019Q2/www/firefox/Makefile	Fri Jun 14 08:41:42 2019	(r504171)
@@ -3,7 +3,7 @@
 
 PORTNAME=	firefox
 DISTVERSION=	67.0.2
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	www ipv6
 MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \

Copied: branches/2019Q2/www/firefox/files/patch-bug1559213 (from r504160, head/www/firefox/files/patch-bug1559213)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2019Q2/www/firefox/files/patch-bug1559213	Fri Jun 14 08:41:42 2019	(r504171, copy of r504160, head/www/firefox/files/patch-bug1559213)
@@ -0,0 +1,100 @@
+commit 717bba28411c
+Author: Jory A. Pratt <anarchy@gentoo.org>
+Date:   Thu Jun 13 11:53:00 2019 -0700
+
+    Bug 1559213 - Allow to use system av1 libs instead of bundled.
+---
+ config/external/moz.build      |  5 +++--
+ config/system-headers.mozbuild |  8 ++++++++
+ dom/media/platforms/moz.build  |  5 +++++
+ toolkit/moz.configure          | 19 ++++++++++++++++++-
+ 4 files changed, 34 insertions(+), 3 deletions(-)
+
+diff --git config/external/moz.build config/external/moz.build
+index 03e4fa143bd1..a67d10b11fe6 100644
+--- config/external/moz.build
++++ config/external/moz.build
+@@ -37,8 +37,9 @@ if not CONFIG['MOZ_SYSTEM_LIBVPX']:
+     external_dirs += ['media/libvpx']
+ 
+ if CONFIG['MOZ_AV1']:
+-    external_dirs += ['media/libaom']
+-    external_dirs += ['media/libdav1d']
++    if not CONFIG['MOZ_SYSTEM_AV1']:
++        external_dirs += ['media/libaom']
++        external_dirs += ['media/libdav1d']
+ 
+ if not CONFIG['MOZ_SYSTEM_PNG']:
+     external_dirs += ['media/libpng']
+diff --git config/system-headers.mozbuild config/system-headers.mozbuild
+index bcf5c4925564..48964a999a9b 100644
+--- config/system-headers.mozbuild
++++ config/system-headers.mozbuild
+@@ -1304,6 +1304,14 @@ if CONFIG['MOZ_ENABLE_CONTENTMANAGER']:
+         'SelectSingleContentItemPage.h',
+     ]
+ 
++if CONFIG['MOZ_SYSTEM_AV1']:
++    system_headers += [
++        'aom/aom_decoder.h',
++        'aom/aomdx.h',
++        'aom/aom_image.h',
++        'dav1d/dav1d.h',
++    ]
++
+ if CONFIG['MOZ_SYSTEM_LIBVPX']:
+     system_headers += [
+         'vpx_mem/vpx_mem.h',
+diff --git dom/media/platforms/moz.build dom/media/platforms/moz.build
+index 092cee0c9b66..38e45de5b5f0 100644
+--- dom/media/platforms/moz.build
++++ dom/media/platforms/moz.build
+@@ -80,6 +80,11 @@ if CONFIG['MOZ_AV1']:
+         'agnostic/AOMDecoder.cpp',
+         'agnostic/DAV1DDecoder.cpp',
+     ]
++    if CONFIG['MOZ_SYSTEM_AV1']:
++        CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
++        OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
++        CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
++        OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
+ 
+ if CONFIG['MOZ_OMX']:
+     EXPORTS += [
+diff --git toolkit/moz.configure toolkit/moz.configure
+index 82b5a59acf42..e2329560b42b 100644
+--- toolkit/moz.configure
++++ toolkit/moz.configure
+@@ -441,7 +441,23 @@ def av1(value):
+     if value:
+         return True
+ 
+-@depends(target, nasm_version, when=av1 & compile_environment)
++option('--with-system-av1',
++       help="Use system av1 (located with pkgconfig)")
++
++system_libaom_info = pkg_check_modules('MOZ_SYSTEM_LIBAOM', 'aom >= 1.0.0',
++                                       when='--with-system-av1')
++
++system_libdav1d_info = pkg_check_modules('MOZ_SYSTEM_LIBDAV1D', 'dav1d >= 0.1.1',
++                                         when='--with-system-av1')
++
++@depends(system_libaom_info, system_libdav1d_info)
++def system_av1(system_libaom_info, system_libdav1d_info):
++    has_av1_libs = False
++    if system_libaom_info and system_libdav1d_info:
++        has_av1_libs = True
++    return has_av1_libs
++
++@depends(target, nasm_version, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment)
+ def dav1d_asm(target, nasm_version):
+     if target.os != 'Android':
+         if target.cpu == 'aarch64':
+@@ -457,6 +473,7 @@ set_config('MOZ_DAV1D_ASM', dav1d_asm)
+ set_define('MOZ_DAV1D_ASM', dav1d_asm)
+ set_config('MOZ_AV1', av1)
+ set_define('MOZ_AV1', av1)
++set_config('MOZ_SYSTEM_AV1', depends_if(system_av1)(lambda _: True))
+ 
+ # Built-in fragmented MP4 support.
+ # ==============================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906140841.x5E8fg4g026936>