public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libdispatch/, dev-libs/libdispatch/files/
Date: Fri, 18 Feb 2022 03:06:59 +0000 (UTC)	[thread overview]
Message-ID: <1645152648.8deac5a404bdca06ad8ece68baee944325e46c35.sam@gentoo> (raw)

commit:     8deac5a404bdca06ad8ece68baee944325e46c35
Author:     Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Mon Feb 14 08:09:12 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 18 02:50:48 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8deac5a4

dev-libs/libdispatch: Support musl

No revbump; patches don't affect existing built versions.

Closes: https://bugs.gentoo.org/829158
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/24187
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../libdispatch/files/libdispatch-5.3.3-musl.patch | 56 ++++++++++++++++++++++
 dev-libs/libdispatch/libdispatch-5.3.3-r1.ebuild   |  5 +-
 dev-libs/libdispatch/libdispatch-5.5.ebuild        |  5 +-
 3 files changed, 64 insertions(+), 2 deletions(-)

diff --git a/dev-libs/libdispatch/files/libdispatch-5.3.3-musl.patch b/dev-libs/libdispatch/files/libdispatch-5.3.3-musl.patch
new file mode 100644
index 000000000000..a162b34efc53
--- /dev/null
+++ b/dev-libs/libdispatch/files/libdispatch-5.3.3-musl.patch
@@ -0,0 +1,56 @@
+Fix building with musl libc
+
+https://github.com/apple/swift-corelibs-libdispatch/pull/594/
+https://bugs.gentoo.org/829158
+https://bugs.gentoo.org/833306
+
+--- a/dispatch/source.h
++++ b/dispatch/source.h
+@@ -32,7 +32,7 @@
+ #endif
+ 
+ #if !defined(_WIN32)
+-#include <sys/signal.h>
++#include <signal.h>
+ #endif
+ 
+ DISPATCH_ASSUME_NONNULL_BEGIN
+--- a/os/generic_unix_base.h
++++ b/os/generic_unix_base.h
+@@ -25,6 +25,14 @@
+ 
+ #if __has_include(<sys/cdefs.h>)
+ #include <sys/cdefs.h>
++#else
++#if defined(__cplusplus)
++#define	__BEGIN_DECLS extern "C" {
++#define	__END_DECLS }
++#else
++#define	__BEGIN_DECLS
++#define	__END_DECLS
++#endif
+ #endif
+ 
+ #ifndef API_AVAILABLE
+--- a/src/shims/getprogname.h
++++ b/src/shims/getprogname.h
+@@ -37,7 +37,7 @@
+ static inline char *
+ getprogname(void)
+ {
+-# if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
++# if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME || defined(__linux__)
+ 	return program_invocation_short_name;
+ # elif defined(__ANDROID__)
+ 	return __progname;
+--- a/tests/dispatch_test.c
++++ b/tests/dispatch_test.c
+@@ -34,7 +34,7 @@
+ #define HAS_SYS_EVENT_H 1
+ #include <sys/event.h>
+ #else
+-#include <sys/poll.h>
++#include <poll.h>
+ #endif
+ #elif defined(_WIN32)
+ #include <Windows.h>

diff --git a/dev-libs/libdispatch/libdispatch-5.3.3-r1.ebuild b/dev-libs/libdispatch/libdispatch-5.3.3-r1.ebuild
index 84d29b791acc..ac43a88ac6fc 100644
--- a/dev-libs/libdispatch/libdispatch-5.3.3-r1.ebuild
+++ b/dev-libs/libdispatch/libdispatch-5.3.3-r1.ebuild
@@ -26,7 +26,10 @@ BDEPEND="
 
 S="${WORKDIR}/${MY_PN}-${MY_PV}"
 
-PATCHES=( "${FILESDIR}/remove-Werror.patch" )
+PATCHES=(
+	"${FILESDIR}/remove-Werror.patch"
+	"${FILESDIR}/libdispatch-5.3.3-musl.patch"
+)
 
 src_configure () {
 	if ! tc-is-clang ; then

diff --git a/dev-libs/libdispatch/libdispatch-5.5.ebuild b/dev-libs/libdispatch/libdispatch-5.5.ebuild
index 72ab2824900b..667e0171b3b0 100644
--- a/dev-libs/libdispatch/libdispatch-5.5.ebuild
+++ b/dev-libs/libdispatch/libdispatch-5.5.ebuild
@@ -29,7 +29,10 @@ BDEPEND="
 
 S="${WORKDIR}/${MY_PN}-${MY_PV}"
 
-PATCHES=( "${FILESDIR}/remove-Werror.patch" )
+PATCHES=(
+	"${FILESDIR}/remove-Werror.patch"
+	"${FILESDIR}/libdispatch-5.3.3-musl.patch"
+)
 
 src_configure () {
 	if ! tc-is-clang ; then


                 reply	other threads:[~2022-02-18  3:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1645152648.8deac5a404bdca06ad8ece68baee944325e46c35.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox