FreeBSD Bugzilla – Attachment 177031 Details for
Bug 214536
www/chromium: fails to build with ICU 58.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix + commit message
chromium.icu58.diff (text/plain), 7.13 KB, created by
Jan Beich
on 2016-11-15 18:42:20 UTC
(
hide
)
Description:
fix + commit message
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2016-11-15 18:42:20 UTC
Size:
7.13 KB
patch
obsolete
>From 5648ed43120e3fd17cb3b1e0ef4892485d483ed6 Mon Sep 17 00:00:00 2001 >From: "Carlos J. Puga Medina" <cpm@freebsd.org> >Date: Tue, 15 Nov 2016 17:42:13 +0000 >Subject: www/chromium: unbreak against ICU 58.1 > >components/url_formatter/url_formatter.cc:454:2: error: "Update aspirational_scripts per Unicode 9.0" > ^ >third_party/WebKit/Source/platform/text/TextBreakIterator.cpp:182:1: error: static_assert failed "breakAllLineBreakClassTable should be consistent" >static_assert(WTF_ARRAY_LENGTH(breakAllLineBreakClassTable) == U_LB_COUNT, "breakAllLineBreakClassTable should be consistent"); >^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > >PR: 214536 >Obtained from: upstream >Approved by: ??? (chromium) or portmgr blanket >--- > www/chromium/Makefile | 2 +- > ...tch-components_url__formatter_url__formatter.cc | 33 +++++++++++ > ...bKit_Source_platform_text_TextBreakIterator.cpp | 64 ++++++++++++++++++++++ > 3 files changed, 98 insertions(+), 1 deletion(-) > create mode 100644 www/chromium/files/patch-components_url__formatter_url__formatter.cc > create mode 100644 www/chromium/files/patch-third__party_WebKit_Source_platform_text_TextBreakIterator.cpp > >diff --git a/www/chromium/Makefile b/www/chromium/Makefile >index d2ee441..2e853ab 100644 >--- a/www/chromium/Makefile >+++ b/www/chromium/Makefile >@@ -3,7 +3,7 @@ > > PORTNAME= chromium > PORTVERSION= 52.0.2743.116 >-PORTREVISION= 3 >+PORTREVISION= 4 > CATEGORIES= www > MASTER_SITES= http://commondatastorage.googleapis.com/chromium-browser-official/ > DISTFILES= ${DISTNAME}${EXTRACT_SUFX} # default, but needed to get distinfo correct if TEST is on >diff --git a/www/chromium/files/patch-components_url__formatter_url__formatter.cc b/www/chromium/files/patch-components_url__formatter_url__formatter.cc >new file mode 100644 >index 0000000..0fc915b95 >--- /dev/null >+++ b/www/chromium/files/patch-components_url__formatter_url__formatter.cc >@@ -0,0 +1,33 @@ >+https://chromium.googlesource.com/chromium/src.git/+/424584b4984bde7c831f42e9fb47f1ad583a1c46%5E%21/ >+ >+--- components/url_formatter/url_formatter.cc.orig 2016-08-03 19:02:17 UTC >++++ components/url_formatter/url_formatter.cc >+@@ -429,9 +429,9 @@ void IDNSpoofChecker::SetAllowedUnicodeS >+ // section at >+ // http://www.unicode.org/Public/security/latest/xidmodifications.txt) are >+ // 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 >++ // version of Unicode is released. The current version is 9.0.0 and ICU 60 >++ // will have Unicode 10.0 data. >++#if U_ICU_VERSION_MAJOR_NUM < 60 >+ const icu::UnicodeSet aspirational_scripts( >+ icu::UnicodeString( >+ // Unified Canadian Syllabics >+@@ -445,13 +445,13 @@ void IDNSpoofChecker::SetAllowedUnicodeS >+ // 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 >diff --git a/www/chromium/files/patch-third__party_WebKit_Source_platform_text_TextBreakIterator.cpp b/www/chromium/files/patch-third__party_WebKit_Source_platform_text_TextBreakIterator.cpp >new file mode 100644 >index 0000000..ce430a5 >--- /dev/null >+++ b/www/chromium/files/patch-third__party_WebKit_Source_platform_text_TextBreakIterator.cpp >@@ -0,0 +1,64 @@ >+https://chromium.googlesource.com/chromium/src.git/+/e60b571faa3f14dd9119a6792dccf12f8bf80192%5E%21/ >+ >+--- third_party/WebKit/Source/platform/text/TextBreakIterator.cpp.orig 2016-08-03 19:02:36 UTC >++++ 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 @@ static const unsigned char asciiLineBrea >+ { 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,10 +187,10 @@ static const unsigned char breakAllLineB >+ #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) >+-{ >++static inline bool shouldBreakAfter(UChar lastCh, UChar ch, UChar nextCh) { >+ // Don't allow line breaking between '-' and a digit if the '-' may mean a minus sign in the context, >+ // while allow breaking in 'ABCD-1234' and '1234-5678' which may be in long URLs. >+ if (ch == '-' && isASCIIDigit(nextCh)) >+@@ -210,10 +218,11 @@ static inline ULineBreak lineBreakProper >+ >+ static inline bool shouldBreakAfterBreakAll(ULineBreak lastLineBreak, ULineBreak lineBreak) >+ { >+- if (lineBreak >= 0 && lineBreak < U_LB_COUNT && lastLineBreak >= 0 && lastLineBreak < U_LB_COUNT) { >+- const unsigned char* tableRow = breakAllLineBreakClassTable[lastLineBreak]; >+- return tableRow[lineBreak / 8] & (1 << (lineBreak % 8)); >+- } >++ 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)); >++ } >+ return false; >+ } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
jbeich
:
maintainer-approval?
(
chromium
)
Actions:
View
|
Diff
Attachments on
bug 214536
:
177026
| 177031