1 Star 0 Fork 12

chrisshangguan/distributed-build

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
0007-feat-add-gn-files-to-use-packages-on-openeuler.patch 14.57 KB
Copy Edit Raw Blame History
tianhang authored 2023-06-12 14:05 +08:00 . init and add patches for openeuler build
From a2c22a0926e430d4021422fd43da59a95abeba67 Mon Sep 17 00:00:00 2001
From: tian hang <tian_hang@hoperun.com>
Date: Thu, 18 May 2023 09:36:59 +0000
Subject: [PATCH 07/11] feat: add gn files to use packages on openeuler
---
.../systemabilitymgr/samgr/bundle.json | 78 +++++++++++++++++++
.../interfaces/innerkits/common/BUILD.gn | 38 +++++++++
.../samgr/interfaces/innerkits/common/include | 1 +
.../interfaces/innerkits/samgr_proxy/BUILD.gn | 43 ++++++++++
.../interfaces/innerkits/samgr_proxy/include | 1 +
.../samgr/services/lsamgr/include | 1 +
.../bounds_checking_function/BUILD.gn | 28 +++++++
.../bounds_checking_function/include | 1 +
.../compiler_gn/third_party/cJSON/BUILD.gn | 25 ++++++
.../compiler_gn/third_party/cJSON/cJSON.h | 1 +
.../compiler_gn/third_party/libxml2/BUILD.gn | 11 +++
.../third_party/libxml2/include/libxml | 1 +
.../compiler_gn/third_party/mbedtls/BUILD.gn | 19 +++++
.../compiler_gn/third_party/mbedtls/include | 1 +
14 files changed, 249 insertions(+)
create mode 100644 openeuler/compiler_gn/foundation/systemabilitymgr/samgr/bundle.json
create mode 100644 openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/BUILD.gn
create mode 120000 openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/include
create mode 100644 openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/BUILD.gn
create mode 120000 openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include
create mode 120000 openeuler/compiler_gn/foundation/systemabilitymgr/samgr/services/lsamgr/include
create mode 100644 openeuler/compiler_gn/third_party/bounds_checking_function/BUILD.gn
create mode 120000 openeuler/compiler_gn/third_party/bounds_checking_function/include
create mode 100644 openeuler/compiler_gn/third_party/cJSON/BUILD.gn
create mode 120000 openeuler/compiler_gn/third_party/cJSON/cJSON.h
create mode 100644 openeuler/compiler_gn/third_party/libxml2/BUILD.gn
create mode 120000 openeuler/compiler_gn/third_party/libxml2/include/libxml
create mode 100644 openeuler/compiler_gn/third_party/mbedtls/BUILD.gn
create mode 120000 openeuler/compiler_gn/third_party/mbedtls/include
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/bundle.json b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/bundle.json
new file mode 100644
index 0000000..25dc757
--- /dev/null
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/bundle.json
@@ -0,0 +1,78 @@
+{
+ "name": "@ohos/systemabilitymgr_samgr",
+ "description": "system ability manager",
+ "homePage": "https://gitee.com/openharmony",
+ "version": "3.1",
+ "license": "Apache License 2.0",
+ "repository": "https://gitee.com/openharmony/systemabilitymgr_samgr",
+ "publishAs": "code-segment",
+ "segment": {
+ "destPath": "foundation/systemabilitymgr/samgr"
+ },
+ "dirs": {},
+ "scripts": {},
+ "component": {
+ "name": "samgr",
+ "subsystem": "systemabilitymgr",
+ "features": [ "samgr_feature_coverage = false" ],
+ "adapted_system_type": [
+ "standard"
+ ],
+ "rom": "300KB",
+ "ram": "7130KB",
+ "deps": {
+ "components": [
+ "access_token",
+ "c_utils",
+ "eventhandler",
+ "hisysevent_native",
+ "hitrace_native",
+ "hiviewdfx_hilog_native",
+ "init",
+ "ipc",
+ "samgr",
+ "selinux",
+ "startup_l2"
+ ],
+ "third_party": [ "libxml2" ]
+ },
+ "build": {
+ "group_type": {
+ "base_group": [],
+ "fwk_group": [
+ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/common:samgr_common",
+ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy"
+ ]
+ },
+ "inner_kits": [
+ {
+ "header": {
+ "header_base": "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include/",
+ "header_files": [
+ "if_system_ability_manager.h",
+ "iservice_registry.h",
+ "isystem_ability_load_callback.h",
+ "isystem_ability_status_change.h",
+ "system_ability_definition.h",
+ "system_ability_manager_proxy.h",
+ "system_ability_load_callback_stub.h",
+ "system_ability_status_change_stub.h",
+ "sam_log.h"
+ ]
+ },
+ "name": "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy"
+ },
+ {
+ "header": {
+ "header_base": "//foundation/systemabilitymgr/samgr/interfaces/innerkits/common/include/",
+ "header_files": [
+ "sa_profiles.h",
+ "parse_util.h"
+ ]
+ },
+ "name": "//foundation/systemabilitymgr/samgr/interfaces/innerkits/common:samgr_common"
+ }
+ ]
+ }
+ }
+}
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/BUILD.gn b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/BUILD.gn
new file mode 100644
index 0000000..a129d8b
--- /dev/null
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/BUILD.gn
@@ -0,0 +1,38 @@
+# Copyright (c) 2022 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("//build/ohos.gni")
+
+config("all_config_samgr_common") {
+ include_dirs = [
+ "include",
+ ]
+ libs = ["samgr_common",]
+}
+
+config("config_samgr_common") {
+ include_dirs = [
+ "include",
+ ]
+ libs = ["samgr_common",]
+}
+
+################################################################################
+group("samgr_common") {
+
+ public_configs = [ ":config_samgr_common" ]
+
+ all_dependent_configs = [ ":all_config_samgr_common" ]
+
+}
+################################################################################
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/include b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/include
new file mode 120000
index 0000000..bc414ef
--- /dev/null
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/common/include
@@ -0,0 +1 @@
+/usr/include/
\ No newline at end of file
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/BUILD.gn b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/BUILD.gn
new file mode 100644
index 0000000..44b42ad
--- /dev/null
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/BUILD.gn
@@ -0,0 +1,43 @@
+# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("//build/ohos.gni")
+import("//build/ohos_var.gni")
+
+config("samgr_proxy_config") {
+ include_dirs = [
+ "include",
+ "//third_party/libxml2/include",
+ ]
+
+ libs = ["samgr_proxy",]
+}
+
+#config("samgr_proxy_private_config") {
+# include_dirs = [
+# "include",
+ #"//foundation/systemabilitymgr/samgr/interfaces/innerkits/lsamgr",
+ #"//foundation/systemabilitymgr/samgr/services/lsamgr/include",
+ #"//foundation/systemabilitymgr/samgr/services/samgr/native/include",
+ #"//foundation/systemabilitymgr/samgr/utils/native/include",
+# ]
+# libs = ["samgr_proxy",]
+#}
+
+group("samgr_proxy"){
+#ohos_shared_library("samgr_proxy") {
+ public_configs = [ ":samgr_proxy_config" ]
+
+ all_dependent_configs = [ ":samgr_proxy_config" ]
+
+}
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include
new file mode 120000
index 0000000..bc414ef
--- /dev/null
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include
@@ -0,0 +1 @@
+/usr/include/
\ No newline at end of file
diff --git a/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/services/lsamgr/include b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/services/lsamgr/include
new file mode 120000
index 0000000..bc414ef
--- /dev/null
+++ b/openeuler/compiler_gn/foundation/systemabilitymgr/samgr/services/lsamgr/include
@@ -0,0 +1 @@
+/usr/include/
\ No newline at end of file
diff --git a/openeuler/compiler_gn/third_party/bounds_checking_function/BUILD.gn b/openeuler/compiler_gn/third_party/bounds_checking_function/BUILD.gn
new file mode 100644
index 0000000..ae44b79
--- /dev/null
+++ b/openeuler/compiler_gn/third_party/bounds_checking_function/BUILD.gn
@@ -0,0 +1,28 @@
+# Copyright (c) 2021 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+import("//build/ohos.gni")
+
+config("libsec_public_config") {
+ include_dirs = [ "include" ]
+ libs = [ "boundscheck" ]
+}
+
+ohos_static_library("libsec_static") {
+ #libs = [ "boundscheck" ]
+ all_dependent_configs = [ ":libsec_public_config" ]
+}
+
+ohos_shared_library("libsec_shared") {
+ #libs = [ "boundscheck" ]
+ all_dependent_configs = [ ":libsec_public_config" ]
+}
diff --git a/openeuler/compiler_gn/third_party/bounds_checking_function/include b/openeuler/compiler_gn/third_party/bounds_checking_function/include
new file mode 120000
index 0000000..bc414ef
--- /dev/null
+++ b/openeuler/compiler_gn/third_party/bounds_checking_function/include
@@ -0,0 +1 @@
+/usr/include/
\ No newline at end of file
diff --git a/openeuler/compiler_gn/third_party/cJSON/BUILD.gn b/openeuler/compiler_gn/third_party/cJSON/BUILD.gn
new file mode 100644
index 0000000..48864a4
--- /dev/null
+++ b/openeuler/compiler_gn/third_party/cJSON/BUILD.gn
@@ -0,0 +1,25 @@
+#Copyright (c) 2019-2021 Huawei Device Co., Ltd.
+#Licensed under the Apache License, Version 2.0 (the "License");
+#you may not use this file except in compliance with the License.
+#You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific language governing permissions and
+#limitations under the License.
+
+import("//build/ohos.gni")
+import("//build/config/sysroot.gni")
+config("cJSON_config") {
+ include_dirs = [ "${sysroot}/usr/include/cjson" ]
+ libs = [ "cjson" ]
+}
+ohos_static_library("cjson_static") {
+ public_configs = [ ":cJSON_config" ]
+}
+ohos_shared_library("cjson") {
+ public_configs = [ ":cJSON_config" ]
+}
diff --git a/openeuler/compiler_gn/third_party/cJSON/cJSON.h b/openeuler/compiler_gn/third_party/cJSON/cJSON.h
new file mode 120000
index 0000000..a75d9ff
--- /dev/null
+++ b/openeuler/compiler_gn/third_party/cJSON/cJSON.h
@@ -0,0 +1 @@
+/usr/include/cjson/cJSON.h
\ No newline at end of file
diff --git a/openeuler/compiler_gn/third_party/libxml2/BUILD.gn b/openeuler/compiler_gn/third_party/libxml2/BUILD.gn
new file mode 100644
index 0000000..f097e1d
--- /dev/null
+++ b/openeuler/compiler_gn/third_party/libxml2/BUILD.gn
@@ -0,0 +1,11 @@
+import("//build/ohos.gni")
+import("//build/config/sysroot.gni")
+config("libxml2_private_config") {
+ include_dirs = [ "${sysroot}/usr/include/libxml2" ]
+ libs = [ "xml2" ]
+}
+
+ohos_shared_library("libxml2") {
+ public_configs = [ ":libxml2_private_config" ]
+}
+
diff --git a/openeuler/compiler_gn/third_party/libxml2/include/libxml b/openeuler/compiler_gn/third_party/libxml2/include/libxml
new file mode 120000
index 0000000..8eb8d2d
--- /dev/null
+++ b/openeuler/compiler_gn/third_party/libxml2/include/libxml
@@ -0,0 +1 @@
+/usr/include/libxml2/libxml/
\ No newline at end of file
diff --git a/openeuler/compiler_gn/third_party/mbedtls/BUILD.gn b/openeuler/compiler_gn/third_party/mbedtls/BUILD.gn
new file mode 100644
index 0000000..dd5723b
--- /dev/null
+++ b/openeuler/compiler_gn/third_party/mbedtls/BUILD.gn
@@ -0,0 +1,19 @@
+import("//build/ohos.gni")
+config("mbedtls_config") {
+ include_dirs = [
+ "include",
+ ]
+ libs = [
+ "mbedtls",
+ "mbedcrypto",
+ ]
+}
+
+ohos_shared_library("mbedtls_shared") {
+ public_configs = [ ":mbedtls_config" ]
+}
+
+group("mbedtls") {
+ public_deps = [ ":mbedtls_shared" ]
+}
+
diff --git a/openeuler/compiler_gn/third_party/mbedtls/include b/openeuler/compiler_gn/third_party/mbedtls/include
new file mode 120000
index 0000000..bc414ef
--- /dev/null
+++ b/openeuler/compiler_gn/third_party/mbedtls/include
@@ -0,0 +1 @@
+/usr/include/
\ No newline at end of file
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chrisshangguan/distributed-build.git
git@gitee.com:chrisshangguan/distributed-build.git
chrisshangguan
distributed-build
distributed-build
master

Search