diff --git a/BUILD.gn b/BUILD.gn new file mode 100644 index 0000000..a52fd29 --- /dev/null +++ b/BUILD.gn @@ -0,0 +1,38 @@ +# Copyright (c) 2023 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") + +ohos_cargo_crate("lib") { + crate_name = "signal_hook" + crate_type = "rlib" + crate_root = "src/lib.rs" + + sources = [ "src/lib.rs" ] + edition = "2018" + cargo_pkg_version = "0.3.15" + cargo_pkg_authors = "Michal 'vorner' Vaner , Thomas Himmelstoss " + cargo_pkg_name = "third_party_rust_signal-hook" + cargo_pkg_description = "Unix signal handling" + deps = [ + "//third_party/rust/crates/libc:lib", + "//third_party/rust/crates/signal-hook/signal-hook-registry:lib", + ] + features = [ + "channel", + "default", + "iterator", + ] + build_root = "build.rs" + build_sources = [ "build.rs" ] +} diff --git a/OAT.xml b/OAT.xml new file mode 100644 index 0000000..e901936 --- /dev/null +++ b/OAT.xml @@ -0,0 +1,65 @@ + + + + + + LICENSE-APACHE|LICENSE-MIT + + + + + + + \ No newline at end of file diff --git a/README.OpenSource b/README.OpenSource new file mode 100644 index 0000000..141a5f8 --- /dev/null +++ b/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "signal-hook", + "License": "Apache License V2.0", + "License File": "LICENSE-APACHE", + "Version Number": "0.3.15", + "Owner": "xuelei3@huawei.com", + "Upstream URL": "https://github.com/vorner/signal-hook", + "Description": "Unix signal handling." + } +] diff --git a/signal-hook-registry/BUILD.gn b/signal-hook-registry/BUILD.gn new file mode 100644 index 0000000..d0628ef --- /dev/null +++ b/signal-hook-registry/BUILD.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2023 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/templates/rust/ohos_cargo_crate.gni") + +ohos_cargo_crate("lib") { + crate_name = "signal_hook_registry" + crate_type = "rlib" + crate_root = "src/lib.rs" + + sources = [ "src/lib.rs" ] + edition = "2015" + cargo_pkg_version = "1.4.1" + cargo_pkg_authors = "Michal 'vorner' Vaner , Masaki Hara " + cargo_pkg_name = "signal-hook-registry" + cargo_pkg_description = "Backend crate for signal-hook" + deps = [ "//third_party/rust/crates/libc:lib" ] +}