summaryrefslogtreecommitdiff
path: root/external/pdfium/UnpackedTarball_pdfium.mk
blob: 5d7708ade96c628c32a28c079e8e914845e5fbad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

pdfium_patches :=
pdfium_patches += visibility.patch.1
pdfium_patches += ubsan.patch
# Fixes build on our baseline.
pdfium_patches += build.patch.1
# Adds missing editing API
# Backport of <https://pdfium-review.googlesource.com/35931>.
pdfium_patches += 0001-Add-FPDFTextObj_GetFontSize-API.patch.patch.1
# Backport of <https://pdfium-review.googlesource.com/36750>.
pdfium_patches += 0001-Add-FPDFText_GetTextRenderMode-API.patch.1
# Backport of <https://pdfium-review.googlesource.com/37316>.
pdfium_patches += 0001-Add-FPDFFormObj_CountObjects-API.patch.1
# Backport of <https://pdfium-review.googlesource.com/37890>.
pdfium_patches += 0001-Add-FPDFFormObj_GetObject-API.patch.1
# Backport of <https://pdfium-review.googlesource.com/38870>.
pdfium_patches += 0001-Add-FPDFText_GetFontName-API.patch.1
# Backport of <https://pdfium-review.googlesource.com/39530>.
pdfium_patches += 0001-Add-FPDFTextObj_GetText-API.patch.1
# Backport of <https://pdfium-review.googlesource.com/39930>.
pdfium_patches += 0001-Add-FPDFFormObj_GetMatrix-API.patch.1
pdfium_patches += 0003-svx-import-PDF-images-as-BGRA.patch.2

$(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium))

$(eval $(call gb_UnpackedTarball_set_tarball,pdfium,$(PDFIUM_TARBALL)))

$(eval $(call gb_UnpackedTarball_set_patchlevel,pdfium,0))

$(eval $(call gb_UnpackedTarball_add_patches,pdfium,\
    $(foreach patch,$(pdfium_patches),external/pdfium/$(patch)) \
))

# Upstream build system generates this, but it's not really a generated file.
# Stripped down version from <https://dxr.mozilla.org/mozilla-central/source/ipc/chromium/src/build/build_config.h>.
$(eval $(call gb_UnpackedTarball_add_file,pdfium,build/build_config.h,external/pdfium/configs/build_config.h))

$(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\
    mv third_party/bigint/BigInteger.cc third_party/bigint/BigInteger.cpp && \
    mv third_party/bigint/BigIntegerUtils.cc third_party/bigint/BigIntegerUtils.cpp && \
    mv third_party/bigint/BigUnsigned.cc third_party/bigint/BigUnsigned.cpp && \
    mv third_party/bigint/BigUnsignedInABase.cc third_party/bigint/BigUnsignedInABase.cpp && \
    mv third_party/base/allocator/partition_allocator/address_space_randomization.cc third_party/base/allocator/partition_allocator/address_space_randomization.cpp && \
    mv third_party/base/allocator/partition_allocator/page_allocator.cc third_party/base/allocator/partition_allocator/page_allocator.cpp && \
    mv third_party/base/allocator/partition_allocator/partition_alloc.cc third_party/base/allocator/partition_allocator/partition_alloc.cpp && \
    mv third_party/base/allocator/partition_allocator/spin_lock.cc third_party/base/allocator/partition_allocator/spin_lock.cpp \
))

# vim: set noet sw=4 ts=4: