summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2023-08-21 14:19:27 +0100
committerMarek Szuba <marecki@gentoo.org>2023-08-21 14:24:27 +0100
commite99a0b6f70e1e63188ad7f4995b6775d86105e7f (patch)
tree20622110265eb75a8c993d4716cafddad605046c /media-radio
parentdev-python/httpbin: Drop ~m68k keyword (diff)
downloadgentoo-e99a0b6f70e1e63188ad7f4995b6775d86105e7f.tar.gz
gentoo-e99a0b6f70e1e63188ad7f4995b6775d86105e7f.tar.bz2
gentoo-e99a0b6f70e1e63188ad7f4995b6775d86105e7f.zip
media-radio/chirp: new package, add 20230818
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'media-radio')
-rw-r--r--media-radio/chirp/Manifest1
-rw-r--r--media-radio/chirp/chirp-20230818.ebuild60
-rw-r--r--media-radio/chirp/files/chirp-20230818_no-future.patch30
-rw-r--r--media-radio/chirp/metadata.xml12
4 files changed, 103 insertions, 0 deletions
diff --git a/media-radio/chirp/Manifest b/media-radio/chirp/Manifest
new file mode 100644
index 000000000000..cfeca08799ee
--- /dev/null
+++ b/media-radio/chirp/Manifest
@@ -0,0 +1 @@
+DIST chirp-20230818.tar.gz 1750957 BLAKE2B 765a3cdffc51372c7012fd59112c00dbe58374e68434ec127e3d7b6702dc80371564244972457cebc44c1e51d5d50f05f413b263a63bbc94c88c0db1f437c380 SHA512 dcc8eadc75ea1e74c32dfc9c73f1857c1745cfbf1272934425a022fa663d1471cc8e79d63da9628369b833f7fc25ce86960924545ad5bfe2fe4d34509e7308eb
diff --git a/media-radio/chirp/chirp-20230818.ebuild b/media-radio/chirp/chirp-20230818.ebuild
new file mode 100644
index 000000000000..19399d3e04db
--- /dev/null
+++ b/media-radio/chirp/chirp-20230818.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# py3.12 blocked by wxpython
+PYTHON_COMPAT=( python3_{10..11} )
+DISTUTILS_SINGLE_IMPL=1
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1
+
+DESCRIPTION="A free, open-source tool for programming your radio"
+HOMEPAGE="https://chirp.danplanet.com/"
+SRC_URI="https://trac.chirp.danplanet.com/${PN}_next/next-${PV}/${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+gui"
+
+RDEPEND="$(python_gen_cond_dep '
+ dev-python/pyserial[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ gui? (
+ dev-python/wxpython:4.0[${PYTHON_USEDEP}]
+ dev-python/yattag[${PYTHON_USEDEP}]
+ )
+')"
+BDEPEND="test? ( $(python_gen_cond_dep '
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+') )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-20230818_no-future.patch
+)
+
+distutils_enable_tests pytest
+
+# The alias map is an internal developer file not included in release tarballs
+EPYTEST_DESELECT=(
+ tests/unit/test_directory.py::TestAliasMap
+)
+
+python_test() {
+ # From the contents of tests/ upstream currently only runs unit and driver
+ # tests, and the latter can take so long that they have even got a special
+ # script for only running them on drivers whose code has changed
+ # with respect to origin/master.
+ epytest tests/unit/
+}
+
+src_install() {
+ distutils-r1_src_install
+ if ! use gui; then
+ rm "${ED}"/usr/bin/${PN} || die
+ fi
+}
diff --git a/media-radio/chirp/files/chirp-20230818_no-future.patch b/media-radio/chirp/files/chirp-20230818_no-future.patch
new file mode 100644
index 000000000000..554b614849bc
--- /dev/null
+++ b/media-radio/chirp/files/chirp-20230818_no-future.patch
@@ -0,0 +1,30 @@
+future.standard_library.install_aliases() is a no-op on Python3 anyway.
+
+--- a/chirp/chirp_common.py
++++ b/chirp/chirp_common.py
+@@ -14,7 +14,6 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ from builtins import bytes
+-from future import standard_library
+
+ import base64
+ import json
+@@ -1920,7 +1919,6 @@
+ def urlretrieve(url, fn):
+ """Grab an URL and save it in a specified file"""
+
+- standard_library.install_aliases()
+ import urllib.request
+ import urllib.error
+
+--- a/setup.py
++++ b/setup.py
+@@ -12,7 +12,6 @@
+ 'pyserial',
+ 'requests',
+ 'six',
+- 'future',
+ 'importlib-resources;python_version<"3.10"',
+ 'yattag',
+ ],
diff --git a/media-radio/chirp/metadata.xml b/media-radio/chirp/metadata.xml
new file mode 100644
index 000000000000..483d06c69224
--- /dev/null
+++ b/media-radio/chirp/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>marecki@gentoo.org</email>
+ <name>Marek Szuba</name>
+ </maintainer>
+ <stabilize-allarches/>
+ <upstream>
+ <remote-id type="github">kk7ds/chirp</remote-id>
+ </upstream>
+</pkgmetadata>