commit:     690fff18ad1f3407cb13e4aba1dd18dbf132fa62
Author:     Elvis Pranskevichus <elvis <AT> magic <DOT> io>
AuthorDate: Mon Nov 14 19:51:36 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Tue Nov 15 22:28:28 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=690fff18

dev-util/electron: Fix compilation with ICU-58 (#599346)

Original patch by Brad Laue.

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=599346

Package-Manager: portage-2.3.0
Closes: https://github.com/gentoo/gentoo/pull/2835

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-util/electron/Manifest                         |   2 +-
 ...ron-0.37.8.ebuild => electron-0.37.8-r1.ebuild} |   1 +
 ...electron-1.3.5.ebuild => electron-1.3.6.ebuild} |   1 +
 dev-util/electron/files/chromium-icu-58-r0.patch   |  51 ++++++++
 dev-util/electron/files/chromium-icu-58-r1.patch   | 128 +++++++++++++++++++++
 ...patch => electron-1.3.6-vendor-brightray.patch} |   0
 ...electron-1.3.6-vendor-libchromiumcontent.patch} |   0
 ...node.patch => electron-1.3.6-vendor-node.patch} |   0
 .../{electron-1.3.5.patch => electron-1.3.6.patch} |   0
 9 files changed, 182 insertions(+), 1 deletion(-)

diff --git a/dev-util/electron/Manifest b/dev-util/electron/Manifest
index eff635a..69a65ab 100644
--- a/dev-util/electron/Manifest
+++ b/dev-util/electron/Manifest
@@ -7,7 +7,7 @@ DIST chromium-49.0.2623.75.tar.xz 452264916 SHA256 
a4fd4c85b12b021789d8afc33b275
 DIST chromium-52.0.2743.82.tar.xz 458110272 SHA256 
a7de6015df9cf685d68efd1e070ae9c706c723cd9395d079a7d43672a2c37eb4 SHA512 
9bba841cb726bfa06888deefacfcee628e36d25de47dd0303d3fd1ce2f07922148d60befe934f44c33fcdfed6ce3dadfb9e3ee0828b66994807178a488051806
 WHIRLPOOL 
f0d258882db85291262c2381aeb6d85ebf20a252344e114a2da35e75f79dc8b73de95b71926512537af17e109fd7a8dd04386d5b3ed610262d42d11bcc1a5707
 DIST electron-0.36.12.tar.gz 3068567 SHA256 
8e4ee7ed37d32ad73f8cbfb132ce0009506a01a68d5a71bafd6858c6bc11f9a6 SHA512 
37d016768e57f81b01338cea6d0d5eaa6ea72d83a2122b54c9c73e37b0afc7fb8351b0cb846afda29206379d5625657b815b002c2eb3c31babcd0cffa47ae3de
 WHIRLPOOL 
a358e353259d377dd59ae563f38b2fe185ade6d7a00bbad8c61831c92b4e200ac1f2f25b79564eae11d9082a569be342ccd4be6e400955cd65729e9299b48796
 DIST electron-0.37.8.tar.gz 3154625 SHA256 
d6b01e800aa4cd54b680aa1d78e8c04ed99f82423bab37fe03ad5eb12310f0c0 SHA512 
1469129cc6e07da2540ab67d2bb9e2dec4055da77b35bf0abf86a70e82e3ccf443e75edb25feac6c8855c5e841592738319e1a81a52d504e90a5ce9197153754
 WHIRLPOOL 
677fc9c5bd96d04de43a28c8db23921fb98d3d9a455c32da8235b15c72f2480cce16a3705ae258de1c2b3a5af8d11607c3f868bae248553e593a77c454f94582
-DIST electron-1.3.5.tar.gz 3504577 SHA256 
8cc97cdb46a632788daa9fc1fbdda3d9de0d23e729ec4205e962fe9a7d9c6ab3 SHA512 
83d00dc8ecb0662c27d9cacaaa901ccb28658b8de56b3444abac868b0c02df24c51d46bbb9be64d4f7435de73cb0078d2b4afb7be001e25bce27f3daba51402b
 WHIRLPOOL 
867d73c3515845c7dd536a10848da8fc8f97b89cc3c79e8d6479d604b411e8964e08683ca652709b3a3d3211b786e32b2a795a86d82852ae74523820a7451544
+DIST electron-1.3.6.tar.gz 4556606 SHA256 
37b745261bd6c5e7cb6b077b91c9c94d147ed5731236b904eb05b39cff0c1f93 SHA512 
08ba717fdb2cf088a17c8de9243887f6d11ce104856fe54dfdb7d3707b0201463334d3a52abf36f92f5dc9db7b53fb9938649f5d091609cc555235871e9736c5
 WHIRLPOOL 
3cf852f87f7c32a3cfe4caa79ed63e85e8f0db19481fb44e83e04cf3bf370e2ddea6f49c369b996f9368a1529a65b73ea43871538703c3cbdb8f98d85bb4456a
 DIST electron-node-6bcd8af891a991f8aa196e49e6bf908ebbe24cae.tar.gz 36600837 
SHA256 6b7bb43be6d24bc55a6ccd4b8efd2f88d8d2fd7d8437d7aa33d813c649f791f7 SHA512 
7fcafa01027bd68794a7cd2f049a7bdf45e1dd56622583bd5d53d662328e64619dd5dbeec295ff559b1b268e90bf6abf3d76cd6d00f055602bbaa7443e3a3450
 WHIRLPOOL 
c5dd664910a59c7fb1d4aaf3c91b298b7266466596ce2a4f4f41ff6637db9e480450eaf1e9255ab810de13df1abbd769f32bdc73124bea9ab4ed013cda945bd0
 DIST electron-node-a507a3c3816d6ac085ed46250c489a3d76ab8b3c.tar.gz 36578658 
SHA256 56489ffa9d58b736008f5c1c2775bc10f3afe02d3c768035e7742893cc8e1d82 SHA512 
a5b62c05ec7300a26b3feab3c1e796a87691d41fa7c039541574878491df51e9075685abc5d630fc62bca95bf821eeede041d4ab36caedaf76156844f1095ea6
 WHIRLPOOL 
8675b05753cf905cfb2fc0ebb19fc256489a7b932c57be291eb2fc7194de599c07f4120541f4a61cccdb43b09b6280c7c02f9565aef98129c584fdca4c154279
 DIST electron-node-ee8c429deaee0adeeef069c3ad34c0defe53a567.tar.gz 42764387 
SHA256 82791b95fec0dfd7b80b53f5bed7789c4ea50353dca95d23115c1aff5a5249a5 SHA512 
971fbe2d9ff899eaf8e06e131cd12539ec804f9f81b87bb43fe07c43a33838066b98a4b76b974cdfe19a002a3242b270c03325c81f52abdd1befec3dd9d649c6
 WHIRLPOOL 
d604e0101da4ae020de3092cf02becf8a1655e1aec69d1cde8dd8293a591af566f5ad9972cf00c8288e1319431be7ee54f0c460fb83246522465e569f07ab2bf

diff --git a/dev-util/electron/electron-0.37.8.ebuild 
b/dev-util/electron/electron-0.37.8-r1.ebuild
similarity index 99%
rename from dev-util/electron/electron-0.37.8.ebuild
rename to dev-util/electron/electron-0.37.8-r1.ebuild
index 5824044..9d0742f 100644
--- a/dev-util/electron/electron-0.37.8.ebuild
+++ b/dev-util/electron/electron-0.37.8-r1.ebuild
@@ -298,6 +298,7 @@ src_prepare() {
        epatch "${FILESDIR}/chromium-remove-gardiner-mod-font.patch"
        epatch "${FILESDIR}/chromium-shared-v8.patch"
        epatch "${FILESDIR}/chromium-lto-fixes.patch"
+       epatch "${FILESDIR}/chromium-icu-58-r0.patch"
 
        # libcc chromium patches
        _unnest_patches "${LIBCC_S}/patches"

diff --git a/dev-util/electron/electron-1.3.5.ebuild 
b/dev-util/electron/electron-1.3.6.ebuild
similarity index 99%
rename from dev-util/electron/electron-1.3.5.ebuild
rename to dev-util/electron/electron-1.3.6.ebuild
index 50d5929..1ec653d 100644
--- a/dev-util/electron/electron-1.3.5.ebuild
+++ b/dev-util/electron/electron-1.3.6.ebuild
@@ -303,6 +303,7 @@ src_prepare() {
        epatch "${FILESDIR}/chromium-ffmpeg-license-r0.patch"
        epatch "${FILESDIR}/chromium-shared-v8-r1.patch"
        epatch "${FILESDIR}/chromium-lto-fixes-r1.patch"
+       epatch "${FILESDIR}/chromium-icu-58-r1.patch"
 
        # libcc chromium patches
        _unnest_patches "${LIBCC_S}/patches"

diff --git a/dev-util/electron/files/chromium-icu-58-r0.patch 
b/dev-util/electron/files/chromium-icu-58-r0.patch
new file mode 100644
index 00000000..ca402f6
--- /dev/null
+++ b/dev-util/electron/files/chromium-icu-58-r0.patch
@@ -0,0 +1,51 @@
+--- a/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp.orig       
2016-11-11 13:21:19.747054059 -0500
++++ b/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp    
2016-11-11 13:24:34.474939062 -0500
+@@ -26,6 +26,9 @@
+ #include "wtf/StdLibExtras.h"
+ #include "wtf/text/CharacterNames.h"
+ 
++#include <unicode/uchar.h>
++#include <unicode/uvernum.h>
++
+ namespace blink {
+ 
+ unsigned numGraphemeClusters(const String& string)
+@@ -122,13 +125,19 @@
+     { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), 0, B(0, 0, 0, 0, 
0, 0, 0, 0), 0, 0, 0, B(0, 0, 0, 0, 0, 0, 0, 0), 0, 0, 0, B(0, 0, 0, 0, 0, 0, 
0, 0) }, // DEL
+ };
+ 
++#if U_ICU_VERSION_MAJOR_NUM >= 58
++#define BA_LB_COUNT (U_LB_COUNT - 3)
++#else
++#define BA_LB_COUNT U_LB_COUNT
++#endif
++
+ // Line breaking table for CSS word-break: break-all. This table differs from
+ // asciiLineBreakTable in:
+ // - Indices are Line Breaking Classes defined in UAX#14 Unicode Line Breaking
+ //   Algorithm: http://unicode.org/reports/tr14/#DescriptionOfProperties
+ // - 1 indicates additional break opportunities. 0 indicates to fallback to
+ //   normal line break, not "prohibit break."
+-static const unsigned char breakAllLineBreakClassTable[][U_LB_COUNT / 8 + 1] 
= {
++static const unsigned char breakAllLineBreakClassTable[][BA_LB_COUNT / 8 + 1] 
= {
+     // XX AI AL B2 BA BB BK CB    CL CM CR EX GL HY ID IN    IS LF NS NU OP 
PO PR QU    SA SG SP SY ZW NL WJ H2    H3 JL JT JV CP CJ HL RI
+     { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 
0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // XX
+     { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 
0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // AI
+@@ -178,7 +187,7 @@
+ #undef AL
+ 
+ static_assert(WTF_ARRAY_LENGTH(asciiLineBreakTable) == 
asciiLineBreakTableLastChar - asciiLineBreakTableFirstChar + 1, 
"asciiLineBreakTable should be consistent");
+-static_assert(WTF_ARRAY_LENGTH(breakAllLineBreakClassTable) == U_LB_COUNT, 
"breakAllLineBreakClassTable should be consistent");
++static_assert(WTF_ARRAY_LENGTH(breakAllLineBreakClassTable) == BA_LB_COUNT, 
"breakAllLineBreakClassTable should be consistent");
+ 
+ static inline bool shouldBreakAfter(UChar lastCh, UChar ch, UChar nextCh)
+ {
+@@ -209,7 +218,7 @@
+ 
+ static inline bool shouldBreakAfterBreakAll(ULineBreak lastLineBreak, 
ULineBreak lineBreak)
+ {
+-    if (lineBreak >= 0 && lineBreak < U_LB_COUNT && lastLineBreak >= 0 && 
lastLineBreak < U_LB_COUNT) {
++    if (lineBreak >= 0 && lineBreak < BA_LB_COUNT && lastLineBreak >= 0 && 
lastLineBreak < BA_LB_COUNT) {
+         const unsigned char* tableRow = 
breakAllLineBreakClassTable[lastLineBreak];
+         return tableRow[lineBreak / 8] & (1 << (lineBreak % 8));
+     }

diff --git a/dev-util/electron/files/chromium-icu-58-r1.patch 
b/dev-util/electron/files/chromium-icu-58-r1.patch
new file mode 100644
index 00000000..9e6e5fd
--- /dev/null
+++ b/dev-util/electron/files/chromium-icu-58-r1.patch
@@ -0,0 +1,128 @@
+From 424584b4984bde7c831f42e9fb47f1ad583a1c46 Mon Sep 17 00:00:00 2001
+From: jshin <[email protected]>
+Date: Fri, 21 Oct 2016 01:15:50 -0700
+Subject: [PATCH] Update aspirational_scripts per Unicode 9
+
+This is a preparation to update ICU to 58.1.
+Without this change, ICU update CL cannot be tested on
+trybots because a compile will fail due to '#error' checking
+if ICU version is less than 58.
+
+BUG=637001
+TEST=None
[email protected]
+
+Review-Url: https://chromiumcodereview.appspot.com/2436113003
+Cr-Commit-Position: refs/heads/master@{#426749}
+---
+ components/url_formatter/url_formatter.cc | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/components/url_formatter/url_formatter.cc 
b/components/url_formatter/url_formatter.cc
+index 4455db3..2b82c0c 100644
+--- a/components/url_formatter/url_formatter.cc
++++ b/components/url_formatter/url_formatter.cc
+@@ -431,7 +431,7 @@
+   // are added to the allowed set. The list has to be updated when a new
+   // version of Unicode is released. The current version is 8.0.0 and ICU 58
+   // will have Unicode 9.0 data.
+-#if U_ICU_VERSION_MAJOR_NUM < 58
++#if U_ICU_VERSION_MAJOR_NUM < 60
+   const icu::UnicodeSet aspirational_scripts(
+       icu::UnicodeString(
+           // Unified Canadian Syllabics
+@@ -445,13 +445,13 @@
+           // Yi
+           "\\uA000-\\uA48C"
+           // Miao
+-          "\\U00016F00-\\U00016F44\\U00016F50-\\U00016F7F"
++          "\\U00016F00-\\U00016F44\\U00016F50-\\U00016F7E"
+           "\\U00016F8F-\\U00016F9F]",
+           -1, US_INV),
+       *status);
+   allowed_set.addAll(aspirational_scripts);
+ #else
+-#error "Update aspirational_scripts per Unicode 9.0"
++#error "Update aspirational_scripts per Unicode 10.0"
+ #endif
+ 
+   // U+0338 is included in the recommended set, while U+05F4 and U+2027 are in
+-- 
+2.10.2
+
+From e60b571faa3f14dd9119a6792dccf12f8bf80192 Mon Sep 17 00:00:00 2001
+From: jshin <[email protected]>
+Date: Fri, 21 Oct 2016 12:20:05 -0700
+Subject: [PATCH] Prepare to upgrade ICU to 58 part 2
+
+U_LB_COUNT is assumed to be 40 in Blink line breaking code, but it's
+43 in ICU 58/Unicode 9.
+
+Three new classes (Emoji Base, Emoji Modifier, and ZWJ) should behave
+identically whether or not 'word-break: break-all' is in effect.
+
+BUG=637001
+TEST=TextBreakIterator.cpp is compiled without an error with ICU 58.
[email protected]
+CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
+
+Review-Url: https://chromiumcodereview.appspot.com/2440923002
+Cr-Commit-Position: refs/heads/master@{#426860}
+---
+ .../WebKit/Source/platform/text/TextBreakIterator.cpp    | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp 
b/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp
+index 568dc0a..36121eb 100644
+--- a/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp
++++ b/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp
+@@ -27,6 +27,9 @@
+ #include "wtf/StdLibExtras.h"
+ #include "wtf/text/CharacterNames.h"
+ 
++#include <unicode/uchar.h>
++#include <unicode/uvernum.h>
++
+ namespace blink {
+ 
+ unsigned numGraphemeClusters(const String& string)
+@@ -123,13 +126,18 @@
+     { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), 0, B(0, 0, 0, 0, 
0, 0, 0, 0), 0, 0, 0, B(0, 0, 0, 0, 0, 0, 0, 0), 0, 0, 0, B(0, 0, 0, 0, 0, 0, 
0, 0) }, // DEL
+ };
+ 
++#if U_ICU_VERSION_MAJOR_NUM >= 58
++#define BA_LB_COUNT (U_LB_COUNT - 3)
++#else
++#define BA_LB_COUNT U_LB_COUNT
++#endif
+ // Line breaking table for CSS word-break: break-all. This table differs from
+ // asciiLineBreakTable in:
+ // - Indices are Line Breaking Classes defined in UAX#14 Unicode Line Breaking
+ //   Algorithm: http://unicode.org/reports/tr14/#DescriptionOfProperties
+ // - 1 indicates additional break opportunities. 0 indicates to fallback to
+ //   normal line break, not "prohibit break."
+-static const unsigned char breakAllLineBreakClassTable[][U_LB_COUNT / 8 + 1] 
= {
++static const unsigned char breakAllLineBreakClassTable[][BA_LB_COUNT / 8 + 1] 
= {
+     // XX AI AL B2 BA BB BK CB    CL CM CR EX GL HY ID IN    IS LF NS NU OP 
PO PR QU    SA SG SP SY ZW NL WJ H2    H3 JL JT JV CP CJ HL RI
+     { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 
0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // XX
+     { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 
0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // AI
+@@ -179,7 +187,7 @@
+ #undef AL
+ 
+ static_assert(WTF_ARRAY_LENGTH(asciiLineBreakTable) == 
asciiLineBreakTableLastChar - asciiLineBreakTableFirstChar + 1, 
"asciiLineBreakTable should be consistent");
+-static_assert(WTF_ARRAY_LENGTH(breakAllLineBreakClassTable) == U_LB_COUNT, 
"breakAllLineBreakClassTable should be consistent");
++static_assert(WTF_ARRAY_LENGTH(breakAllLineBreakClassTable) == BA_LB_COUNT, 
"breakAllLineBreakClassTable should be consistent");
+ 
+ static inline bool shouldBreakAfter(UChar lastCh, UChar ch, UChar nextCh)
+ {
+@@ -210,7 +218,7 @@
+ 
+ static inline bool shouldBreakAfterBreakAll(ULineBreak lastLineBreak, 
ULineBreak lineBreak)
+ {
+-    if (lineBreak >= 0 && lineBreak < U_LB_COUNT && lastLineBreak >= 0 && 
lastLineBreak < U_LB_COUNT) {
++    if (lineBreak >= 0 && lineBreak < BA_LB_COUNT && lastLineBreak >= 0 && 
lastLineBreak < BA_LB_COUNT) {
+         const unsigned char* tableRow = 
breakAllLineBreakClassTable[lastLineBreak];
+         return tableRow[lineBreak / 8] & (1 << (lineBreak % 8));
+     }
+-- 
+2.10.2

diff --git a/dev-util/electron/files/electron-1.3.5-vendor-brightray.patch 
b/dev-util/electron/files/electron-1.3.6-vendor-brightray.patch
similarity index 100%
rename from dev-util/electron/files/electron-1.3.5-vendor-brightray.patch
rename to dev-util/electron/files/electron-1.3.6-vendor-brightray.patch

diff --git 
a/dev-util/electron/files/electron-1.3.5-vendor-libchromiumcontent.patch 
b/dev-util/electron/files/electron-1.3.6-vendor-libchromiumcontent.patch
similarity index 100%
rename from 
dev-util/electron/files/electron-1.3.5-vendor-libchromiumcontent.patch
rename to dev-util/electron/files/electron-1.3.6-vendor-libchromiumcontent.patch

diff --git a/dev-util/electron/files/electron-1.3.5-vendor-node.patch 
b/dev-util/electron/files/electron-1.3.6-vendor-node.patch
similarity index 100%
rename from dev-util/electron/files/electron-1.3.5-vendor-node.patch
rename to dev-util/electron/files/electron-1.3.6-vendor-node.patch

diff --git a/dev-util/electron/files/electron-1.3.5.patch 
b/dev-util/electron/files/electron-1.3.6.patch
similarity index 100%
rename from dev-util/electron/files/electron-1.3.5.patch
rename to dev-util/electron/files/electron-1.3.6.patch

Reply via email to