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 |
4 |
EAPI=8
|
... | ... | |
12 |
12 |
EGIT_REPO_URI="https://github.com/axboe/liburing.git"
|
13 |
13 |
else
|
14 |
14 |
SRC_URI="https://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2"
|
15 |
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86"
|
|
15 |
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc x86"
|
|
16 |
QA_PKGCONFIG_VERSION=${PV}
|
16 |
17 |
fi
|
17 |
18 |
LICENSE="MIT"
|
18 |
19 |
SLOT="0/2" # liburing.so major version
|
19 |
20 |
|
20 |
|
IUSE="static-libs"
|
|
21 |
IUSE="examples static-libs test"
|
21 |
22 |
# fsync test hangs forever
|
22 |
|
RESTRICT="test"
|
|
23 |
RESTRICT="!test? ( test )"
|
23 |
24 |
|
24 |
25 |
# At least installed headers need <linux/*>, bug #802516
|
25 |
26 |
DEPEND=">=sys-kernel/linux-headers-5.1"
|
26 |
27 |
RDEPEND="${DEPEND}"
|
27 |
28 |
|
|
29 |
PATCHES=(
|
|
30 |
# https://bugs.gentoo.org/891633
|
|
31 |
"${FILESDIR}/${PN}-2.3-liburing.map-Export-io_uring_-enable_rings-register_.patch"
|
|
32 |
# https://github.com/axboe/liburing/pull/787
|
|
33 |
"${FILESDIR}/${PN}-2.3-remove-error-from-error_h-for-portability.patch"
|
|
34 |
)
|
|
35 |
|
28 |
36 |
src_prepare() {
|
29 |
37 |
default
|
30 |
38 |
|
31 |
|
if [[ "${PV}" != *9999 ]] ; then
|
32 |
|
# Make sure pkgconfig files contain the correct version
|
33 |
|
# bug #809095 and #833895
|
34 |
|
sed -i "/^Version:/s@[[:digit:]\.]\+@${PV}@" ${PN}.spec || die
|
|
39 |
if ! use examples; then
|
|
40 |
sed -e '/examples/d' Makefile -i || die
|
|
41 |
fi
|
|
42 |
if ! use test; then
|
|
43 |
sed -e '/test/d' Makefile -i || die
|
35 |
44 |
fi
|
36 |
45 |
|
37 |
46 |
multilib_copy_sources
|
... | ... | |
63 |
72 |
}
|
64 |
73 |
|
65 |
74 |
multilib_src_test() {
|
66 |
|
emake V=1 runtests
|
|
75 |
local disabled_tests=(
|
|
76 |
accept.c
|
|
77 |
fpos.c
|
|
78 |
io_uring_register.c
|
|
79 |
link-timeout.c
|
|
80 |
read-before-exit.c
|
|
81 |
recv-msgall-stream.c
|
|
82 |
)
|
|
83 |
local disabled_test
|
|
84 |
for disabled_test in "${disabled_tests[@]}"; do
|
|
85 |
sed -i "/\s*${disabled_test}/d" test/Makefile \
|
|
86 |
|| die "Failed to remove ${disabled_test}"
|
|
87 |
done
|
|
88 |
|
|
89 |
emake -C test V=1 runtests
|
67 |
90 |
}
|