blob: 8572b7768924dffcf6897e205eb8636d488df0c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
src_prepare() {
default
sed -i \
-e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \
configure || die "Failed to re-enable static support"
# List of symbols which are clashing with (e)udev
cat <<-EOF >> kmod.syms
mkdir_p _kmod_mkdir_p
mkdir_parents _kmod_mkdir_parents
path_is_absolute _kmod_path_is_absolute
path_make_absolute_cwd _kmod_path_make_absolute_cwd
EOF
}
src_configure() {
local myconf=(
--enable-static
--disable-python
--disable-tools
--with-xz
--with-zlib
--with-zstd
--without-openssl
)
gkconf "${myconf[@]}"
}
src_install() {
default
# remove hardcoded $BROOT
sed -i \
-e 's/-L\/[^ ]*/-L${libdir}/g' \
"${D}"/usr/lib*/pkgconfig/*.pc \
|| die
# rename internal symbols to avoid clashing with (e)udev
$(tc-getOBJCOPY) \
--redefine-syms=kmod.syms \
"${D}"/usr/lib*/libkmod.a \
|| die
rm -rf \
"${D}"/usr/share/
}
|