Gentoo Archives: gentoo-commits

From: Rick Farina <zerochaos@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-wireless/qdmr/files/, net-wireless/qdmr/
Date: Fri, 08 Apr 2022 16:48:52
Message-Id: 1649436521.c50dfa8046a6b9365aaf0e0420cd69a1b893164d.zerochaos@gentoo
1 commit: c50dfa8046a6b9365aaf0e0420cd69a1b893164d
2 Author: Rick Farina <zerochaos <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 8 16:48:08 2022 +0000
4 Commit: Rick Farina <zerochaos <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 8 16:48:41 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c50dfa80
7
8 net-wireless/qdmr: build fix for musl
9
10 Bug: https://github.com/hmatuschek/qdmr/issues/216
11 Signed-off-by: Rick Farina <zerochaos <AT> gentoo.org>
12
13 net-wireless/qdmr/files/qdmr-0.10.2-musl.patch | 34 ++++++++++++++++++++++++++
14 net-wireless/qdmr/qdmr-0.10.2.ebuild | 2 ++
15 2 files changed, 36 insertions(+)
16
17 diff --git a/net-wireless/qdmr/files/qdmr-0.10.2-musl.patch b/net-wireless/qdmr/files/qdmr-0.10.2-musl.patch
18 new file mode 100644
19 index 000000000000..21673cb4ebb2
20 --- /dev/null
21 +++ b/net-wireless/qdmr/files/qdmr-0.10.2-musl.patch
22 @@ -0,0 +1,34 @@
23 +From eca81fba54b156707545967b78c823cc38b1b53f Mon Sep 17 00:00:00 2001
24 +From: Hannes Matuschek <hmatuschek@×××××.com>
25 +Date: Wed, 6 Apr 2022 15:29:02 +0200
26 +Subject: [PATCH] Fixed compilation issue under Genoo. Addresses #216.
27 +
28 +---
29 + lib/radiolimits.cc | 5 +++--
30 + 1 file changed, 3 insertions(+), 2 deletions(-)
31 +
32 +diff --git a/lib/radiolimits.cc b/lib/radiolimits.cc
33 +index b883cc8..eb72166 100644
34 +--- a/lib/radiolimits.cc
35 ++++ b/lib/radiolimits.cc
36 +@@ -3,9 +3,10 @@
37 + #include "logger.hh"
38 + #include "config.hh"
39 + #include <QMetaProperty>
40 ++#include <ctype.h>
41 +
42 + // Utility function to check string content for ASCII encoding
43 +-inline bool isascii(const QString &text) {
44 ++inline bool qstring_is_ascii(const QString &text) {
45 + foreach (QChar c, text) {
46 + if ((c<0x1f) && (0x7f != c))
47 + return false;
48 +@@ -205,7 +206,7 @@ RadioLimitString::verify(const ConfigItem *item, const QMetaProperty &prop, Radi
49 + << ") is shorter than minimum size " << _minLen << ".";
50 + }
51 +
52 +- if ((ASCII == _encoding) && (! isascii(value))) {
53 ++ if ((ASCII == _encoding) && (! qstring_is_ascii(value))) {
54 + auto &msg = context.newMessage();
55 + msg << "Cannot encode string '" << value << "' in ASCII.";
56 + }
57
58 diff --git a/net-wireless/qdmr/qdmr-0.10.2.ebuild b/net-wireless/qdmr/qdmr-0.10.2.ebuild
59 index f46aebabe549..6297f6df454e 100644
60 --- a/net-wireless/qdmr/qdmr-0.10.2.ebuild
61 +++ b/net-wireless/qdmr/qdmr-0.10.2.ebuild
62 @@ -36,6 +36,8 @@ DEPEND="${RDEPEND}
63 dev-qt/linguist-tools:5"
64 BDEPEND=""
65
66 +PATCHES=( "${FILESDIR}/${P}-musl.patch" )
67 +
68 pkg_setup() {
69 CONFIG_CHECK="~USB_ACM"
70 WARNING_USB_ACM="Some radios require CONFIG_USB_ACM to work, you may need to enable this driver to talk to your radio"