git: 15e5a0c383af - main - www/firefox-esr: fix build on powerpc64*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Mon, 08 Nov 2021 15:57:52 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=15e5a0c383af096bba772432eaddc9ab9a25eb1f

commit 15e5a0c383af096bba772432eaddc9ab9a25eb1f
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-11-08 15:52:36 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-11-08 15:52:36 +0000

    www/firefox-esr: fix build on powerpc64*
    
    Copy the patch from mail/thunderbird.
---
 www/firefox-esr/files/patch-dom_media_flac_FlacDecoder.cpp | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/www/firefox-esr/files/patch-dom_media_flac_FlacDecoder.cpp b/www/firefox-esr/files/patch-dom_media_flac_FlacDecoder.cpp
index 247da71c362b..954b78f5bf37 100644
--- a/www/firefox-esr/files/patch-dom_media_flac_FlacDecoder.cpp
+++ b/www/firefox-esr/files/patch-dom_media_flac_FlacDecoder.cpp
@@ -1,8 +1,6 @@
 Enable FLAC on platforms without ffvpx like powerpc*
 
-diff --git dom/media/flac/FlacDecoder.cpp dom/media/flac/FlacDecoder.cpp
-index 53fc3c9937f7..b23771ab80fa 100644
---- dom/media/flac/FlacDecoder.cpp
+--- dom/media/flac/FlacDecoder.cpp.orig	2021-04-15 19:44:28 UTC
 +++ dom/media/flac/FlacDecoder.cpp
 @@ -7,6 +7,7 @@
  #include "FlacDecoder.h"
@@ -12,15 +10,14 @@ index 53fc3c9937f7..b23771ab80fa 100644
  
  namespace mozilla {
  
-@@ -14,6 +15,11 @@ namespace mozilla {
+@@ -14,6 +15,10 @@ namespace mozilla {
  bool FlacDecoder::IsEnabled() {
  #ifdef MOZ_FFVPX
    return StaticPrefs::media_flac_enabled();
 +#elif defined(MOZ_FFMPEG)
 +  RefPtr<PDMFactory> platform = new PDMFactory();
 +  return StaticPrefs::media_flac_enabled() &&
-+         platform->SupportsMimeType(NS_LITERAL_CSTRING("audio/flac"),
-+                                    /* DecoderDoctorDiagnostics* */ nullptr);
++         platform->SupportsMimeType("audio/flac"_ns);
  #else
-   // Until bug 1295886 is fixed.
    return false;
+ #endif