Skip to content

Commit ec317c7

Browse files
author
Paulo Coutinho
authored
Merge pull request #46 from paulo-coutinho/4599
updated to version 4599
2 parents fdd23b7 + 5ad7a25 commit ec317c7

File tree

7 files changed

+54
-33
lines changed

7 files changed

+54
-33
lines changed

docker/android/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ WORKDIR /build
5454
RUN gclient config --unmanaged https://pdfium.googlesource.com/pdfium.git
5555
RUN gclient sync
5656
WORKDIR /build/pdfium
57-
RUN git checkout 08d0658d7560330f064b380ade2ef243cf7cf2d4
57+
RUN git checkout 4d2a36f310de4a269a1838174f3c076550d9bd6d
5858

5959
RUN ln -s /usr/bin/python3 /usr/bin/python
6060
RUN ln -s /usr/bin/pip3 /usr/bin/pip

docker/wasm/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ RUN make && make install
6565
RUN mkdir /emsdk
6666
WORKDIR /emsdk
6767
RUN git clone https://github.com/emscripten-core/emsdk.git .
68-
RUN ./emsdk install 2.0.24
69-
RUN ./emsdk activate 2.0.24
68+
RUN ./emsdk install 2.0.26
69+
RUN ./emsdk activate 2.0.26
7070
ENV PATH="${PATH}:/emsdk:/emsdk/upstream/emscripten"
7171

7272
# cache system libraries

extras/wasm/template/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
1616

17-
<script src="pdfium.js?v=4584"></script>
17+
<script src="pdfium.js?v=4599"></script>
1818

1919
<script>
2020
// variables
@@ -1038,7 +1038,7 @@ <h1 id="fileTitle" class="title" style="display: none;">PDF Viewer</h1>
10381038
everything run only on client side.
10391039
</p>
10401040
<p>
1041-
PDFium branch "4584" and commit "08d0658d7560330f064b380ade2ef243cf7cf2d4".
1041+
PDFium branch "4599" and commit "4d2a36f310de4a269a1838174f3c076550d9bd6d".
10421042
</p>
10431043
</div>
10441044
</footer>

extras/wasm/utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"main": "index.js",
55
"license": "MIT",
66
"dependencies": {
7-
"xmldom": "0.5.0",
7+
"xmldom": "0.6.0",
88
"xpath": "0.0.32"
99
}
1010
}

modules/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
targets = ["ios", "macos", "android"]
66

77
# pdfium
8-
pdfium_git_branch = "4584"
9-
pdfium_git_commit = "08d0658d7560330f064b380ade2ef243cf7cf2d4"
10-
# ^ ref: https://pdfium.googlesource.com/pdfium/+/refs/heads/chromium/4584
8+
pdfium_git_branch = "4599"
9+
pdfium_git_commit = "4d2a36f310de4a269a1838174f3c076550d9bd6d"
10+
# ^ ref: https://pdfium.googlesource.com/pdfium/+/refs/heads/chromium/4599
1111
# OBS 1: don't forget change in android docker file (docker/android/Dockerfile)
1212
# OBS 2: don't forget change in wasm docker file (docker/wasm/Dockerfile)
1313

modules/ios.py

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ def run_task_patch():
4747
source_dir,
4848
"BUILD.gn",
4949
)
50-
if not f.file_line_has_content(source_file, 245, '#test("pdfium_unittests") {\n'):
50+
if not f.file_line_has_content(source_file, 244, '#test("pdfium_unittests") {\n'):
5151
f.file_line_comment_range(
52-
source_file, 245, 292
52+
source_file, 244, 291
5353
) # comment all lines of "pdfium_unittests"
5454
f.file_line_comment_range(
55-
source_file, 383, 384
55+
source_file, 382, 383
5656
) # group "pdfium_all", comment all tests
5757

5858
f.debug("Applied: Build GN")
@@ -116,8 +116,8 @@ def run_task_patch():
116116
"compiler",
117117
"BUILD.gn",
118118
)
119-
if f.file_line_has_content(source_file, 1703, ' "-Wimplicit-fallthrough",\n'):
120-
f.file_line_comment(source_file, 1703)
119+
if f.file_line_has_content(source_file, 1705, ' "-Wimplicit-fallthrough",\n'):
120+
f.file_line_comment(source_file, 1705)
121121

122122
f.debug("Applied: Compiler")
123123
else:
@@ -153,11 +153,11 @@ def run_task_patch():
153153
"cpdf_type1font.cpp",
154154
)
155155
if not f.file_line_has_content(
156-
source_file, 21, "#include <CoreGraphics/CoreGraphics.h>\n"
156+
source_file, 22, "#include <CoreGraphics/CoreGraphics.h>\n"
157157
):
158158
f.replace_line_in_file(
159159
source_file,
160-
21,
160+
22,
161161
"#include <CoreGraphics/CoreGraphics.h>\n",
162162
)
163163

@@ -174,9 +174,9 @@ def run_task_patch():
174174
"rules.gni",
175175
)
176176
if not f.file_line_has_content(
177-
source_file, 951, '# data_deps += [ "//testing/iossim" ]\n'
177+
source_file, 954, '# data_deps += [ "//testing/iossim" ]\n'
178178
):
179-
f.file_line_comment(source_file, 951)
179+
f.file_line_comment(source_file, 954)
180180

181181
f.debug("Applied: iOS Simulator")
182182
else:
@@ -231,6 +231,27 @@ def run_task_patch():
231231
else:
232232
f.debug("Skipped: Core FXGE")
233233

234+
# clang 12
235+
source_file = os.path.join(
236+
source_dir,
237+
"build",
238+
"config",
239+
"compiler",
240+
"BUILD.gn",
241+
)
242+
if f.file_line_has_content(
243+
source_file, 1230, ' cflags += [ "-ffile-compilation-dir=." ]\n'
244+
):
245+
f.replace_line_in_file(
246+
source_file,
247+
1230,
248+
' cflags += ["-Xclang","-fdebug-compilation-dir","-Xclang","."]\n',
249+
)
250+
251+
f.debug("Applied: Clang 12")
252+
else:
253+
f.debug("Skipped: Clang 12")
254+
234255

235256
def run_task_build():
236257
f.debug("Building libraries...")

modules/wasm.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ def run_task_patch():
9292
)
9393
if f.file_line_has_content(
9494
source_file,
95-
217,
95+
216,
9696
' configs -= [ "//build/config/compiler:thin_archive" ]\n',
9797
):
9898
f.replace_line_in_file(
9999
source_file,
100-
217,
100+
216,
101101
' #configs -= [ "//build/config/compiler:thin_archive" ]\n',
102102
)
103103

@@ -115,22 +115,22 @@ def run_task_patch():
115115
)
116116
if f.file_line_has_content(
117117
source_file,
118-
835,
118+
846,
119119
' "-m64",\n',
120120
):
121121
f.replace_line_in_file(
122122
source_file,
123-
835,
123+
846,
124124
' #"-m64",\n',
125125
)
126126
f.replace_line_in_file(
127127
source_file,
128-
836,
128+
847,
129129
' #"-march=$x64_arch",\n',
130130
)
131131
f.replace_line_in_file(
132132
source_file,
133-
837,
133+
848,
134134
' #"-msse3",\n',
135135
)
136136

@@ -148,12 +148,12 @@ def run_task_patch():
148148
)
149149
if f.file_line_has_content(
150150
source_file,
151-
1608,
151+
1621,
152152
' "-Wno-ignored-pragma-optimize",\n',
153153
):
154154
f.replace_line_in_file(
155155
source_file,
156-
1608,
156+
1621,
157157
' "-Wno-deprecated-register",\n',
158158
)
159159

@@ -171,12 +171,12 @@ def run_task_patch():
171171
)
172172
if f.file_line_has_content(
173173
source_file,
174-
2424,
174+
2426,
175175
' cflags += [ "-ggnu-pubnames" ]\n',
176176
):
177177
f.replace_line_in_file(
178178
source_file,
179-
2424,
179+
2426,
180180
' #cflags += [ "-ggnu-pubnames" ]\n',
181181
)
182182

@@ -245,18 +245,18 @@ def run_task_patch():
245245
)
246246
if f.file_line_has_content(
247247
source_file,
248-
335,
248+
333,
249249
' cflags += [ "-fstack-protector" ]\n',
250250
):
251251
f.replace_line_in_file(
252252
source_file,
253-
335,
253+
333,
254254
' cflags += [ "-fno-stack-protector" ]\n',
255255
)
256256

257257
f.replace_line_in_file(
258258
source_file,
259-
347,
259+
345,
260260
' cflags += [ "-fno-stack-protector" ]\n',
261261
)
262262

@@ -296,12 +296,12 @@ def run_task_patch():
296296
)
297297
if f.file_line_has_content(
298298
source_file,
299-
496,
299+
494,
300300
' cflags += [ "-pthread" ]\n',
301301
):
302302
f.replace_line_in_file(
303303
source_file,
304-
496,
304+
494,
305305
' #cflags += [ "-pthread" ]\n',
306306
)
307307

0 commit comments

Comments
 (0)