Skip to content

Commit d720ab8

Browse files
committed
fixing patch and script
1 parent 8ba6c20 commit d720ab8

File tree

2 files changed

+53
-25
lines changed

2 files changed

+53
-25
lines changed

patches/jsc.patch

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
diff -aur target-org/webkit/CMakeLists.txt target/webkit/CMakeLists.txt
2+
--- target-org/webkit/CMakeLists.txt 2017-12-22 19:18:43.000000000 +0200
3+
+++ target/webkit/CMakeLists.txt 2018-06-14 15:41:59.000000000 +0300
4+
@@ -170,13 +170,13 @@
5+
add_subdirectory(Tools)
6+
endif ()
7+
8+
-if ("${PORT}" STREQUAL "GTK" OR "${PORT}" STREQUAL "WPE")
9+
- if (DEVELOPER_MODE)
10+
- add_subdirectory(PerformanceTests)
11+
- endif ()
12+
-else ()
13+
- add_subdirectory(PerformanceTests)
14+
-endif ()
15+
+#if ("${PORT}" STREQUAL "GTK" OR "${PORT}" STREQUAL "WPE")
16+
+# if (DEVELOPER_MODE)
17+
+# add_subdirectory(PerformanceTests)
18+
+# endif ()
19+
+#else ()
20+
+# add_subdirectory(PerformanceTests)
21+
+#endif ()
22+
23+
# -----------------------------------------------------------------------------
24+
# Print the features list last, for maximum visibility.
125
diff -aur target-org/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp target/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp
226
--- target-org/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp 2017-02-03 22:59:08.000000000 +0100
327
+++ target/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp 2017-08-02 10:07:11.000383124 +0200
@@ -88,19 +112,17 @@ diff -aur target-org/webkit/Source/JavaScriptCore/CMakeLists.txt target/webkit/S
88112

89113
# Force staging of shared scripts, even if they aren't directly used to build JavaScriptCore.
90114

91-
diff -aur target-org/webkit/Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp target/webkit/Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp
92-
--- target-org/webkit/Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp 2016-10-08 05:31:15.000000000 +0200
93-
+++ target/webkit/Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp 2017-07-11 11:34:55.962374878 +0200
94-
@@ -24,24 +24,29 @@
115+
diff -aur target-org/webkit/Source/WTF/wtf/unix/LanguageUnix.cpp target/webkit/Source/WTF/wtf/unix/LanguageUnix.cpp
116+
--- target-org/webkit/Source/WTF/wtf/unix/LanguageUnix.cpp 2017-09-08 02:11:21.000000000 +0300
117+
+++ target/webkit/Source/WTF/wtf/unix/LanguageUnix.cpp 2018-06-14 15:41:18.000000000 +0300
118+
@@ -24,22 +24,25 @@
95119
#include <locale.h>
96120
#include <wtf/Vector.h>
97121
#include <wtf/text/WTFString.h>
98122
+#include <sys/system_properties.h>
99-
123+
100124
namespace WTF {
101-
102-
void setPlatformUserPreferredLanguagesChangedCallback(void (*)()) { }
103-
125+
104126
-// Using pango_language_get_default() here is not an option, because
105127
-// it doesn't support changing the locale in runtime, so it returns
106128
-// always the same value.
@@ -109,26 +131,25 @@ diff -aur target-org/webkit/Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cp
109131
- String localeDefault(setlocale(LC_CTYPE, nullptr));
110132
- if (localeDefault.isEmpty() || equalIgnoringASCIICase(localeDefault, "C") || equalIgnoringASCIICase(localeDefault, "POSIX"))
111133
+ char buf[2 * (PROP_VALUE_MAX + 1)];
112-
+
113134
+ int locale_len = __system_property_get("persist.sys.locale", buf);
114135
+ if (locale_len == 0) {
115136
+ int lang_len = __system_property_get("persist.sys.language", buf);
116137
+ if(lang_len == 0) {
117138
return ASCIILiteral("en-US");
139+
-
140+
- String normalizedDefault = localeDefault;
141+
- normalizedDefault.replace('_', '-');
142+
- normalizedDefault.truncate(normalizedDefault.find('.'));
143+
- return normalizedDefault;
118144
+ }
119145
+ int country_len = __system_property_get("persist.sys.country", buf + lang_len + 1);
120146
+ if(country_len != 0) {
121147
+ buf[lang_len] = '-';
122148
+ }
123149
+ }
124-
125-
- String normalizedDefault = localeDefault;
126-
- normalizedDefault.replace('_', '-');
127-
- normalizedDefault.truncate(normalizedDefault.find('.'));
128-
- return normalizedDefault;
129150
+ return String(buf);
130151
}
131-
152+
132153
Vector<String> platformUserPreferredLanguages()
133154
diff -aur target-org/webkit/Source/WTF/wtf/StackTrace.cpp target/webkit/Source/WTF/wtf/StackTrace.cpp
134155
--- target-org/webkit/Source/WTF/wtf/StackTrace.cpp 2017-04-25 04:53:49.000000000 +0200

scripts/start.sh

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ ROOTDIR=$PWD
44
TARGETDIR=$ROOTDIR/build/target
55
REVISION=$(svn info --show-item last-changed-revision "https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-${npm_package_config_webkitGTK}")
66

7-
prep() {
8-
echo -e '\033]2;'prep'\007'
9-
printf "\n\n\t\t===================== copy downloaded sources =====================\n\n"
10-
rm -rf $TARGETDIR
11-
cp -Rf $ROOTDIR/build/download $TARGETDIR
12-
7+
patchAndMakeICU() {
138
printf "\n\n\t\t===================== patch and make icu into target/icu/host =====================\n\n"
149
ICU_VERSION_MAJOR="$(awk '/ICU_VERSION_MAJOR_NUM/ {print $3}' $TARGETDIR/icu/source/common/unicode/uvernum.h)"
1510
printf "ICU version: ${ICU_VERSION_MAJOR}\n"
@@ -26,6 +21,11 @@ prep() {
2621
make -j5
2722
cd $ROOTDIR
2823

24+
#remove icu headers from WTF, so it won't use them instead of the ones from icu/host/common
25+
rm -rf "$TARGETDIR"/webkit/Source/WTF/icu
26+
}
27+
28+
patchJsc() {
2929
printf "\n\n\t\t===================== patch jsc =====================\n\n"
3030
patch -d $TARGETDIR -p1 < $ROOTDIR/patches/jsc.patch
3131

@@ -34,11 +34,18 @@ prep() {
3434
then
3535
patch -d $TARGETDIR -N -p1 < $ROOTDIR/patches/intl/icu-disabled.patch
3636
fi
37+
}
3738

38-
#remove icu headers from WTF, so it won't use them instead of the ones from icu/host/common
39-
rm -rf "$TARGETDIR"/webkit/Source/WTF/icu
40-
41-
echo "orig: $(find $ROOTDIR/build/target | grep \.orig)"
39+
prep() {
40+
echo -e '\033]2;'prep'\007'
41+
printf "\n\n\t\t===================== copy downloaded sources =====================\n\n"
42+
rm -rf $TARGETDIR
43+
cp -Rf $ROOTDIR/build/download $TARGETDIR
44+
45+
patchAndMakeICU
46+
patchJsc
47+
# origs=$(find $ROOTDIR/build/target -name "*.orig")
48+
# [ -z "$origs" ] || { echo "orig files: $origs" 1>&2 ; exit 1; }
4249
}
4350

4451
compile() {

0 commit comments

Comments
 (0)