From 0d6d330018a22d1262a5ec85db8a44a954d22b76 Mon Sep 17 00:00:00 2001
From: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
Date: Thu, 18 Feb 2021 15:14:08 +0100
Subject: [PATCH] ohos-libsec: switch to current ostc branch

All of the staging components are moving to a model where the master
branch follows upstream open harmony gitee repository and the ostc
branch is re-based on that master, and contains additional patches.

During this switch the history in the master branch was re-set to point
to the mirrored upstream code. OSTC branch was re-based and the
corresponding revision was lost.

The zmk patch was applied at the "local" upstream (ostc branch), so drop
if from the recipe.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
---
 .../0001-Add-makefile-based-on-zmk.patch      | 51 -------------------
 .../ohos-libsec/ohos-libsec_git.bb            |  6 +--
 2 files changed, 2 insertions(+), 55 deletions(-)
 delete mode 100644 meta-ohos-acts/recipes-ohos-libsec/ohos-libsec/ohos-libsec/0001-Add-makefile-based-on-zmk.patch

diff --git a/meta-ohos-acts/recipes-ohos-libsec/ohos-libsec/ohos-libsec/0001-Add-makefile-based-on-zmk.patch b/meta-ohos-acts/recipes-ohos-libsec/ohos-libsec/ohos-libsec/0001-Add-makefile-based-on-zmk.patch
deleted file mode 100644
index 4a647c56..00000000
--- a/meta-ohos-acts/recipes-ohos-libsec/ohos-libsec/ohos-libsec/0001-Add-makefile-based-on-zmk.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 6230892258ca0b686b52256969e81d8c8beec375 Mon Sep 17 00:00:00 2001
-From: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
-Date: Tue, 29 Dec 2020 09:33:52 +0100
-Subject: [PATCH] Add makefile based on zmk
-
-The makefile defines libsec.{so,a} and several public headers.
-
-Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
----
- GNUmakefile | 32 ++++++++++++++++++++++++++++++++
- 1 file changed, 32 insertions(+)
- create mode 100644 GNUmakefile
-
-diff --git a/GNUmakefile b/GNUmakefile
-new file mode 100644
-index 0000000..742481f
---- /dev/null
-+++ b/GNUmakefile
-@@ -0,0 +1,32 @@
-+# SPDX-License-Identifier: Apache-2.0
-+#
-+# Copyright 2021 Huawei Inc.
-+#
-+# 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.
-+
-+include z.mk
-+
-+Project.Name=ohos-libsec
-+Project.Version=1
-+
-+CPPFLAGS += -I$(ZMK.OutOfTreeSourcePath)include
-+CPPFLAGS += -iquote $(ZMK.OutOfTreeSourcePath)src
-+
-+libsec.a.Sources = $(wildcard $(addprefix $(ZMK.OutOfTreeSourcePath)src/,*.c *.h *.inl))
-+$(eval $(call ZMK.Expand,Library.A,libsec.a))
-+
-+libsec.so.Sources = $(libsec.a.Sources)
-+$(eval $(call ZMK.Expand,Library.So,libsec.so))
-+
-+libsec.Headers = $(wildcard $(ZMK.OutOfTreeSourcePath)include/*.h)
-+$(eval $(call ZMK.Expand,HeaderGroup,libsec))
diff --git a/meta-ohos-acts/recipes-ohos-libsec/ohos-libsec/ohos-libsec_git.bb b/meta-ohos-acts/recipes-ohos-libsec/ohos-libsec/ohos-libsec_git.bb
index c7d402a1..cf5f15d0 100644
--- a/meta-ohos-acts/recipes-ohos-libsec/ohos-libsec/ohos-libsec_git.bb
+++ b/meta-ohos-acts/recipes-ohos-libsec/ohos-libsec/ohos-libsec_git.bb
@@ -1,10 +1,8 @@
 LICENSE = "MulanPSL-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=2ba4788337b3607f139c2267ed50d32b"
 
-SRC_URI = "git://git.ostc-eu.org/OSTC/OHOS/components/staging/third_party_bounds_checking_function.git;protocol=https \
-           file://0001-Add-makefile-based-on-zmk.patch \
-           "
-SRCREV = "82fcb88beec3538795b244c1e6cb2126ffdcd179"
+SRC_URI = "git://git.ostc-eu.org/OSTC/OHOS/components/staging/third_party_bounds_checking_function.git;protocol=https;branch=ostc"
+SRCREV = "256b1fc30d387f47cac1a376b2f1f28148b94804"
 S = "${WORKDIR}/git"
 PV = "0.0+git${SRCPV}"
 
-- 
GitLab