1 # Build recipe for libxkbcommon.
3 # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
4 # Copyright (c) 2018-2019, 2021-2022 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # Exit immediately on any error
25 # Define a category for the output of the package name
26 pkgcategory=xorg_extra
28 tarname=${program}-${version}.tar.xz
31 fetch=https://xkbcommon.org/download/$tarname
34 xkbcommon is a library to handle keyboard descriptions.
36 Including loading them from disk, parsing them and handling their
37 state. It's mainly meant for client toolkits, window systems,
38 and other system applications; currently that includes Wayland,
39 kmscon, GTK+, Clutter, and others.
42 homepage=https://xkbcommon.org/
43 license="Custom (derivations from MIT/X11 license)"
45 # Source documentation
46 docs="LICENSE NEWS README.md"
47 docsdir="${docdir}/${program}-${version}"
51 unpack "${tardir}/$tarname"
59 CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
60 meson setup $configure_args \
61 --libdir /usr/lib${libSuffix} \
65 -Denable-wayland=false \
69 DESTDIR="$destdir" ninja -j${jobs} install
73 # Compress and link man pages (if needed)
74 if test -d "${destdir}/$mandir"
77 cd "${destdir}/$mandir"
78 find . -type f -exec lzip -9 {} +
79 find . -type l | while read -r file
81 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
88 mkdir -p "${destdir}${docsdir}"
89 cp -p $docs "${destdir}${docsdir}"