aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-15 02:02:02 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-15 02:02:02 +0000
commit2c1a81d193467805abdef55adf636ecc15d1cb5c (patch)
tree670b2008ff8484c5b755006915334d675da27b4d
parentec8543f174757776c0f57b8544613abc0a351010 (diff)
parent75942ef07fd225352e3691819bb258baa42e46e5 (diff)
downloadpdfium-android12-mainline-captiveportallogin-release.tar.gz
Snap for 7550930 from 75942ef07fd225352e3691819bb258baa42e46e5 to mainline-captiveportallogin-releaseandroid-mainline-12.0.0_r6android-mainline-12.0.0_r23android12-mainline-captiveportallogin-release
Change-Id: Icb42de67db1ed486b3762808ccc54f4981282e55
-rw-r--r--Android.bp58
-rw-r--r--METADATA9
-rw-r--r--NOTICE27
-rw-r--r--constants/Android.bp10
-rw-r--r--core/fdrm/Android.bp9
-rw-r--r--core/fpdfapi/cmaps/Android.bp9
-rw-r--r--core/fpdfapi/edit/Android.bp9
-rw-r--r--core/fpdfapi/font/Android.bp9
-rw-r--r--core/fpdfapi/page/Android.bp9
-rw-r--r--core/fpdfapi/parser/Android.bp9
-rw-r--r--core/fpdfapi/render/Android.bp9
-rw-r--r--core/fpdfdoc/Android.bp9
-rw-r--r--core/fpdftext/Android.bp9
-rw-r--r--core/fxcodec/Android.bp9
-rw-r--r--core/fxcrt/Android.bp13
-rw-r--r--core/fxge/Android.bp9
-rw-r--r--fpdfsdk/Android.bp9
-rw-r--r--fpdfsdk/formfiller/Android.bp9
-rw-r--r--fpdfsdk/pwl/Android.bp9
-rw-r--r--fxjs/Android.bp9
-rw-r--r--third_party/Android.bp17
21 files changed, 233 insertions, 36 deletions
diff --git a/Android.bp b/Android.bp
index 575921228..4af25048f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,3 +1,43 @@
+// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE
+// CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE
+// DEPENDING ON IT IN YOUR PROJECT. ***
+package {
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
+// Added automatically by a large-scale-change that took the approach of
+// 'apply every license found to every target'. While this makes sure we respect
+// every license restriction, it may not be entirely correct.
+//
+// e.g. GPL in an MIT project might only apply to the contrib/ directory.
+//
+// Please consider splitting the single license below into multiple licenses,
+// taking care not to lose any license_kind information, and overriding the
+// default license using the 'licenses: [...]' property on targets as needed.
+//
+// For unused files, consider creating a 'fileGroup' with "//visibility:private"
+// to attach the license to, and including a comment whether the files may be
+// used in the current project.
+// See: http://go/android-license-faq
+license {
+ name: "external_pdfium_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ "SPDX-license-identifier-Artistic",
+ "SPDX-license-identifier-BSD",
+ "SPDX-license-identifier-FTL",
+ "SPDX-license-identifier-MIT",
+ "SPDX-license-identifier-OFL", // by exception only
+ "SPDX-license-identifier-Zlib",
+ "SPDX-license-identifier-libtiff",
+ "legacy_unencumbered",
+ ],
+ license_text: [
+ "LICENSE",
+ ],
+}
+
cc_defaults {
name: "pdfium-common",
cflags: [
@@ -11,14 +51,18 @@ cc_defaults {
"-Wno-non-virtual-dtor",
"-Wno-unused-parameter",
- // The new pass manager causes non-deterministic build result.
- // http://b/135660678
- "-fno-experimental-new-pass-manager",
-
// pdfium_common_config
"-DOPJ_STATIC",
"-DPNG_PREFIX",
"-DPNG_USE_READ_MACROS",
+
+ // Do not export functions by default. Export only functions annotated
+ // with FPDF_EXPORT.
+ "-fvisibility=hidden",
+
+ // Macro definitions to enable FPDF_EXPORT.
+ "-DCOMPONENT_BUILD",
+ "-DFPDF_IMPLEMENTATION",
],
arch: {
@@ -100,13 +144,17 @@ cc_library_shared {
// TODO: figure out why turning on exceptions requires manually linking libdl
shared_libs: [
- "libandroidicu",
"libdl",
"libft2",
+ "libicu",
"libjpeg",
"libz",
],
+ ldflags: [
+ "-Wl,-icf=all",
+ ],
+
export_include_dirs: ["public"],
}
diff --git a/METADATA b/METADATA
new file mode 100644
index 000000000..2cfbeccd6
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,9 @@
+# *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE
+# CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE
+# DEPENDING ON IT IN YOUR PROJECT. ***
+third_party {
+ # would be NOTICE save for OFL 1.1 in:
+ # testing/resources/pixel/bug_925736.pdf
+ # testing/resources/text_font.pdf
+ license_type: BY_EXCEPTION_ONLY
+}
diff --git a/NOTICE b/NOTICE
deleted file mode 100644
index 8b4ed6ddd..000000000
--- a/NOTICE
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/constants/Android.bp b/constants/Android.bp
index 23c97557d..caa06a7c9 100644
--- a/constants/Android.bp
+++ b/constants/Android.bp
@@ -1,6 +1,14 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_headers {
name: "libpdfium-constants",
export_include_dirs: ["."],
visibility: ["//external/pdfium:__subpackages__"],
}
-
diff --git a/core/fdrm/Android.bp b/core/fdrm/Android.bp
index c35475a0f..574a9ffe5 100644
--- a/core/fdrm/Android.bp
+++ b/core/fdrm/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-fdrm",
defaults: ["pdfium-core"],
diff --git a/core/fpdfapi/cmaps/Android.bp b/core/fpdfapi/cmaps/Android.bp
index e2d5067b2..27e34391c 100644
--- a/core/fpdfapi/cmaps/Android.bp
+++ b/core/fpdfapi/cmaps/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-cmaps",
defaults: ["pdfium-core"],
diff --git a/core/fpdfapi/edit/Android.bp b/core/fpdfapi/edit/Android.bp
index bbd2b6341..1822b06c4 100644
--- a/core/fpdfapi/edit/Android.bp
+++ b/core/fpdfapi/edit/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-edit",
defaults: ["pdfium-core"],
diff --git a/core/fpdfapi/font/Android.bp b/core/fpdfapi/font/Android.bp
index c4054f4c0..ae6301e1d 100644
--- a/core/fpdfapi/font/Android.bp
+++ b/core/fpdfapi/font/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-font",
defaults: ["pdfium-core"],
diff --git a/core/fpdfapi/page/Android.bp b/core/fpdfapi/page/Android.bp
index 650e4f802..e44cca217 100644
--- a/core/fpdfapi/page/Android.bp
+++ b/core/fpdfapi/page/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-page",
defaults: ["pdfium-core"],
diff --git a/core/fpdfapi/parser/Android.bp b/core/fpdfapi/parser/Android.bp
index 6864dfac6..cacb42e03 100644
--- a/core/fpdfapi/parser/Android.bp
+++ b/core/fpdfapi/parser/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-parser",
defaults: ["pdfium-core"],
diff --git a/core/fpdfapi/render/Android.bp b/core/fpdfapi/render/Android.bp
index 60818b5ed..79b0db617 100644
--- a/core/fpdfapi/render/Android.bp
+++ b/core/fpdfapi/render/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-render",
defaults: ["pdfium-core"],
diff --git a/core/fpdfdoc/Android.bp b/core/fpdfdoc/Android.bp
index 5bb33ea5e..6931dc5a3 100644
--- a/core/fpdfdoc/Android.bp
+++ b/core/fpdfdoc/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-fpdfdoc",
defaults: ["pdfium-core"],
diff --git a/core/fpdftext/Android.bp b/core/fpdftext/Android.bp
index 711f35dcd..b3b4ef0f0 100644
--- a/core/fpdftext/Android.bp
+++ b/core/fpdftext/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-fpdftext",
defaults: ["pdfium-core"],
diff --git a/core/fxcodec/Android.bp b/core/fxcodec/Android.bp
index b5d78d1a7..7e5e69b45 100644
--- a/core/fxcodec/Android.bp
+++ b/core/fxcodec/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-fxcodec",
defaults: ["pdfium-core"],
diff --git a/core/fxcrt/Android.bp b/core/fxcrt/Android.bp
index d48b2848c..5f6cb4105 100644
--- a/core/fxcrt/Android.bp
+++ b/core/fxcrt/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-fxcrt",
defaults: ["pdfium-core"],
@@ -5,7 +14,7 @@ cc_library_static {
visibility: ["//external/pdfium:__subpackages__"],
export_shared_lib_headers: [
- "libandroidicu",
+ "libicu",
],
static_libs: [
@@ -13,7 +22,7 @@ cc_library_static {
],
shared_libs: [
- "libandroidicu",
+ "libicu",
],
exclude_srcs: [
diff --git a/core/fxge/Android.bp b/core/fxge/Android.bp
index fe648c669..973ca03d3 100644
--- a/core/fxge/Android.bp
+++ b/core/fxge/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-fxge",
defaults: ["pdfium-core"],
diff --git a/fpdfsdk/Android.bp b/fpdfsdk/Android.bp
index af37009aa..f9c3861e3 100644
--- a/fpdfsdk/Android.bp
+++ b/fpdfsdk/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-fpdfsdk",
defaults: ["pdfium-core"],
diff --git a/fpdfsdk/formfiller/Android.bp b/fpdfsdk/formfiller/Android.bp
index 5dc4ba68c..960992a1a 100644
--- a/fpdfsdk/formfiller/Android.bp
+++ b/fpdfsdk/formfiller/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-formfiller",
defaults: ["pdfium-core"],
diff --git a/fpdfsdk/pwl/Android.bp b/fpdfsdk/pwl/Android.bp
index d57a01f33..74fc563a7 100644
--- a/fpdfsdk/pwl/Android.bp
+++ b/fpdfsdk/pwl/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-pwl",
defaults: ["pdfium-core"],
diff --git a/fxjs/Android.bp b/fxjs/Android.bp
index 9616816ea..2dc3861ab 100644
--- a/fxjs/Android.bp
+++ b/fxjs/Android.bp
@@ -1,3 +1,12 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-BSD
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_library_static {
name: "libpdfium-fxjs",
defaults: ["pdfium-core"],
diff --git a/third_party/Android.bp b/third_party/Android.bp
index 824544efb..3fcb08d80 100644
--- a/third_party/Android.bp
+++ b/third_party/Android.bp
@@ -1,3 +1,18 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "external_pdfium_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Artistic
+ // SPDX-license-identifier-BSD
+ // SPDX-license-identifier-FTL
+ // SPDX-license-identifier-MIT
+ // SPDX-license-identifier-Zlib
+ // SPDX-license-identifier-libtiff
+ // legacy_unencumbered
+ default_applicable_licenses: ["external_pdfium_license"],
+}
+
cc_defaults {
name: "pdfium-third-party",
defaults: [
@@ -65,6 +80,7 @@ cc_library_static {
cc_library_static {
name: "libpdfium-libopenjpeg2",
defaults: ["pdfium-third-party"],
+ visibility: ["//cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-8332"],
exclude_srcs: [
"libopenjpeg20/t1_generate_luts.c",
@@ -97,4 +113,3 @@ cc_library_static {
"skia_shared/*.cpp",
],
}
-