summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-15 02:04:58 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-15 02:04:58 +0000
commit54913234aba591f2f502d7765aa84756147fa232 (patch)
treeef1d608c30858143c48a34242fcfb72e1a4a58c4
parentfdffd0deafab0930c09d02b017fb09f622e77809 (diff)
parent3c5cf0bebd44055642a4d0ed34f45cb7434e3e85 (diff)
downloadppp-android12-mainline-resolv-release.tar.gz
Change-Id: If8ebacd4bbf594dd390c81f32bb5d3fe073c6025
-rw-r--r--Android.bp35
-rw-r--r--METADATA3
-rw-r--r--pppd/Android.bp85
3 files changed, 118 insertions, 5 deletions
diff --git a/Android.bp b/Android.bp
index 3704241..1a3f3ae 100644
--- a/Android.bp
+++ b/Android.bp
@@ -12,4 +12,39 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ default_applicable_licenses: ["external_ppp_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_ppp_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-0BSD",
+ "SPDX-license-identifier-Apache-2.0",
+ "SPDX-license-identifier-BSD",
+ "SPDX-license-identifier-GPL",
+ "SPDX-license-identifier-GPL-2.0",
+ "SPDX-license-identifier-LGPL",
+ "SPDX-license-identifier-MIT",
+ "legacy_notice",
+ "legacy_unencumbered",
+ ],
+ // large-scale-change unable to identify any license_text files
+}
+
subdirs = ["pppd"]
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..6d8601b
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,3 @@
+third_party {
+ license_type: RESTRICTED
+}
diff --git a/pppd/Android.bp b/pppd/Android.bp
index 4e01738..dfa36bd 100644
--- a/pppd/Android.bp
+++ b/pppd/Android.bp
@@ -12,6 +12,43 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+package {
+ default_applicable_licenses: ["external_ppp_pppd_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_ppp_pppd_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-0BSD",
+ "SPDX-license-identifier-Apache-2.0",
+ "SPDX-license-identifier-BSD",
+ "SPDX-license-identifier-GPL",
+ "SPDX-license-identifier-GPL-2.0",
+ "SPDX-license-identifier-LGPL",
+ "SPDX-license-identifier-MIT",
+ "legacy_notice",
+ "legacy_unencumbered",
+ ],
+ license_text: [
+ "NOTICE",
+ ],
+}
+
cc_defaults {
name: "ppp_defaults",
cflags: [
@@ -23,14 +60,13 @@ cc_defaults {
"-Wno-unused-parameter",
"-Werror",
"-Wno-pointer-sign",
+ "-DPLUGIN",
],
local_include_dirs: ["include"],
}
-cc_binary {
- name: "pppd",
- defaults: ["ppp_defaults"],
-
+filegroup {
+ name: "pppd-sources",
srcs: [
"auth.c",
"ccp.c",
@@ -55,7 +91,17 @@ cc_binary {
"tty.c",
"upap.c",
"utils.c",
+ ]
+}
+
+cc_library_static {
+ name: "libpppd",
+ defaults: ["ppp_defaults"],
+
+ srcs: [
+ ":pppd-sources"
],
+ export_include_dirs:[".", "include"],
// options.c:623:21: error: passing 'const char *' to parameter of
// type 'char *' discards qualifiers.
@@ -70,10 +116,10 @@ cc_binary {
],
cflags: [
+ "-Dmain=main_loop",
"-Wno-empty-body",
"-Wno-attributes",
"-Wno-sign-compare",
- "-DPLUGIN",
],
ldflags: ["-rdynamic"],
@@ -83,6 +129,35 @@ cc_binary {
],
}
+cc_binary {
+ name: "pppd",
+ defaults: ["ppp_defaults"],
+
+ srcs: [
+ ":pppd-sources"
+ ],
+
+ shared_libs: [
+ "libdl",
+ "liblog",
+ "libcutils",
+ "libcrypto",
+ ],
+
+ ldflags: ["-rdynamic"],
+
+ clang_cflags: ["-Wno-incompatible-pointer-types-discards-qualifiers"],
+
+ required: [
+ "pppol2tp-android",
+ "pppopptp-android",
+ ],
+
+ sanitize: {
+ memtag_heap: true,
+ },
+}
+
cc_library_shared {
name: "pppol2tp-android",
defaults: ["ppp_defaults"],