diff options
-rw-r--r-- | net-wireless/qdmr/Manifest | 1 | ||||
-rw-r--r-- | net-wireless/qdmr/files/qdmr-0.10.2-fix-cast-to-int.patch | 37 | ||||
-rw-r--r-- | net-wireless/qdmr/metadata.xml | 11 | ||||
-rw-r--r-- | net-wireless/qdmr/qdmr-0.10.2.ebuild | 56 |
4 files changed, 105 insertions, 0 deletions
diff --git a/net-wireless/qdmr/Manifest b/net-wireless/qdmr/Manifest new file mode 100644 index 0000000..3482c6d --- /dev/null +++ b/net-wireless/qdmr/Manifest @@ -0,0 +1 @@ +DIST qdmr-0.10.2.tar.gz 5903169 BLAKE2B 1ef4e9846dd4206d1eae3cfb5562fccec24b156bfd77a82e801e8d1194b969bbda0f14e99c1b6505d18abba4a79d87c5eee2232110969faf4c078c1fe781a8ee SHA512 96a3fd22be2b8f77a4925cfb426de12a55b29ee73eaf78869091fd0ecd36d2df51195f2ca70689857e190767c4651d3d4915a0b7aa9f5c6e429f46a53edb991c diff --git a/net-wireless/qdmr/files/qdmr-0.10.2-fix-cast-to-int.patch b/net-wireless/qdmr/files/qdmr-0.10.2-fix-cast-to-int.patch new file mode 100644 index 0000000..3ce9e0e --- /dev/null +++ b/net-wireless/qdmr/files/qdmr-0.10.2-fix-cast-to-int.patch @@ -0,0 +1,37 @@ +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 1/2] 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."; + } +-- +2.35.1 + diff --git a/net-wireless/qdmr/metadata.xml b/net-wireless/qdmr/metadata.xml new file mode 100644 index 0000000..d03ef4b --- /dev/null +++ b/net-wireless/qdmr/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>radio@gentoo.org</email> + <name>Radio</name> + </maintainer> + <upstream> + <remote-id type="github">hmatuschek/qdmr</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-wireless/qdmr/qdmr-0.10.2.ebuild b/net-wireless/qdmr/qdmr-0.10.2.ebuild new file mode 100644 index 0000000..d81742d --- /dev/null +++ b/net-wireless/qdmr/qdmr-0.10.2.ebuild @@ -0,0 +1,56 @@ +# Copyright 2021-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake udev linux-info + +DESCRIPTION="GUI application for configuring and programming cheap DMR radios" +HOMEPAGE="https://dm3mat.darc.de/qdmr/" +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/hmatuschek/qdmr.git" +else + MY_PV="${PV/_/-}" + SRC_URI="https://github.com/hmatuschek/qdmr/archive/refs/tags/v${MY_PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${MY_PV}" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-3+" +SLOT="0" + +RDEPEND=" + dev-cpp/yaml-cpp:= + dev-qt/designer:5 + dev-qt/qttest:5 + dev-qt/qtwidgets:5 + dev-qt/qtgui:5 + dev-qt/qtcore:5 + dev-qt/qtnetwork:5 + dev-qt/qtpositioning:5 + dev-qt/qtserialport:5 + virtual/libusb:1 +" +DEPEND="${RDEPEND} + dev-qt/linguist-tools:5" +BDEPEND="" + +PATCHES=( + "${FILESDIR}"/${P}-fix-cast-to-int.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" + CONFIG_CHECK="~USB_SERIAL" + WARNING_USB_SERIAL="Some radios require CONFIG_USB_SERIAL to work, you may need to enable this driver to talk to your radio" + check_extra_config +} + +src_prepare() { + #no devil perms + sed -i 's#666#660#' dist/99-qdmr.rules + sed -i "s#/etc/udev/rules.d/#$(get_udevdir)/rules.d#" lib/CMakeLists.txt + cmake_src_prepare +} |