summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Beierlein <tomjbe@gentoo.org>2021-03-11 15:47:58 +0100
committerThomas Beierlein <tomjbe@gentoo.org>2021-03-11 15:47:58 +0100
commit1b1c92c7027e35fc38337921bff437a8ba9a3a0f (patch)
tree344b3eda171bf47e220fc72fb3b0e276d60bcc0a /media-radio/grig
parentmedia-libs/hamlib: Add Subslot for >=media-radio/hamlib-4.1 (diff)
downloadgentoo-1b1c92c7027e35fc38337921bff437a8ba9a3a0f.tar.gz
gentoo-1b1c92c7027e35fc38337921bff437a8ba9a3a0f.tar.bz2
gentoo-1b1c92c7027e35fc38337921bff437a8ba9a3a0f.zip
media-radio/grig: Add patch to work with newer media-libs/hamlib-4.x
* Bump EAPI * Patch taken from Debians grig-0.8.1-3 package. Thanks to airween for preparing the patch. Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Thomas Beierlein <tomjbe@gentoo.org>
Diffstat (limited to 'media-radio/grig')
-rw-r--r--media-radio/grig/files/grig-0.8.1-hamlib4.patch79
-rw-r--r--media-radio/grig/grig-0.8.1-r1.ebuild33
2 files changed, 112 insertions, 0 deletions
diff --git a/media-radio/grig/files/grig-0.8.1-hamlib4.patch b/media-radio/grig/files/grig-0.8.1-hamlib4.patch
new file mode 100644
index 000000000000..e73a4ec4eb9a
--- /dev/null
+++ b/media-radio/grig/files/grig-0.8.1-hamlib4.patch
@@ -0,0 +1,79 @@
+Picked up from Debians grig-0.8.1-3
+Description: align affected parts for Hamlib4.0
+Author: Ervin Hegedus <airween@gmail.com>
+--- grig-0.8.1.orig/src/rig-daemon.c
++++ grig-0.8.1/src/rig-daemon.c
+@@ -1674,12 +1674,12 @@ rig_daemon_exec_cmd (rig_cmd_t c
+ is the current frequency within this range?
+ */
+ if (((mode & myrig->state.rx_range_list[i].modes) == mode) &&
+- (get->freq1 >= myrig->state.rx_range_list[i].start) &&
+- (get->freq1 <= myrig->state.rx_range_list[i].end)) {
++ (get->freq1 >= myrig->state.rx_range_list[i].startf) &&
++ (get->freq1 <= myrig->state.rx_range_list[i].endf)) {
+
+ found_mode = 1;
+- get->fmin = myrig->state.rx_range_list[i].start;
+- get->fmax = myrig->state.rx_range_list[i].end;
++ get->fmin = myrig->state.rx_range_list[i].startf;
++ get->fmax = myrig->state.rx_range_list[i].endf;
+
+ grig_debug_local (RIG_DEBUG_VERBOSE,
+ _("%s: Found frequency range for mode %d"),
+@@ -2971,7 +2971,7 @@ rig_daemon_exec_cmd (rig_cmd_t c
+ val.i = set->voxdel;
+
+ /* try to execute command */
+- retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_VOX, val);
++ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_VOXDELAY, val);
+
+ /* raise anomaly if execution did not succeed */
+ if (retcode != RIG_OK) {
+@@ -2996,7 +2996,7 @@ rig_daemon_exec_cmd (rig_cmd_t c
+ value_t val;
+
+ /* try to execute command */
+- retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_VOX, &val);
++ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_VOXDELAY, &val);
+
+ /* raise anomaly if execution did not succeed */
+ if (retcode != RIG_OK) {
+--- grig-0.8.1.orig/src/rig-daemon-check.c
++++ grig-0.8.1/src/rig-daemon-check.c
+@@ -398,12 +398,12 @@ rig_daemon_check_mode (RIG
+ */
+ if (!found_mode &&
+ ((mode & myrig->state.rx_range_list[i].modes) == mode) &&
+- (get->freq1 >= myrig->state.rx_range_list[i].start) &&
+- (get->freq1 <= myrig->state.rx_range_list[i].end)) {
++ (get->freq1 >= myrig->state.rx_range_list[i].startf) &&
++ (get->freq1 <= myrig->state.rx_range_list[i].endf)) {
+
+ found_mode = 1;
+- get->fmin = myrig->state.rx_range_list[i].start;
+- get->fmax = myrig->state.rx_range_list[i].end;
++ get->fmin = myrig->state.rx_range_list[i].startf;
++ get->fmax = myrig->state.rx_range_list[i].endf;
+
+ grig_debug_local (RIG_DEBUG_VERBOSE,
+ _("%s: Found frequency range for mode %d"),
+--- grig-0.8.1.orig/src/rig-data.h
++++ grig-0.8.1/src/rig-data.h
+@@ -190,7 +190,7 @@ typedef struct {
+
+ #define GRIG_LEVEL_RD (RIG_LEVEL_RFPOWER | RIG_LEVEL_AGC | RIG_LEVEL_SWR | RIG_LEVEL_ALC | \
+ RIG_LEVEL_STRENGTH | RIG_LEVEL_ATT | RIG_LEVEL_PREAMP | \
+- RIG_LEVEL_VOX | RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_SQL | \
++ RIG_LEVEL_VOXDELAY | RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_SQL | \
+ RIG_LEVEL_IF | RIG_LEVEL_APF | RIG_LEVEL_NR | RIG_LEVEL_PBT_IN | \
+ RIG_LEVEL_PBT_OUT | RIG_LEVEL_CWPITCH | \
+ RIG_LEVEL_MICGAIN | RIG_LEVEL_KEYSPD | RIG_LEVEL_NOTCHF | \
+@@ -198,7 +198,7 @@ typedef struct {
+ RIG_LEVEL_VOXGAIN | RIG_LEVEL_ANTIVOX)
+
+ #define GRIG_LEVEL_WR (RIG_LEVEL_RFPOWER | RIG_LEVEL_AGC | RIG_LEVEL_ATT | RIG_LEVEL_PREAMP | \
+- RIG_LEVEL_VOX | RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_SQL | \
++ RIG_LEVEL_VOXDELAY | RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_SQL | \
+ RIG_LEVEL_IF | RIG_LEVEL_APF | RIG_LEVEL_NR | RIG_LEVEL_PBT_IN | \
+ RIG_LEVEL_PBT_OUT | RIG_LEVEL_CWPITCH | \
+ RIG_LEVEL_MICGAIN | RIG_LEVEL_KEYSPD | RIG_LEVEL_NOTCHF | \
diff --git a/media-radio/grig/grig-0.8.1-r1.ebuild b/media-radio/grig/grig-0.8.1-r1.ebuild
new file mode 100644
index 000000000000..8a3e3a176bbe
--- /dev/null
+++ b/media-radio/grig/grig-0.8.1-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop
+
+DESCRIPTION="A tool for controlling amateur radios"
+HOMEPAGE="http://groundstation.sourceforge.net/grig/"
+SRC_URI="mirror://sourceforge/groundstation/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-libs/glib:2
+ x11-libs/gtk+:2
+ >=media-libs/hamlib-4:="
+RDEPEND="${DEPEND}"
+
+PATCHES=( "$FILESDIR"/grig-0.8.1-hamlib4.patch )
+
+src_configure() {
+ econf --enable-hardware
+}
+
+src_install() {
+ default
+ make_desktop_entry ${PN} "GRig" "/usr/share/pixmaps/grig/grig-logo.png" "HamRadio"
+ rm -rf "${D}/usr/share/grig" || die "cleanup docs failed"
+}