| 1 |
|
# Copyright 1999-2025 Gentoo Authors
|
|
1 |
# Copyright 1999-2026 Gentoo Authors
|
| 2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| 5 |
5 |
|
| 6 |
|
inherit multiprocessing
|
|
6 |
inherit autotools multiprocessing
|
| 7 |
7 |
|
| 8 |
8 |
if [[ ${PV} == 9999 ]] ; then
|
| 9 |
9 |
inherit autotools git-r3
|
| ... | ... | |
| 12 |
12 |
else
|
| 13 |
13 |
if [[ $(ver_cut 3) -lt 90 ]] ; then
|
| 14 |
14 |
SRC_URI="https://www.kernel.org/pub/linux/utils/kbd/${P}.tar.xz"
|
| 15 |
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86"
|
|
15 |
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
|
| 16 |
16 |
else
|
| 17 |
17 |
inherit autotools
|
| 18 |
18 |
SRC_URI="https://github.com/legionus/kbd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
| ... | ... | |
| 22 |
22 |
DESCRIPTION="Keyboard and console utilities"
|
| 23 |
23 |
HOMEPAGE="https://kbd-project.org/"
|
| 24 |
24 |
|
| 25 |
|
LICENSE="GPL-2"
|
|
25 |
LICENSE="GPL-2+"
|
| 26 |
26 |
SLOT="0"
|
| 27 |
|
IUSE="nls selinux pam test"
|
|
27 |
IUSE="bzip2 lzma nls selinux pam test zlib zstd"
|
| 28 |
28 |
RESTRICT="!test? ( test )"
|
| 29 |
29 |
|
| 30 |
30 |
DEPEND="
|
| 31 |
31 |
app-alternatives/gzip
|
|
32 |
bzip2? ( app-arch/bzip2 )
|
|
33 |
lzma? ( app-arch/xz-utils )
|
| 32 |
34 |
pam? (
|
| 33 |
35 |
!app-misc/vlock
|
| 34 |
36 |
sys-libs/pam
|
| 35 |
37 |
)
|
|
38 |
zlib? ( virtual/zlib:= )
|
|
39 |
zstd? ( app-arch/zstd:= )
|
| 36 |
40 |
"
|
| 37 |
41 |
RDEPEND="
|
| 38 |
42 |
${DEPEND}
|
| 39 |
43 |
selinux? ( sec-policy/selinux-loadkeys )
|
| 40 |
44 |
"
|
| 41 |
45 |
BDEPEND="
|
|
46 |
sys-devel/flex
|
| 42 |
47 |
virtual/pkgconfig
|
| 43 |
48 |
test? ( dev-libs/check )
|
| 44 |
49 |
"
|
| 45 |
50 |
|
|
51 |
PATCHES=(
|
|
52 |
"${FILESDIR}"/${P}-install-no-attr.patch
|
|
53 |
"${FILESDIR}"/${P}-install-posix.patch
|
|
54 |
"${FILESDIR}"/${P}-nullptr.patch
|
|
55 |
"${FILESDIR}"/${P}-uninit.patch
|
|
56 |
"${FILESDIR}"/${P}-time64.patch
|
|
57 |
)
|
|
58 |
|
| 46 |
59 |
src_prepare() {
|
| 47 |
60 |
default
|
| 48 |
61 |
|
| ... | ... | |
| 55 |
68 |
mv qwerty/cz.map qwerty/cz-qwerty.map || die
|
| 56 |
69 |
popd &> /dev/null || die
|
| 57 |
70 |
|
| 58 |
|
if [[ ${PV} == 9999 ]] || [[ $(ver_cut 3) -ge 90 ]] ; then
|
| 59 |
|
eautoreconf
|
| 60 |
|
fi
|
|
71 |
#if [[ ${PV} == 9999 ]] || [[ $(ver_cut 3) -ge 90 ]] ; then
|
|
72 |
# eautoreconf
|
|
73 |
#fi
|
|
74 |
|
|
75 |
# Drop after 2.9.0
|
|
76 |
eautoreconf
|
| 61 |
77 |
}
|
| 62 |
78 |
|
| 63 |
79 |
src_configure() {
|
|
80 |
# https://github.com/legionus/kbd/issues/121
|
|
81 |
unset LEX
|
|
82 |
|
| 64 |
83 |
local myeconfargs=(
|
| 65 |
84 |
--disable-werror
|
|
85 |
# No Valgrind for the testsuite
|
|
86 |
--disable-memcheck
|
| 66 |
87 |
|
| 67 |
88 |
$(use_enable nls)
|
| 68 |
89 |
$(use_enable pam vlock)
|
| 69 |
90 |
$(use_enable test tests)
|
|
91 |
$(use_with bzip2)
|
|
92 |
$(use_with lzma)
|
|
93 |
$(use_with zlib)
|
|
94 |
$(use_with zstd)
|
| 70 |
95 |
)
|
| 71 |
96 |
|
| 72 |
97 |
econf "${myeconfargs[@]}"
|