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