• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2025 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15
16sqlite_src_dir = "//third_party/sqlite"
17sqlite_dst_dir = root_out_dir + "/patched_sqlite"
18sqlite_patch_dir = sqlite_src_dir + "/patch"
19
20action("apply_patch") {
21  visibility = [ "*" ]
22  script = "${sqlite_patch_dir}/apply_patch.sh"
23  inputs = [ "$sqlite_src_dir" ]
24  outputs = [
25    "$sqlite_dst_dir/ext/misc/cksumvfs.c",
26    "$sqlite_dst_dir/src/shell.c",
27    "$sqlite_dst_dir/src/compressvfs.c",
28    "$sqlite_dst_dir/src/sqlite3.c",
29    "$sqlite_dst_dir/src/sqlite3icu.c",
30    "$sqlite_dst_dir/include/sqlite3ext.h",
31    "$sqlite_dst_dir/include/sqlite3.h",
32    "$sqlite_dst_dir/include/sqlite3sym.h",
33    "$sqlite_dst_dir/include/sqlite3icu.h",
34    "$sqlite_dst_dir/include/sqlite3tokenizer.h",
35  ]
36
37  args = [
38    rebase_path(sqlite_src_dir, root_build_dir),
39    rebase_path(sqlite_dst_dir, root_build_dir),
40    rebase_path(sqlite_patch_dir, root_build_dir),
41  ]
42}
43