chromium: fix 68 (beta) build

Also replace openh264 patch with one landed in upstream.
This commit is contained in:
Yuriy Taraday 2018-07-14 01:40:18 +04:00
parent c283323c1e
commit 06ec2a9f19
5 changed files with 30 additions and 12 deletions

View File

@ -142,13 +142,18 @@ let
# https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/chromium
# for updated patches and hints about build flags
# (gentooPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000")
./patches/fix-openh264.patch
./patches/fix-freetype.patch
] ++ optionals (versionRange "66" "68") [
./patches/nix_plugin_paths_52.patch
(githubPatch "4d10424f9e2a06978cdd6cdf5403fcaef18e49fc" "11la1jycmr5b5rw89mzcdwznmd2qh28sghvz9klr1qhmsmw1vzjc")
] ++ optionals (versionAtLeast version "68") [
./patches/nix_plugin_paths_68.patch
] ++ optionals (versionRange "68" "69") [
./patches/remove-webp-include-68.patch
(githubPatch "4d10424f9e2a06978cdd6cdf5403fcaef18e49fc" "11la1jycmr5b5rw89mzcdwznmd2qh28sghvz9klr1qhmsmw1vzjc")
(githubPatch "56cb5f7da1025f6db869e840ed34d3b98b9ab899" "04mp5r1yvdvdx6m12g3lw3z51bzh7m3gr73mhblkn4wxdbvi3dcs")
] ++ optionals (versionAtLeast version "69") [
./patches/remove-webp-include-69.patch
] ++ optional enableWideVine ./patches/widevine.patch;
postPatch = ''

View File

@ -1,10 +0,0 @@
--- a/third_party/openh264/BUILD.gn
+++ b/third_party/openh264/BUILD.gn
@@ -24,6 +24,7 @@ config("config") {
if (!is_win || is_clang) {
cflags += [
"-Wno-format",
+ "-Wno-format-security",
"-Wno-header-hygiene",
"-Wno-unused-function",
"-Wno-unused-value",

View File

@ -26,7 +26,7 @@ index f4e119d..d9775bd 100644
+ std::string full_env = std::string("NIX_CHROMIUM_PLUGIN_PATH_") + ident;
+ const char* value = getenv(full_env.c_str());
+ if (value == NULL)
+ return PathService::Get(base::DIR_MODULE, result);
+ return base::PathService::Get(base::DIR_MODULE, result);
+ else
+ *result = base::FilePath(value);
}

View File

@ -0,0 +1,12 @@
--- a/third_party/blink/renderer/platform/image-encoders/image_encoder.h
+++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.h
@@ -8,7 +8,7 @@
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "third_party/libjpeg/jpeglib.h" // for JPEG_MAX_DIMENSION
-#include "third_party/libwebp/src/webp/encode.h" // for WEBP_MAX_DIMENSION
+#define WEBP_MAX_DIMENSION 16383
#include "third_party/skia/include/core/SkStream.h"
#include "third_party/skia/include/encode/SkJpegEncoder.h"
#include "third_party/skia/include/encode/SkPngEncoder.h"

View File

@ -0,0 +1,11 @@
--- a/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
+++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
@@ -13,7 +13,7 @@
#include "jpeglib.h" // for JPEG_MAX_DIMENSION
-#include "third_party/libwebp/src/webp/encode.h" // for WEBP_MAX_DIMENSION
+#define WEBP_MAX_DIMENSION 16383
namespace blink {