commit:     3b77983e37c3c7b787b3408cd084cfb91ba423a3
Author:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  5 07:40:07 2022 +0000
Commit:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Sat Feb  5 07:44:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b77983e

media-radio/tlf: Fix musl build errors

Closes: https://bugs.gentoo.org/832234
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>

 media-radio/tlf/files/tlf-1.4.1-musl.patch | 12 ++++++++++++
 media-radio/tlf/tlf-1.4.1-r1.ebuild        | 12 ++++++++----
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/media-radio/tlf/files/tlf-1.4.1-musl.patch 
b/media-radio/tlf/files/tlf-1.4.1-musl.patch
new file mode 100644
index 000000000000..a4903015011d
--- /dev/null
+++ b/media-radio/tlf/files/tlf-1.4.1-musl.patch
@@ -0,0 +1,12 @@
+diff --git a/src/sockserv.c b/src/sockserv.c
+index c25f0fb..647188f 100644
+--- a/src/sockserv.c
++++ b/src/sockserv.c
+@@ -31,6 +31,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
++#include <sys/select.h>
+ 
+ #include "sockserv.h"
+ #include "tlf_curses.h"

diff --git a/media-radio/tlf/tlf-1.4.1-r1.ebuild 
b/media-radio/tlf/tlf-1.4.1-r1.ebuild
index 897ebe600935..c19feb243da0 100644
--- a/media-radio/tlf/tlf-1.4.1-r1.ebuild
+++ b/media-radio/tlf/tlf-1.4.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -20,23 +20,27 @@ RDEPEND="sys-libs/ncurses:=
        dev-libs/glib:2
        media-libs/hamlib:=
        media-sound/sox
-       dev-libs/xmlrpc-c[curl]"
+       dev-libs/xmlrpc-c[curl]
+       elibc_musl? ( sys-libs/argp-standalone )"
 DEPEND="
        ${RDEPEND}
        test? ( dev-util/cmocka )"
 
-PATCHES=( "${FILESDIR}"/${P}-zone_nr.patch )
+PATCHES=( "${FILESDIR}/${P}-zone_nr.patch"
+         "${FILESDIR}/${P}-musl.patch"
+       )
 
 src_prepare() {
        if has_version '>=media-libs/hamlib-4.2' ; then
                sed -i -e "s/FILPATHLEN/HAMLIB_FILPATHLEN/g" 
"${S}"/src/sendqrg.c || die
        fi
 
-       eapply ${PATCHES}
+       eapply ${PATCHES[@]}
        eapply_user
 }
 
 src_configure() {
+       use elibc_musl && append-libs argp
        append-ldflags -L/usr/$(get_libdir)/hamlib
        econf --enable-fldigi-xmlrpc
 }

Reply via email to