diff options
author | Florian Schmaus <flow@gentoo.org> | 2023-01-22 09:48:20 +0100 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2023-01-22 09:48:28 +0100 |
commit | 29d4d06ff10f171a8766c326abcc0d5dad8b1eb8 (patch) | |
tree | 2ab39556ac1140785874556bc0008418bdbedd6a | |
parent | media-sound/amsynth: bump to 1.13.1 (diff) | |
download | gentoo-29d4d06ff10f171a8766c326abcc0d5dad8b1eb8.tar.gz gentoo-29d4d06ff10f171a8766c326abcc0d5dad8b1eb8.tar.bz2 gentoo-29d4d06ff10f171a8766c326abcc0d5dad8b1eb8.zip |
sys-libs/liburing: backport patch to export symbols
Closes: https://bugs.gentoo.org/891633
Signed-off-by: Florian Schmaus <flow@gentoo.org>
-rw-r--r-- | sys-libs/liburing/files/liburing-2.3-liburing.map-Export-io_uring_-enable_rings-register_.patch | 35 | ||||
-rw-r--r-- | sys-libs/liburing/liburing-2.3-r1.ebuild | 72 |
2 files changed, 107 insertions, 0 deletions
diff --git a/sys-libs/liburing/files/liburing-2.3-liburing.map-Export-io_uring_-enable_rings-register_.patch b/sys-libs/liburing/files/liburing-2.3-liburing.map-Export-io_uring_-enable_rings-register_.patch new file mode 100644 index 000000000000..8ea4c4df2b8a --- /dev/null +++ b/sys-libs/liburing/files/liburing-2.3-liburing.map-Export-io_uring_-enable_rings-register_.patch @@ -0,0 +1,35 @@ +From 19424b0baa5999918701e1972b901b0937331581 Mon Sep 17 00:00:00 2001 +From: Ammar Faizi <ammarfaizi2@gnuweeb.org> +Date: Sat, 14 Jan 2023 10:54:05 +0700 +Subject: [PATCH] liburing.map: Export + `io_uring_{enable_rings,register_restrictions}` + +When adding these two functions, Stefano didn't add +io_uring_enable_rings() and io_uring_register_restrictions() to +liburing.map. It causes a linking problem. Add them to liburing.map. + +This issue hits liburing 2.0 to 2.3. + +[flow: backport to liburing 2.3] + +Closes: https://github.com/axboe/liburing/pull/774 +Fixes: https://github.com/axboe/liburing/issues/773 +Fixes: https://github.com/facebook/folly/issues/1908 +Fixes: d2654b1ac886 ("Add helper to enable rings") +Fixes: 25cf9b968a27 ("Add helper to register restrictions") +Cc: Dylan Yudaken <dylany@meta.com> +Cc: Stefano Garzarella <sgarzare@redhat.com> +Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org> +Link: https://lore.kernel.org/r/20230114035405.429608-1-ammar.faizi@intel.com +Signed-off-by: Jens Axboe <axboe@kernel.dk> +--- a/src/liburing.map ++++ b/src/liburing.map +@@ -68,2 +68,5 @@ LIBURING_2.3 { + io_uring_submit_and_get_events; ++ ++ io_uring_enable_rings; ++ io_uring_register_restrictions; + } LIBURING_2.3; +-- +2.39.1 + diff --git a/sys-libs/liburing/liburing-2.3-r1.ebuild b/sys-libs/liburing/liburing-2.3-r1.ebuild new file mode 100644 index 000000000000..5a407a2b025e --- /dev/null +++ b/sys-libs/liburing/liburing-2.3-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-minimal toolchain-funcs + +DESCRIPTION="Efficient I/O with io_uring" +HOMEPAGE="https://github.com/axboe/liburing" +if [[ "${PV}" == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/axboe/liburing.git" +else + SRC_URI="https://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi +LICENSE="MIT" +SLOT="0/2" # liburing.so major version + +IUSE="static-libs" +# fsync test hangs forever +RESTRICT="test" + +# At least installed headers need <linux/*>, bug #802516 +DEPEND=">=sys-kernel/linux-headers-5.1" +RDEPEND="${DEPEND}" + +PATCHES=( + # https://bugs.gentoo.org/891633 + "${FILESDIR}/${PN}-2.3-liburing.map-Export-io_uring_-enable_rings-register_.patch" +) + +src_prepare() { + default + + if [[ "${PV}" != *9999 ]] ; then + # Make sure pkgconfig files contain the correct version + # bug #809095 and #833895 + sed -i "/^Version:/s@[[:digit:]\.]\+@${PV}@" ${PN}.spec || die + fi + + multilib_copy_sources +} + +multilib_src_configure() { + local myconf=( + --prefix="${EPREFIX}/usr" + --libdir="${EPREFIX}/usr/$(get_libdir)" + --libdevdir="${EPREFIX}/usr/$(get_libdir)" + --mandir="${EPREFIX}/usr/share/man" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + ) + # No autotools configure! "econf" will fail. + TMPDIR="${T}" ./configure "${myconf[@]}" || die +} + +multilib_src_compile() { + emake V=1 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" +} + +multilib_src_install_all() { + einstalldocs + + if ! use static-libs ; then + find "${ED}" -type f -name "*.a" -delete || die + fi +} + +multilib_src_test() { + emake V=1 runtests +} |