1# Copyright (c) 2024 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 16gen_src_dir = "//third_party/libinput" 17gen_dst_dir = root_out_dir + "/diff_libinput_mmi" 18patches_root_dir = gen_src_dir + "/patch" 19build_gn_dir = "$patches_root_dir/diff_libinput_mmi/libinput" 20 21action("apply_patch") { 22 visibility = [ "*" ] 23 script = "${gen_src_dir}/patch/apply_patch.sh" 24 inputs = [ "$gen_src_dir" ] 25 outputs = [ 26 "$gen_dst_dir/src/filter.c", 27 "$gen_dst_dir/src/filter-flat.c", 28 "$gen_dst_dir/src/filter-low-dpi.c", 29 "$gen_dst_dir/src/filter-mouse.c", 30 "$gen_dst_dir/src/filter-touchpad.c", 31 "$gen_dst_dir/src/filter-touchpad-x230.c", 32 "$gen_dst_dir/src/filter-tablet.c", 33 "$gen_dst_dir/src/filter-trackpoint.c", 34 "$gen_dst_dir/src/filter-touchpad-flat.c", 35 "$gen_dst_dir/src/libinput.c", 36 "$gen_dst_dir/src/evdev.c", 37 "$gen_dst_dir/src/evdev-debounce.c", 38 "$gen_dst_dir/src/evdev-fallback.c", 39 "$gen_dst_dir/src/evdev-totem.c", 40 "$gen_dst_dir/src/evdev-joystick.c", 41 "$gen_dst_dir/src/evdev-middle-button.c", 42 "$gen_dst_dir/src/evdev-mt-touchpad.c", 43 "$gen_dst_dir/src/evdev-mt-touchpad-tap.c", 44 "$gen_dst_dir/src/evdev-mt-touchpad-thumb.c", 45 "$gen_dst_dir/src/evdev-mt-touchpad-buttons.c", 46 "$gen_dst_dir/src/evdev-mt-touchpad-edge-scroll.c", 47 "$gen_dst_dir/src/evdev-mt-touchpad-gestures.c", 48 "$gen_dst_dir/src/evdev-tablet.c", 49 "$gen_dst_dir/src/evdev-tablet-pad.c", 50 "$gen_dst_dir/src/evdev-tablet-pad-leds.c", 51 "$gen_dst_dir/src/path-seat.c", 52 "$gen_dst_dir/src/timer.c", 53 "$gen_dst_dir/src/libinput-util.c", 54 "$gen_dst_dir/src/quirks.c", 55 "$gen_dst_dir/src/util-list.c", 56 "$gen_dst_dir/src/util-prop-parsers.c", 57 "$gen_dst_dir/src/util-ratelimit.c", 58 "$gen_dst_dir/src/util-strings.c", 59 "$gen_dst_dir/tools/shared.h", 60 "$gen_dst_dir/tools/shared.c", 61 "$gen_dst_dir/tools/libinput-debug-events.c", 62 "$gen_dst_dir/tools/libinput-list-devices.c", 63 "$gen_dst_dir/tools/libinput-debug-tablet.c", 64 "$gen_dst_dir/hm_src/hm_missing.h", 65 "$gen_dst_dir/hm_src/hm_missing.c", 66 "$gen_dst_dir/tools/libinput-record.c", 67 "$gen_dst_dir/tools/libinput-analyze.c", 68 "$gen_dst_dir/tools/libinput-measure.c", 69 "$gen_dst_dir/tools/libinput-quirks.c", 70 ] 71 72 args = [ 73 rebase_path(gen_src_dir, root_build_dir), 74 rebase_path(gen_dst_dir, root_build_dir), 75 rebase_path(build_gn_dir, root_build_dir), 76 ] 77} 78