chromium: Fix building with WineVine components
Before version 54, the WideVine CDM plugin was built unconditionally and it seems since version 54 this now is dependent upon a GYP/GN flag on whether to include the CDM shared library or not. Also, we now use a patch from Gentoo which should hopefully get the CDM plugin to work properly, at least according to their bugtracker: https://bugs.gentoo.org/show_bug.cgi?id=547630 Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
66ce15a3b1
commit
d2e60d1f93
@ -18,6 +18,11 @@ mkChromiumDerivation (base: rec {
|
|||||||
cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/"
|
cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/"
|
||||||
cp -v "$buildPath/chrome" "$libExecPath/$packageName"
|
cp -v "$buildPath/chrome" "$libExecPath/$packageName"
|
||||||
|
|
||||||
|
if [ -e "$buildPath/libwidevinecdmadapter.so" ]; then
|
||||||
|
cp -v "$buildPath/libwidevinecdmadapter.so" \
|
||||||
|
"$libExecPath/libwidevinecdmadapter.so"
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p "$sandbox/bin"
|
mkdir -p "$sandbox/bin"
|
||||||
cp -v "$buildPath/chrome_sandbox" "$sandbox/bin/${sandboxExecutableName}"
|
cp -v "$buildPath/chrome_sandbox" "$sandbox/bin/${sandboxExecutableName}"
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
, enableSELinux ? false, libselinux ? null
|
, enableSELinux ? false, libselinux ? null
|
||||||
, enableNaCl ? false
|
, enableNaCl ? false
|
||||||
, enableHotwording ? false
|
, enableHotwording ? false
|
||||||
|
, enableWideVine ? false
|
||||||
, gnomeSupport ? false, gnome ? null
|
, gnomeSupport ? false, gnome ? null
|
||||||
, gnomeKeyringSupport ? false, libgnome_keyring3 ? null
|
, gnomeKeyringSupport ? false, libgnome_keyring3 ? null
|
||||||
, proprietaryCodecs ? true
|
, proprietaryCodecs ? true
|
||||||
@ -102,10 +103,9 @@ let
|
|||||||
++ optional pulseSupport libpulseaudio;
|
++ optional pulseSupport libpulseaudio;
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./patches/widevine.patch
|
|
||||||
./patches/glibc-2.24.patch
|
./patches/glibc-2.24.patch
|
||||||
./patches/nix_plugin_paths_52.patch
|
./patches/nix_plugin_paths_52.patch
|
||||||
];
|
] ++ optional enableWideVine ./patches/widevine.patch;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# We want to be able to specify where the sandbox is via CHROME_DEVEL_SANDBOX
|
# We want to be able to specify where the sandbox is via CHROME_DEVEL_SANDBOX
|
||||||
@ -147,6 +147,7 @@ let
|
|||||||
use_gio = gnomeSupport;
|
use_gio = gnomeSupport;
|
||||||
enable_nacl = enableNaCl;
|
enable_nacl = enableNaCl;
|
||||||
enable_hotwording = enableHotwording;
|
enable_hotwording = enableHotwording;
|
||||||
|
enable_widevine = enableWideVine;
|
||||||
selinux = enableSELinux;
|
selinux = enableSELinux;
|
||||||
use_cups = cupsSupport;
|
use_cups = cupsSupport;
|
||||||
} // {
|
} // {
|
||||||
|
@ -22,7 +22,8 @@ let
|
|||||||
|
|
||||||
mkChromiumDerivation = callPackage ./common.nix {
|
mkChromiumDerivation = callPackage ./common.nix {
|
||||||
inherit enableSELinux enableNaCl enableHotwording gnomeSupport gnome
|
inherit enableSELinux enableNaCl enableHotwording gnomeSupport gnome
|
||||||
gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport;
|
gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport
|
||||||
|
enableWideVine;
|
||||||
};
|
};
|
||||||
|
|
||||||
browser = callPackage ./browser.nix { inherit channel; };
|
browser = callPackage ./browser.nix { inherit channel; };
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
diff -upr chromium-42.0.2311.90.orig/third_party/widevine/cdm/widevine_cdm_version.h chromium-42.0.2311.90/third_party/widevine/cdm/widevine_cdm_version.h
|
Minimal WideVine patch from Gentoo:
|
||||||
--- chromium-42.0.2311.90.orig/third_party/widevine/cdm/widevine_cdm_version.h 2015-04-15 01:18:59.000000000 +0300
|
|
||||||
+++ chromium-42.0.2311.90/third_party/widevine/cdm/widevine_cdm_version.h 2015-04-15 09:09:49.157260050 +0300
|
https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-widevine-r1.patch
|
||||||
@@ -14,4 +14,8 @@
|
|
||||||
// - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
|
BTS: https://bugs.gentoo.org/show_bug.cgi?id=547630
|
||||||
// as a string, e.g., "1.0.123.456").
|
|
||||||
|
--- a/third_party/widevine/cdm/stub/widevine_cdm_version.h
|
||||||
|
+++ b/third_party/widevine/cdm/stub/widevine_cdm_version.h
|
||||||
|
@@ -10,6 +10,7 @@
|
||||||
|
|
||||||
|
#include "third_party/widevine/cdm/widevine_cdm_common.h"
|
||||||
|
|
||||||
|
+#define WIDEVINE_CDM_VERSION_STRING "unknown"
|
||||||
|
#define WIDEVINE_CDM_AVAILABLE
|
||||||
|
|
||||||
+#include "third_party/widevine/cdm/widevine_cdm_common.h"
|
|
||||||
+#define WIDEVINE_CDM_AVAILABLE
|
|
||||||
+#define WIDEVINE_CDM_VERSION_STRING "@WIDEVINE_VERSION@"
|
|
||||||
+
|
|
||||||
#endif // WIDEVINE_CDM_VERSION_H_
|
#endif // WIDEVINE_CDM_VERSION_H_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user