commit:     bcc6a6173c0312eb7288092942412c4fd2f63740
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  3 17:29:59 2022 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Thu Feb  3 17:30:57 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcc6a617

net-misc/oidc-agent: support building against musl

Closes: https://bugs.gentoo.org/832552
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 net-misc/oidc-agent/files/oidc-agent-4.2.6_sighandler_t.patch | 11 +++++++++++
 net-misc/oidc-agent/oidc-agent-4.2.6.ebuild                   | 10 ++++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/net-misc/oidc-agent/files/oidc-agent-4.2.6_sighandler_t.patch 
b/net-misc/oidc-agent/files/oidc-agent-4.2.6_sighandler_t.patch
new file mode 100644
index 000000000000..d450d0ec2c7a
--- /dev/null
+++ b/net-misc/oidc-agent/files/oidc-agent-4.2.6_sighandler_t.patch
@@ -0,0 +1,11 @@
+--- a/src/oidc-gen/gen_signal_handler.c
++++ b/src/oidc-gen/gen_signal_handler.c
+@@ -12,7 +12,7 @@
+ 
+ static char* global_state = NULL;
+ #ifndef __APPLE__
+-static __sighandler_t old_sigint;
++static sighandler_t old_sigint;
+ #else
+ static sig_t old_sigint;
+ #endif

diff --git a/net-misc/oidc-agent/oidc-agent-4.2.6.ebuild 
b/net-misc/oidc-agent/oidc-agent-4.2.6.ebuild
index fc0c23c79b2e..de01a2e4dbb2 100644
--- a/net-misc/oidc-agent/oidc-agent-4.2.6.ebuild
+++ b/net-misc/oidc-agent/oidc-agent-4.2.6.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit xdg-utils
+inherit flag-o-matic xdg-utils
 
 DESCRIPTION="Agent and tools for managing OpenID Connect tokens on the command 
line"
 HOMEPAGE="https://github.com/indigo-dc/oidc-agent";
@@ -18,7 +18,8 @@ DEPEND="app-crypt/libsecret
        dev-libs/libsodium:=
        media-gfx/qrencode
        net-libs/libmicrohttpd:=
-       sys-libs/libseccomp"
+       sys-libs/libseccomp
+       elibc_musl? ( sys-libs/argp-standalone )"
 RDEPEND="${DEPEND}"
 BDEPEND="test? ( dev-libs/check )"
 
@@ -27,11 +28,16 @@ RESTRICT="!test? ( test )"
 PATCHES=(
        "${FILESDIR}"/${PN}-4.0.2_makefile-liblist-automagic.patch
        "${FILESDIR}"/${PN}-4.1.0_install-perms.patch
+       "${FILESDIR}"/${PN}-4.2.6_sighandler_t.patch
 )
 
 src_prepare() {
        default
        sed -i -e 's|^\(\s\+\)@|\1|' Makefile || die "Failed to increase 
verbosity in Makefile"
+
+       # Bug #832552
+       append-cflags -D_GNU_SOURCE
+       use elibc_musl && append-ldflags -largp
 }
 
 src_install() {

Reply via email to