xref: /aosp_15_r20/external/libxkbcommon/Android.bp (revision 2b949d0487e80d67f1fda82db69e101e761f8064)
1*2b949d04SAndroid Build Coastguard Worker// Copyright (C) 2017 The Android Open Source Project
2*2b949d04SAndroid Build Coastguard Worker//
3*2b949d04SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*2b949d04SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*2b949d04SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*2b949d04SAndroid Build Coastguard Worker//
7*2b949d04SAndroid Build Coastguard Worker//      http://www.apache.org/licenses/LICENSE-2.0
8*2b949d04SAndroid Build Coastguard Worker//
9*2b949d04SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*2b949d04SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*2b949d04SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*2b949d04SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*2b949d04SAndroid Build Coastguard Worker// limitations under the License.
14*2b949d04SAndroid Build Coastguard Worker
15*2b949d04SAndroid Build Coastguard Workerpackage {
16*2b949d04SAndroid Build Coastguard Worker    default_applicable_licenses: ["external_libxkbcommon_license"],
17*2b949d04SAndroid Build Coastguard Worker}
18*2b949d04SAndroid Build Coastguard Worker
19*2b949d04SAndroid Build Coastguard Worker// Added automatically by a large-scale-change that took the approach of
20*2b949d04SAndroid Build Coastguard Worker// 'apply every license found to every target'. While this makes sure we respect
21*2b949d04SAndroid Build Coastguard Worker// every license restriction, it may not be entirely correct.
22*2b949d04SAndroid Build Coastguard Worker//
23*2b949d04SAndroid Build Coastguard Worker// e.g. GPL in an MIT project might only apply to the contrib/ directory.
24*2b949d04SAndroid Build Coastguard Worker//
25*2b949d04SAndroid Build Coastguard Worker// Please consider splitting the single license below into multiple licenses,
26*2b949d04SAndroid Build Coastguard Worker// taking care not to lose any license_kind information, and overriding the
27*2b949d04SAndroid Build Coastguard Worker// default license using the 'licenses: [...]' property on targets as needed.
28*2b949d04SAndroid Build Coastguard Worker//
29*2b949d04SAndroid Build Coastguard Worker// For unused files, consider creating a 'fileGroup' with "//visibility:private"
30*2b949d04SAndroid Build Coastguard Worker// to attach the license to, and including a comment whether the files may be
31*2b949d04SAndroid Build Coastguard Worker// used in the current project.
32*2b949d04SAndroid Build Coastguard Worker// See: http://go/android-license-faq
33*2b949d04SAndroid Build Coastguard Workerlicense {
34*2b949d04SAndroid Build Coastguard Worker    name: "external_libxkbcommon_license",
35*2b949d04SAndroid Build Coastguard Worker    visibility: [":__subpackages__"],
36*2b949d04SAndroid Build Coastguard Worker    license_kinds: [
37*2b949d04SAndroid Build Coastguard Worker        "SPDX-license-identifier-BSD-3-Clause",
38*2b949d04SAndroid Build Coastguard Worker        "SPDX-license-identifier-GPL",
39*2b949d04SAndroid Build Coastguard Worker        "SPDX-license-identifier-GPL-2.0",
40*2b949d04SAndroid Build Coastguard Worker        "SPDX-license-identifier-GPL-3.0",
41*2b949d04SAndroid Build Coastguard Worker        "SPDX-license-identifier-ISC",
42*2b949d04SAndroid Build Coastguard Worker        "SPDX-license-identifier-MIT",
43*2b949d04SAndroid Build Coastguard Worker        "legacy_unencumbered",
44*2b949d04SAndroid Build Coastguard Worker    ],
45*2b949d04SAndroid Build Coastguard Worker    license_text: [
46*2b949d04SAndroid Build Coastguard Worker        "LICENSE",
47*2b949d04SAndroid Build Coastguard Worker    ],
48*2b949d04SAndroid Build Coastguard Worker}
49*2b949d04SAndroid Build Coastguard Worker
50*2b949d04SAndroid Build Coastguard Workercc_library_static {
51*2b949d04SAndroid Build Coastguard Worker    srcs: [
52*2b949d04SAndroid Build Coastguard Worker        "config/libxkbcommon.so.0.0.0.p/parser.c",
53*2b949d04SAndroid Build Coastguard Worker        "src/compose/parser.c",
54*2b949d04SAndroid Build Coastguard Worker        "src/compose/paths.c",
55*2b949d04SAndroid Build Coastguard Worker        "src/compose/state.c",
56*2b949d04SAndroid Build Coastguard Worker        "src/compose/table.c",
57*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/action.c",
58*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/ast-build.c",
59*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/compat.c",
60*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/expr.c",
61*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/include.c",
62*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/keycodes.c",
63*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/keymap.c",
64*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/keymap-dump.c",
65*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/keywords.c",
66*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/rules.c",
67*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/scanner.c",
68*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/symbols.c",
69*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/types.c",
70*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/vmod.c",
71*2b949d04SAndroid Build Coastguard Worker        "src/xkbcomp/xkbcomp.c",
72*2b949d04SAndroid Build Coastguard Worker        "src/atom.c",
73*2b949d04SAndroid Build Coastguard Worker        "src/context.c",
74*2b949d04SAndroid Build Coastguard Worker        "src/context-priv.c",
75*2b949d04SAndroid Build Coastguard Worker        "src/keymap.c",
76*2b949d04SAndroid Build Coastguard Worker        "src/keymap-priv.c",
77*2b949d04SAndroid Build Coastguard Worker        "src/keysym.c",
78*2b949d04SAndroid Build Coastguard Worker        "src/keysym-utf.c",
79*2b949d04SAndroid Build Coastguard Worker        "src/registry.c",
80*2b949d04SAndroid Build Coastguard Worker        "src/state.c",
81*2b949d04SAndroid Build Coastguard Worker        "src/text.c",
82*2b949d04SAndroid Build Coastguard Worker        "src/utf8.c",
83*2b949d04SAndroid Build Coastguard Worker        "src/util-list.c",
84*2b949d04SAndroid Build Coastguard Worker        "src/utils.c",
85*2b949d04SAndroid Build Coastguard Worker    ],
86*2b949d04SAndroid Build Coastguard Worker    c_std: "c11",
87*2b949d04SAndroid Build Coastguard Worker    cflags: [
88*2b949d04SAndroid Build Coastguard Worker        "-fno-strict-aliasing",
89*2b949d04SAndroid Build Coastguard Worker        "-fsanitize-undefined-trap-on-error",
90*2b949d04SAndroid Build Coastguard Worker        "-Wall",
91*2b949d04SAndroid Build Coastguard Worker        "-Werror",
92*2b949d04SAndroid Build Coastguard Worker        "-Wno-format",
93*2b949d04SAndroid Build Coastguard Worker        "-Wno-unused-parameter",
94*2b949d04SAndroid Build Coastguard Worker        "-Wno-missing-field-initializers",
95*2b949d04SAndroid Build Coastguard Worker        // Needed because libxkbcommon uses GNU extension asprintf().
96*2b949d04SAndroid Build Coastguard Worker        "-D_GNU_SOURCE",
97*2b949d04SAndroid Build Coastguard Worker    ],
98*2b949d04SAndroid Build Coastguard Worker    static_libs: [
99*2b949d04SAndroid Build Coastguard Worker        "libxml2",
100*2b949d04SAndroid Build Coastguard Worker    ],
101*2b949d04SAndroid Build Coastguard Worker    local_include_dirs: [
102*2b949d04SAndroid Build Coastguard Worker        "src",
103*2b949d04SAndroid Build Coastguard Worker        "config",
104*2b949d04SAndroid Build Coastguard Worker        "config/libxkbcommon.so.0.0.0.p",
105*2b949d04SAndroid Build Coastguard Worker    ],
106*2b949d04SAndroid Build Coastguard Worker    export_include_dirs: ["include"],
107*2b949d04SAndroid Build Coastguard Worker    vendor_available: true,
108*2b949d04SAndroid Build Coastguard Worker    host_supported: true,
109*2b949d04SAndroid Build Coastguard Worker    name: "libxkbcommon",
110*2b949d04SAndroid Build Coastguard Worker}
111