From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 738551382C5 for ; Fri, 12 Mar 2021 15:06:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B1A98E0855; Fri, 12 Mar 2021 15:06:57 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8A5D1E0855 for ; Fri, 12 Mar 2021 15:06:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4F11D335D1A for ; Fri, 12 Mar 2021 15:06:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5FD85C3 for ; Fri, 12 Mar 2021 15:06:54 +0000 (UTC) From: "Jory Pratt" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jory Pratt" Message-ID: <1615561607.a76defdd03f53949133c2a18dec2ec2b8aa07ef6.anarchy@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/liburing/files/, sys-libs/liburing/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/liburing/files/liburing-0.7-ucontext_h-detection.patch sys-libs/liburing/liburing-0.7-r1.ebuild X-VCS-Directories: sys-libs/liburing/files/ sys-libs/liburing/ X-VCS-Committer: anarchy X-VCS-Committer-Name: Jory Pratt X-VCS-Revision: a76defdd03f53949133c2a18dec2ec2b8aa07ef6 X-VCS-Branch: master Date: Fri, 12 Mar 2021 15:06:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 15046cf6-1c00-4273-898e-e2b5e0b587c8 X-Archives-Hash: 62ab81f3a58840fd1a5430cc3498374a commit: a76defdd03f53949133c2a18dec2ec2b8aa07ef6 Author: Jory Pratt gentoo org> AuthorDate: Fri Mar 12 15:06:33 2021 +0000 Commit: Jory Pratt gentoo org> CommitDate: Fri Mar 12 15:06:47 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a76defdd sys-libs/liburing: add support to detect ucontext.h Closes: https://bugs.gentoo.org/713528 Closes: https://github.com/gentoo/musl/issues/379 Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Jory Pratt gentoo.org> .../files/liburing-0.7-ucontext_h-detection.patch | 72 ++++++++++++++++++++++ sys-libs/liburing/liburing-0.7-r1.ebuild | 6 +- 2 files changed, 77 insertions(+), 1 deletion(-) diff --git a/sys-libs/liburing/files/liburing-0.7-ucontext_h-detection.patch b/sys-libs/liburing/files/liburing-0.7-ucontext_h-detection.patch new file mode 100644 index 00000000000..24b847d919d --- /dev/null +++ b/sys-libs/liburing/files/liburing-0.7-ucontext_h-detection.patch @@ -0,0 +1,72 @@ +From 1cf969dfcba797a02d74540965677b92d3884cfa Mon Sep 17 00:00:00 2001 +From: Simon Zeni +Date: Tue, 27 Oct 2020 22:31:21 -0400 +Subject: [PATCH] examples: disable ucontext-cp if ucontext.h is not available + +The header file `ucontext.h` is not available on musl based distros. The +example `ucontext-cp` is not built if `configure` fails to locate the +header. + +Signed-off-by: Simon Zeni +Signed-off-by: Jens Axboe +--- + configure | 21 +++++++++++++++++++++ + examples/Makefile | 6 +++++- + 2 files changed, 26 insertions(+), 1 deletion(-) + +diff --git a/configure b/configure +index c911f59..3b96cde 100755 +--- a/configure ++++ b/configure +@@ -287,6 +287,24 @@ if compile_prog_cxx "" "" "C++"; then + fi + print_config "C++" "$has_cxx" + ++########################################## ++# check for ucontext support ++has_ucontext="no" ++cat > $TMPC << EOF ++#include ++int main(int argc, char **argv) ++{ ++ ucontext_t ctx; ++ getcontext(&ctx); ++ return 0; ++} ++EOF ++if compile_prog "" "" "has_ucontext"; then ++ has_ucontext="yes" ++fi ++print_config "has_ucontext" "$has_ucontext" ++ ++ + ############################################################################# + + if test "$__kernel_rwf_t" = "yes"; then +@@ -304,6 +322,9 @@ fi + if test "$has_cxx" = "yes"; then + output_sym "CONFIG_HAVE_CXX" + fi ++if test "$has_ucontext" = "yes"; then ++ output_sym "CONFIG_HAVE_UCONTEXT" ++fi + + echo "CC=$cc" >> $config_host_mak + print_config "CC" "$cc" +diff --git a/examples/Makefile b/examples/Makefile +index 0eec627..60c1b71 100644 +--- a/examples/Makefile ++++ b/examples/Makefile +@@ -10,7 +10,11 @@ ifneq ($(MAKECMDGOALS),clean) + include ../config-host.mak + endif + +-all_targets += io_uring-test io_uring-cp link-cp ucontext-cp ++all_targets += io_uring-test io_uring-cp link-cp ++ ++ifdef CONFIG_HAVE_UCONTEXT ++all_targets += ucontext-cp ++endif + + all: $(all_targets) + diff --git a/sys-libs/liburing/liburing-0.7-r1.ebuild b/sys-libs/liburing/liburing-0.7-r1.ebuild index dc6b6076077..715212503eb 100644 --- a/sys-libs/liburing/liburing-0.7-r1.ebuild +++ b/sys-libs/liburing/liburing-0.7-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -21,6 +21,10 @@ IUSE="static-libs" # fsync test hangs forever RESTRICT="test" +PATCHES=( + "${FILESDIR}"/${PN}-0.7-ucontext_h-detection.patch +) + src_prepare() { default multilib_copy_sources