From a14f71999f22022ecaea0497e979fa8bbf4b56ac Mon Sep 17 00:00:00 2001 From: LiFeng Date: Thu, 9 Jan 2020 08:39:30 -0500 Subject: [PATCH] protobuf: add apply patch scripts Signed-off-by: LiFeng --- apply-patches | 36 ++++++++++++++++++++++++++++++++++++ series.conf | 1 + 2 files changed, 37 insertions(+) create mode 100755 apply-patches create mode 100755 series.conf diff --git a/apply-patches b/apply-patches new file mode 100755 index 0000000..5c5538c --- /dev/null +++ b/apply-patches @@ -0,0 +1,36 @@ +####################################################################### +##- @Copyright (C) Huawei Technologies., Ltd. 2019. All rights reserved. +# - lcr licensed under the Mulan PSL v1. +# - You can use this software according to the terms and conditions of the Mulan PSL v1. +# - You may obtain a copy of Mulan PSL v1 at: +# - http://license.coscl.org.cn/MulanPSL +# - THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR +# - IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR +# - PURPOSE. +# - See the Mulan PSL v1 for more details. +##- @Description: apply patchs +##- @Author: lifeng +##- @Create: 2019-04-25 +####################################################################### +#!/bin/bash + +set -ex + +pkg=protobuf-all-3.9.0 +cwd=$PWD +src=$cwd/protobuf-3.9.0 + +tar -xzvf $pkg.tar.gz + +cd $src + +cat $cwd/series.conf | while read line +do + if [[ $line == '' || $line =~ ^\s*# ]]; then + continue + fi + echo $cwd/$line + patch -p1 -F1 -s < $cwd/$line +done + +cd $cwd diff --git a/series.conf b/series.conf new file mode 100755 index 0000000..237fc22 --- /dev/null +++ b/series.conf @@ -0,0 +1 @@ +0001-add-secure-compile-option-in-Makefile.patch -- Gitee