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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7174D15815E for ; Fri, 9 Feb 2024 22:23:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8E31CE2A80; Fri, 9 Feb 2024 22:23:39 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 718BAE2A80 for ; Fri, 9 Feb 2024 22:23:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B1BD53431B0 for ; Fri, 9 Feb 2024 22:23:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4D31914BD for ; Fri, 9 Feb 2024 22:23:37 +0000 (UTC) From: "James Le Cuirot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" Message-ID: <1707517389.f9c320c49081d55184f4852be82b56c9e0275f84.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libv4l/, media-libs/libv4l/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/libv4l/files/libv4l-1.26.1-libcxx.patch media-libs/libv4l/libv4l-1.26.1.ebuild X-VCS-Directories: media-libs/libv4l/files/ media-libs/libv4l/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: f9c320c49081d55184f4852be82b56c9e0275f84 X-VCS-Branch: master Date: Fri, 9 Feb 2024 22:23:37 +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: a3d71b29-8500-421c-b303-9861016ffee0 X-Archives-Hash: ba02ccd791ec6306d15ed2c2cb6bd25d commit: f9c320c49081d55184f4852be82b56c9e0275f84 Author: James Le Cuirot gentoo org> AuthorDate: Fri Feb 9 22:23:09 2024 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Fri Feb 9 22:23:09 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9c320c4 media-libs/libv4l: Patch to fix building against libc++ This has been submitted upstream. Closes: https://bugs.gentoo.org/919795 Signed-off-by: James Le Cuirot gentoo.org> media-libs/libv4l/files/libv4l-1.26.1-libcxx.patch | 58 ++++++++++++++++++++++ media-libs/libv4l/libv4l-1.26.1.ebuild | 1 + 2 files changed, 59 insertions(+) diff --git a/media-libs/libv4l/files/libv4l-1.26.1-libcxx.patch b/media-libs/libv4l/files/libv4l-1.26.1-libcxx.patch new file mode 100644 index 000000000000..5b5eea83bc9a --- /dev/null +++ b/media-libs/libv4l/files/libv4l-1.26.1-libcxx.patch @@ -0,0 +1,58 @@ +From c7ef1a55bb6accb708a4e09d71028b904b07e49e Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Wed, 7 Feb 2024 22:48:59 +0000 +Subject: [PATCH] v4l2-compliance: Fix building against libc++ + +v4l2-test-time32-64.cpp included compiler.h, which checks +_LIBCPP_VERSION. This only works against libc++ when a C++ header has +already been included, which wasn't the case here. + +The header is the C++20 method of defining _LIBCPP_VERSION, +but for older versions, works as an alternative, so include +that in compiler.h. + +compiler.h is for C as well as C++ though, so use __cplusplus to check +for a C++ compiler before including . + +Signed-off-by: James Le Cuirot +--- + include/compiler.h | 27 ++++++++++++--------------- + 1 file changed, 12 insertions(+), 15 deletions(-) + +diff --git a/include/compiler.h b/include/compiler.h +index 5ad54f41..169247a8 100644 +--- a/include/compiler.h ++++ b/include/compiler.h +@@ -1,17 +1,14 @@ +-#ifdef _LIBCPP_VERSION +-#define fallthrough _LIBCPP_FALLTHROUGH() ++#if !defined(__cplusplus) || __cplusplus < 201103L ++ #define fallthrough ((void)0) + #else +- +-#if __cplusplus >= 201103L +- +-#ifdef __clang__ +-#define fallthrough [[clang::fallthrough]] +-#else +-#define fallthrough [[gnu::fallthrough]] +-#endif // __clang__ +- +-#else +-#define fallthrough ((void)0) +- ++ #include ++ #ifdef _LIBCPP_VERSION ++ #define fallthrough _LIBCPP_FALLTHROUGH() ++ #else ++ #ifdef __clang__ ++ #define fallthrough [[clang::fallthrough]] ++ #else ++ #define fallthrough [[gnu::fallthrough]] ++ #endif // __clang__ ++ #endif // _LIBCPP_VERSION + #endif // __cplusplus +-#endif // _LIBCPP_VERSION +-- +2.43.0 + diff --git a/media-libs/libv4l/libv4l-1.26.1.ebuild b/media-libs/libv4l/libv4l-1.26.1.ebuild index d29bf0e53ee9..3480dac0970b 100644 --- a/media-libs/libv4l/libv4l-1.26.1.ebuild +++ b/media-libs/libv4l/libv4l-1.26.1.ebuild @@ -67,6 +67,7 @@ S="${WORKDIR}/${MY_P}" PATCHES=( "${FILESDIR}"/${PN}-1.26.0-meson.patch + "${FILESDIR}"/${PN}-1.26.1-libcxx.patch ) check_llvm() {