summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Farina <zerochaos@gentoo.org>2022-04-08 12:48:08 -0400
committerRick Farina <zerochaos@gentoo.org>2022-04-08 12:48:41 -0400
commitc50dfa8046a6b9365aaf0e0420cd69a1b893164d (patch)
tree516572692993e9f8551a8417d5e2a32ce5d8c108 /net-wireless/qdmr
parentnet-wireless/qdmr: update maintainers (diff)
downloadgentoo-c50dfa8046a6b9365aaf0e0420cd69a1b893164d.tar.gz
gentoo-c50dfa8046a6b9365aaf0e0420cd69a1b893164d.tar.bz2
gentoo-c50dfa8046a6b9365aaf0e0420cd69a1b893164d.zip
net-wireless/qdmr: build fix for musl
Bug: https://github.com/hmatuschek/qdmr/issues/216 Signed-off-by: Rick Farina <zerochaos@gentoo.org>
Diffstat (limited to 'net-wireless/qdmr')
-rw-r--r--net-wireless/qdmr/files/qdmr-0.10.2-musl.patch34
-rw-r--r--net-wireless/qdmr/qdmr-0.10.2.ebuild2
2 files changed, 36 insertions, 0 deletions
diff --git a/net-wireless/qdmr/files/qdmr-0.10.2-musl.patch b/net-wireless/qdmr/files/qdmr-0.10.2-musl.patch
new file mode 100644
index 000000000000..21673cb4ebb2
--- /dev/null
+++ b/net-wireless/qdmr/files/qdmr-0.10.2-musl.patch
@@ -0,0 +1,34 @@
+From eca81fba54b156707545967b78c823cc38b1b53f Mon Sep 17 00:00:00 2001
+From: Hannes Matuschek <hmatuschek@gmail.com>
+Date: Wed, 6 Apr 2022 15:29:02 +0200
+Subject: [PATCH] Fixed compilation issue under Genoo. Addresses #216.
+
+---
+ lib/radiolimits.cc | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/lib/radiolimits.cc b/lib/radiolimits.cc
+index b883cc8..eb72166 100644
+--- a/lib/radiolimits.cc
++++ b/lib/radiolimits.cc
+@@ -3,9 +3,10 @@
+ #include "logger.hh"
+ #include "config.hh"
+ #include <QMetaProperty>
++#include <ctype.h>
+
+ // Utility function to check string content for ASCII encoding
+-inline bool isascii(const QString &text) {
++inline bool qstring_is_ascii(const QString &text) {
+ foreach (QChar c, text) {
+ if ((c<0x1f) && (0x7f != c))
+ return false;
+@@ -205,7 +206,7 @@ RadioLimitString::verify(const ConfigItem *item, const QMetaProperty &prop, Radi
+ << ") is shorter than minimum size " << _minLen << ".";
+ }
+
+- if ((ASCII == _encoding) && (! isascii(value))) {
++ if ((ASCII == _encoding) && (! qstring_is_ascii(value))) {
+ auto &msg = context.newMessage();
+ msg << "Cannot encode string '" << value << "' in ASCII.";
+ }
diff --git a/net-wireless/qdmr/qdmr-0.10.2.ebuild b/net-wireless/qdmr/qdmr-0.10.2.ebuild
index f46aebabe549..6297f6df454e 100644
--- a/net-wireless/qdmr/qdmr-0.10.2.ebuild
+++ b/net-wireless/qdmr/qdmr-0.10.2.ebuild
@@ -36,6 +36,8 @@ DEPEND="${RDEPEND}
dev-qt/linguist-tools:5"
BDEPEND=""
+PATCHES=( "${FILESDIR}/${P}-musl.patch" )
+
pkg_setup() {
CONFIG_CHECK="~USB_ACM"
WARNING_USB_ACM="Some radios require CONFIG_USB_ACM to work, you may need to enable this driver to talk to your radio"