1 |
|
# Copyright 1999-2022 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI="7"
|
|
4 |
EAPI=8
|
5 |
5 |
|
6 |
6 |
inherit flag-o-matic toolchain-funcs multilib-minimal
|
7 |
7 |
|
... | ... | |
11 |
11 |
|
12 |
12 |
LICENSE="GPL-2"
|
13 |
13 |
SLOT="0"
|
14 |
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
|
14 |
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv sparc x86"
|
15 |
15 |
|
16 |
16 |
src_prepare() {
|
17 |
17 |
default
|
18 |
18 |
|
19 |
|
sed -i 's/-Werror //' "${S}/src/Makefile" || die
|
20 |
|
|
21 |
|
sed -i 's/-Werror //' "${S}/test/Makefile" || die
|
|
19 |
sed -i -e 's/-Werror //' {src,test}/Makefile || die
|
22 |
20 |
|
23 |
21 |
# Bug #617624 (GCC-6 compatibility)
|
24 |
|
sed -i 's/-Wno-nonnull-compare //' "${S}/src/Makefile" || die
|
|
22 |
sed -i 's/-Wno-nonnull-compare //' src/Makefile || die
|
|
23 |
|
|
24 |
# bug #863911
|
|
25 |
filter-lto
|
25 |
26 |
|
26 |
|
# upstream doesn't want that we set this by default but
|
27 |
|
# I didn't find a single system where libfaketime passed
|
28 |
|
# CLOCK_MONOTONIC test without that
|
29 |
|
append-cflags -DFORCE_MONOTONIC_FIX
|
|
27 |
# We used to always set this, but see:
|
|
28 |
# 1. https://github.com/wolfcw/libfaketime/commit/40edcc7ca087a8118fe5a2d27152617fa233e0e2
|
|
29 |
# i.e. we should report cases which end up needing it, rather than always setting it.
|
|
30 |
#
|
|
31 |
# 2. As of 0.9.10, libfaketime tries to detect at runtime if it's needed.
|
|
32 |
#append-cflags -DFORCE_MONOTONIC_FIX
|
30 |
33 |
|
31 |
34 |
# bug #844958
|
32 |
35 |
use riscv && append-cflags -DFORCE_PTHREAD_NONVER
|
... | ... | |
45 |
48 |
}
|
46 |
49 |
|
47 |
50 |
multilib_src_test() {
|
48 |
|
if has usersandbox ${FEATURES} ; then
|
49 |
|
# Tests are using LD_PRELOAD which clashes with FEATURES=usersandbox
|
50 |
|
ewarn "Tests are known to fail with usersandbox enabled."
|
51 |
|
fi
|
52 |
|
|
53 |
51 |
multilib_is_native_abi && emake CC="$(tc-getCC)" test
|
54 |
52 |
}
|
55 |
53 |
|
56 |
54 |
multilib_src_install() {
|
57 |
55 |
multilib_is_native_abi && dobin src/faketime
|
|
56 |
|
58 |
57 |
exeinto /usr/$(get_libdir)
|
59 |
58 |
doexe src/${PN}*.so.*
|
|
59 |
|
60 |
60 |
dosym ${PN}.so.1 /usr/$(get_libdir)/${PN}.so
|
61 |
61 |
dosym ${PN}MT.so.1 /usr/$(get_libdir)/${PN}MT.so
|
62 |
62 |
}
|