From: "Thomas Beierlein" <tomjbe@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-radio/svxlink/files/, media-radio/svxlink/
Date: Tue, 30 Jul 2024 18:39:37 +0000 (UTC) [thread overview]
Message-ID: <1722364735.0cee8c7c5aa3d1f90cde14d40fb927966a3c31e7.tomjbe@gentoo> (raw)
commit: 0cee8c7c5aa3d1f90cde14d40fb927966a3c31e7
Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 30 16:03:43 2024 +0000
Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Tue Jul 30 18:38:55 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cee8c7c
media-radio/svxlink: Fix MUSL related bugs
- MUSL does not provide the res_nxxx() functions like Glibc. The
original res_xxx() functions are implement stateless in MUSL and
must be used instead.
- Fix some missing includes
Closes: https://bugs.gentoo.org/936813
Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>
media-radio/svxlink/files/svxlink-24.02-musl.patch | 81 ++++++++++++++++++++++
...ink-24.02-r1.ebuild => svxlink-24.02-r2.ebuild} | 4 ++
2 files changed, 85 insertions(+)
diff --git a/media-radio/svxlink/files/svxlink-24.02-musl.patch b/media-radio/svxlink/files/svxlink-24.02-musl.patch
new file mode 100644
index 000000000000..20eb97f85716
--- /dev/null
+++ b/media-radio/svxlink/files/svxlink-24.02-musl.patch
@@ -0,0 +1,81 @@
+diff --git a/src/async/audio/AsyncAudioContainerPcm.h b/src/async/audio/AsyncAudioContainerPcm.h
+index 5ce66dd..a38bd9f 100644
+# add forgotten include
+--- a/src/async/audio/AsyncAudioContainerPcm.h
++++ b/src/async/audio/AsyncAudioContainerPcm.h
+@@ -40,7 +40,6 @@ An example of how to use the Async::AudioContainer class
+
+ #include <vector>
+
+-
+ /****************************************************************************
+ *
+ * Project Includes
+@@ -48,7 +47,7 @@ An example of how to use the Async::AudioContainer class
+ ****************************************************************************/
+
+ #include <AsyncAudioContainer.h>
+-
++#include <cstdint>
+
+ /****************************************************************************
+ *
+diff --git a/src/async/core/AsyncAtTimer.h b/src/async/core/AsyncAtTimer.h
+index 7aa593b..5404a47 100644
+# timeval is defined in <<F2>sys/tims.h>
+--- a/src/async/core/AsyncAtTimer.h
++++ b/src/async/core/AsyncAtTimer.h
+@@ -43,7 +43,7 @@ An example of how to use the AsyncAtTimer class
+ *
+ ****************************************************************************/
+
+-#include <time.h>
++#include <sys/time.h>
+ #include <sigc++/sigc++.h>
+
+
+diff --git a/src/async/cpp/AsyncCppDnsLookupWorker.cpp b/src/async/cpp/AsyncCppDnsLookupWorker.cpp
+index f2e39b0..df73eb9 100644
+# res_xx functions are stateless in MUSL, so no res_nxxx is needed
+# furthermore no res_close exists
+--- a/src/async/cpp/AsyncCppDnsLookupWorker.cpp
++++ b/src/async/cpp/AsyncCppDnsLookupWorker.cpp
+@@ -306,12 +306,12 @@ void CppDnsLookupWorker::workerFunc(CppDnsLookupWorker::ThreadContext& ctx)
+ if (qtype != 0)
+ {
+ struct __res_state state;
+- int ret = res_ninit(&state);
++ int ret = res_init();
+ if (ret != -1)
+ {
+ state.options = RES_DEFAULT;
+ const char *dname = ctx.label.c_str();
+- ctx.anslen = res_nsearch(&state, dname, ns_c_in, qtype,
++ ctx.anslen = res_search(dname, ns_c_in, qtype,
+ ctx.answer, sizeof(ctx.answer));
+ if (ctx.anslen == -1)
+ {
+@@ -324,7 +324,7 @@ void CppDnsLookupWorker::workerFunc(CppDnsLookupWorker::ThreadContext& ctx)
+ // does not grow with every failed lookup. But even so, it seems
+ // that res_close is not cleaning up properly.
+ // Glibc 2.33-18 on Fedora 34.
+- res_nclose(&state);
++
+ }
+ else
+ {
+@@ -538,12 +538,10 @@ void CppDnsLookupWorker::printErrno(const std::string& msg)
+ {
+ char errbuf[1024];
+ char* errmsg = errbuf;
+-#if (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE
++
+ int ret = strerror_r(errno, errbuf, sizeof(errbuf));
+ assert(ret == 0);
+-#else
+- errmsg = strerror_r(errno, errbuf, sizeof(errbuf));
+-#endif
++
+ std::cerr << "*** " << msg << ": " << errmsg << std::endl;
+ } /* CppDnsLookupWorker::printErrno */
+
diff --git a/media-radio/svxlink/svxlink-24.02-r1.ebuild b/media-radio/svxlink/svxlink-24.02-r2.ebuild
similarity index 94%
rename from media-radio/svxlink/svxlink-24.02-r1.ebuild
rename to media-radio/svxlink/svxlink-24.02-r2.ebuild
index b14c2baaa36a..2d5062de0b33 100644
--- a/media-radio/svxlink/svxlink-24.02-r1.ebuild
+++ b/media-radio/svxlink/svxlink-24.02-r2.ebuild
@@ -39,6 +39,10 @@ BDEPEND="
virtual/pkgconfig"
src_prepare() {
+ # fix build for MUSL (bug #936813)
+ if use elibc_musl ; then
+ eapply -p1 "${FILESDIR}/$P-musl.patch"
+ fi
cmake_src_prepare
# drop deprecated desktop category (bug #475730)
sed -i -e "s:Categories=Application;:Categories=:g" src/qtel/qtel.desktop || die
next reply other threads:[~2024-07-30 18:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 18:39 Thomas Beierlein [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-26 15:32 [gentoo-commits] repo/gentoo:master commit in: media-radio/svxlink/files/, media-radio/svxlink/ Thomas Beierlein
2018-02-24 17:24 Thomas Beierlein
2017-12-28 12:29 Thomas Beierlein
2017-12-27 17:46 Thomas Beierlein
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=1722364735.0cee8c7c5aa3d1f90cde14d40fb927966a3c31e7.tomjbe@gentoo \
--to=tomjbe@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