summaryrefslogtreecommitdiff
path: root/media-libs/hamlib
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-11-17 12:56:42 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-11-17 12:56:42 +0000
commit34fb4543abc1dae6f74171ad8dc80fa64636a941 (patch)
tree5923cd4dc2a560dba9b618db67713ae10cf92f75 /media-libs/hamlib
parent1536d928ae095e00db8775fecca580c10adc0af8 (diff)
gentoo auto-resync : 17:11:2022 - 12:56:42
Diffstat (limited to 'media-libs/hamlib')
-rw-r--r--media-libs/hamlib/Manifest5
-rw-r--r--media-libs/hamlib/files/hamlib-4.4-fix-clang-warnings.patch191
-rw-r--r--media-libs/hamlib/hamlib-4.3.1.ebuild97
-rw-r--r--media-libs/hamlib/hamlib-4.4.ebuild1
4 files changed, 194 insertions, 100 deletions
diff --git a/media-libs/hamlib/Manifest b/media-libs/hamlib/Manifest
index 95012fd4b9b8..77ee15a3a510 100644
--- a/media-libs/hamlib/Manifest
+++ b/media-libs/hamlib/Manifest
@@ -1,6 +1,5 @@
+AUX hamlib-4.4-fix-clang-warnings.patch 6673 BLAKE2B 26b0bbbc2c9bb89fe2707b0bbc7ff81c33104670f5bc157fe7063b5150786963fcd379fca620c7a457682f6b1d8bc9a13729ab442ce771500763cf91127a68db SHA512 1cfbff642826281d42226a5c4364b438602dc2022baf7b6bd7cc41d4cb1a0defec511a9c20d06cdf5aca6549e00ec11639899326ac03d4a6604a7440d813f7e9
AUX hamlib-4.4-slibtool.patch 2414 BLAKE2B 798b95d72e57d1b68a1d26c36f631b084722a32ae3c20238f7cb2495412e200ee7e909d2e614ad27db7016654a6e662834b8c95f86dbec609754fe817a49a1b8 SHA512 743a5be7160e80453810873ea074fd62934524fcf7fc9b8e224c93a2876760c96793ebb13e6e40c32b648065b034a2355935862d540c6620babaeacb7fc2f88c
-DIST hamlib-4.3.1.tar.gz 2356944 BLAKE2B c803d253c867303cbde98b6f2e10f610aac111b7bd81fd343e1396cb86384b1c26942e5ccb8e395e073f9aa3d48e6f9edc1b64da14b2ec5ca09f98fbd3dee667 SHA512 8dee4676a19de7ac1ef733a4285b76e918f11aad6594d0557d36df295faf04c615e0993edb2f9ed5e7aea718c184603fec831caf28b75026c705f0b2e4b9eca7
DIST hamlib-4.4.tar.gz 2401399 BLAKE2B 4256b5b4374c62ef4fb957d29deda95aa9d15a8b52b81c5db1c07f3ebbf4c8e48c6c082769cef82c8457b3f813ac00ef7a37136615747f2c93e5275a112891e7 SHA512 37366ba180031de34da447c3d4e0086f156b893f57b5ab9bbc38b8e1f4bf9310fa1a9eb2a6d7884f1f11900dbdb811b4071e023aba571ea0ac5d07ddb122bf7b
-EBUILD hamlib-4.3.1.ebuild 2130 BLAKE2B a84beb5f391f6114ac71438a3d4a5f07e48759d63ec9de84533c3fcd47930ca1e2c245ce8c303bb7b18ba3cc664dfe9b40fc333510c877480fb90b49e22c6769 SHA512 f8bfd63869e2efcdc6fec97a66c63427d8e8338eab3fe5bfe45224fb2c9741cfd313dee20642ccca50b86a52dbbd3aba51025c3b68f7fbe854b5fc995797cc7c
-EBUILD hamlib-4.4.ebuild 2202 BLAKE2B 89d6c0167fad4c364306ae47bdd6771f113a8ea5347479eed2a8a961ade22cf54f2a45964c8f251117d1a2bc39c7bdb46a3a2dc78c433e69fd419ed529c8fb1f SHA512 67a69077113be053ebf53a8047cb4ba7838185b9e9f027e0162cb3bb87e6928ba951002ed435d5c11bc00ed20c7a179ee60f1d6bd820410e57e04d0adf672eef
+EBUILD hamlib-4.4.ebuild 2256 BLAKE2B 481a0b54d4c94bd232ebaaf099ff38a57052705363fc416b9b6d90581c65eb96e8690ac2f68bda6429ccc35936a9ec6c7a4f5b6dad3497c8b0a838399df04c5d SHA512 4ef6ccc5b5e9d289d29be6c89e641005b99c062391532ecce3708879d2c29868fe86645824a65de8fca16ed1e9c063291a2083d99d0b8468c90c95d7961fc274
MISC metadata.xml 326 BLAKE2B ea402b17f863a6a0370743d2756c6c3c15a8d7bdfd0777db2cec56cc41dd93198ad36ff114f3c9bc265ea54228d87856f3edd35f9696ac5c89136fce4c5acf87 SHA512 84642d6397e97ea348a12d44a01015a51af72b40af5456416ac3477e55da9ef5ab1934f66b2fac0762c4b0483e20e92c3a49f334bf136de16b01043a15073f7f
diff --git a/media-libs/hamlib/files/hamlib-4.4-fix-clang-warnings.patch b/media-libs/hamlib/files/hamlib-4.4-fix-clang-warnings.patch
new file mode 100644
index 000000000000..832af50e0e6c
--- /dev/null
+++ b/media-libs/hamlib/files/hamlib-4.4-fix-clang-warnings.patch
@@ -0,0 +1,191 @@
+From 1aebee2da9d29ff1d1a16e19f23bbff4e0f319a8 Mon Sep 17 00:00:00 2001
+From: Mike Black W9MDB <mdblack98@yahoo.com>
+Date: Mon, 14 Nov 2022 16:37:20 -0600
+Subject: [PATCH 1/2] Fix clang warning on callback functions
+ https://github.com/Hamlib/Hamlib/issues/1149
+
+---
+ include/hamlib/rig.h | 4 +++-
+ rigs/aor/aor.c | 4 ++--
+ src/mem.c | 15 ++++++++-------
+ tests/testcaps.sh | 12 ++++++++++++
+ 4 files changed, 25 insertions(+), 10 deletions(-)
+ create mode 100755 tests/testcaps.sh
+
+diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h
+index 574c21bd..5dbb5a7b 100644
+--- a/include/hamlib/rig.h
++++ b/include/hamlib/rig.h
+@@ -1675,7 +1675,7 @@ typedef struct cal_table_float cal_table_float_t;
+ //! @cond Doxygen_Suppress
+ #define EMPTY_FLOAT_CAL { 0, { { 0, 0f }, } }
+
+-typedef int (* chan_cb_t)(RIG *, channel_t **, int, const chan_t *, rig_ptr_t);
++typedef int (* chan_cb_t)(RIG *, vfo_t vfo, channel_t **, int, const chan_t *, rig_ptr_t);
+ typedef int (* confval_cb_t)(RIG *,
+ const struct confparams *,
+ value_t *,
+@@ -2024,10 +2024,12 @@ struct rig_caps {
+ int (*get_chan_all_cb)(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t);
+
+ int (*set_mem_all_cb)(RIG *rig,
++ vfo_t vfo,
+ chan_cb_t chan_cb,
+ confval_cb_t parm_cb,
+ rig_ptr_t);
+ int (*get_mem_all_cb)(RIG *rig,
++ vfo_t vfo,
+ chan_cb_t chan_cb,
+ confval_cb_t parm_cb,
+ rig_ptr_t);
+diff --git a/rigs/aor/aor.c b/rigs/aor/aor.c
+index ad4331d9..3f69d723 100644
+--- a/rigs/aor/aor.c
++++ b/rigs/aor/aor.c
+@@ -1364,7 +1364,7 @@ int aor_get_chan_all_cb(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t arg)
+ * future data for channel channel_num
+ */
+ chan = NULL;
+- retval = chan_cb(rig, &chan, chan_next, chan_list, arg);
++ retval = chan_cb(rig, vfo, &chan, chan_next, chan_list, arg);
+
+ if (retval != RIG_OK)
+ {
+@@ -1414,7 +1414,7 @@ int aor_get_chan_all_cb(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t arg)
+ * provide application with channel data,
+ * and ask for a new channel structure
+ */
+- chan_cb(rig, &chan, chan_next, chan_list, arg);
++ chan_cb(rig, vfo, &chan, chan_next, chan_list, arg);
+
+ if (j >= LINES_PER_MA - 1)
+ {
+diff --git a/src/mem.c b/src/mem.c
+index 8aa51e57..a6d72e59 100644
+--- a/src/mem.c
++++ b/src/mem.c
+@@ -954,7 +954,7 @@ int get_chan_all_cb_generic(RIG *rig, vfo_t vfo, chan_cb_t chan_cb,
+ * future data for channel channel_num
+ */
+ chan = NULL;
+- retval = chan_cb(rig, &chan, chan_list[i].startc, chan_list, arg);
++ retval = chan_cb(rig, vfo, &chan, chan_list[i].startc, chan_list, arg);
+
+ if (retval != RIG_OK)
+ {
+@@ -995,7 +995,7 @@ int get_chan_all_cb_generic(RIG *rig, vfo_t vfo, chan_cb_t chan_cb,
+
+ chan_next = j < chan_list[i].endc ? j + 1 : j;
+
+- chan_cb(rig, &chan, chan_next, chan_list, arg);
++ chan_cb(rig, vfo, &chan, chan_next, chan_list, arg);
+ }
+ }
+
+@@ -1016,7 +1016,7 @@ int set_chan_all_cb_generic(RIG *rig, vfo_t vfo, chan_cb_t chan_cb,
+ for (j = chan_list[i].startc; j <= chan_list[i].endc; j++)
+ {
+
+- chan_cb(rig, &chan, j, chan_list, arg);
++ chan_cb(rig, vfo, &chan, j, chan_list, arg);
+ chan->vfo = RIG_VFO_MEM;
+
+ retval = rig_set_channel(rig, vfo, chan);
+@@ -1044,6 +1044,7 @@ struct map_all_s
+ * chan_cb_t to be used for non cb get/set_all
+ */
+ static int map_chan(RIG *rig,
++ vfo_t vfo,
+ channel_t **chan,
+ int channel_num,
+ const chan_t *chan_list,
+@@ -1343,7 +1344,7 @@ int HAMLIB_API rig_set_mem_all_cb(RIG *rig,
+
+ if (rc->set_mem_all_cb)
+ {
+- return rc->set_mem_all_cb(rig, chan_cb, parm_cb, arg);
++ return rc->set_mem_all_cb(rig, vfo, chan_cb, parm_cb, arg);
+ }
+
+
+@@ -1411,7 +1412,7 @@ int HAMLIB_API rig_get_mem_all_cb(RIG *rig,
+
+ if (rc->get_mem_all_cb)
+ {
+- return rc->get_mem_all_cb(rig, chan_cb, parm_cb, arg);
++ return rc->get_mem_all_cb(rig, vfo, chan_cb, parm_cb, arg);
+ }
+
+ /* if not available, emulate it */
+@@ -1480,7 +1481,7 @@ int HAMLIB_API rig_set_mem_all(RIG *rig,
+ mem_all_arg.vals = (value_t *) vals;
+
+ if (rc->set_mem_all_cb)
+- return rc->set_mem_all_cb(rig, map_chan, map_parm,
++ return rc->set_mem_all_cb(rig, vfo, map_chan, map_parm,
+ (rig_ptr_t)&mem_all_arg);
+
+ /* if not available, emulate it */
+@@ -1548,7 +1549,7 @@ int HAMLIB_API rig_get_mem_all(RIG *rig,
+ mem_all_arg.vals = vals;
+
+ if (rc->get_mem_all_cb)
+- return rc->get_mem_all_cb(rig, map_chan, map_parm,
++ return rc->get_mem_all_cb(rig, vfo, map_chan, map_parm,
+ (rig_ptr_t)&mem_all_arg);
+
+ /*
+diff --git a/tests/testcaps.sh b/tests/testcaps.sh
+new file mode 100755
+index 00000000..7032a2ce
+--- /dev/null
++++ b/tests/testcaps.sh
+@@ -0,0 +1,12 @@
++#!/bin/sh
++model=1
++riglist=`rigctl -l | cut -c1-8 | grep -v Rig | tr -d '\n'`
++for model in $riglist
++do
++ result=`rigctl -m $model -u 2>/dev/null | grep warnings`
++# if [[ "$result" == *"warnings: 0"* ]];then
++ echo $model " " $result
++# fi
++
++ model=`expr $model + 1`
++done
+--
+2.37.4
+
+
+From d7edd89a12be134a904d0a3d5fc3e4f68f111c16 Mon Sep 17 00:00:00 2001
+From: Mike Black W9MDB <mdblack98@yahoo.com>
+Date: Mon, 14 Nov 2022 17:55:25 -0600
+Subject: [PATCH 2/2] Fix memcsv.c https://github.com/Hamlib/Hamlib/issues/1149
+
+---
+ tests/memcsv.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/memcsv.c b/tests/memcsv.c
+index 8a107549..82becbf4 100644
+--- a/tests/memcsv.c
++++ b/tests/memcsv.c
+@@ -48,6 +48,7 @@ char csv_sep = ','; /* CSV separator */
+ * Prototypes
+ */
+ static int dump_csv_chan(RIG *rig,
++ vfo_t vfo,
+ channel_t **chan,
+ int channel_num,
+ const chan_t *chan_list,
+@@ -552,6 +553,7 @@ void dump_csv_name(const channel_cap_t *mem_caps, FILE *f)
+
+ /* Caution! Keep the function consistent with dump_csv_name and set_channel_data! */
+ int dump_csv_chan(RIG *rig,
++ vfo_t vfo,
+ channel_t **chan_pp,
+ int channel_num,
+ const chan_t *chan_list,
+--
+2.37.4
+
diff --git a/media-libs/hamlib/hamlib-4.3.1.ebuild b/media-libs/hamlib/hamlib-4.3.1.ebuild
deleted file mode 100644
index 905bf3bb1fd3..000000000000
--- a/media-libs/hamlib/hamlib-4.3.1.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{7..10} )
-MY_P=${P/_rc2/~rc2}
-
-inherit autotools python-single-r1
-
-DESCRIPTION="Ham radio backend rig control libraries"
-HOMEPAGE="http://www.hamlib.org"
-SRC_URI="mirror://sourceforge/hamlib/${MY_P}.tar.gz"
-
-LICENSE="LGPL-2 GPL-2"
-SLOT="0/4.2"
-KEYWORDS="amd64 x86"
-IUSE="doc perl python tcl"
-
-RESTRICT="test"
-
-RDEPEND="
- =virtual/libusb-0*
- dev-libs/libxml2
- sys-libs/readline:0=
- perl? ( dev-lang/perl )
- python? ( ${PYTHON_DEPS} )
- tcl? ( dev-lang/tcl:0= )"
-
-DEPEND=" ${RDEPEND}
- virtual/pkgconfig
- dev-lang/swig
- >=sys-devel/libtool-2.2
- doc? ( app-doc/doxygen
- dev-util/source-highlight )"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-DOCS=(AUTHORS NEWS PLAN README README.betatester README.developer)
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # fix hardcoded libdir paths
- sed -i -e "s#fix}/lib#fix}/$(get_libdir)/hamlib#" \
- -e "s#fix}/include#fix}/include/hamlib#" \
- hamlib.pc.in || die "sed failed"
-
- # Correct install target to whatever INSTALLDIRS says and use vendor
- # installdirs everywhere (bug #611550)
- sed -i -e "s#install_site#install#" \
- -e 's#MAKEFILE="Hamlib-pl.mk"#MAKEFILE="Hamlib-pl.mk" INSTALLDIRS=vendor#' \
- bindings/Makefile.am || die "sed failed patching for perl"
-
- # make building of documentation compatible with autotools-utils
- sed -i -e "s/doc:/html:/g" doc/Makefile.am || die "sed failed"
-
- eautoreconf
-
- eapply_user
-}
-
-src_configure() {
- econf \
- --libdir=/usr/$(get_libdir)/hamlib \
- --disable-static \
- --with-xml-support \
- $(use_with perl perl-binding) \
- $(use_with python python-binding) \
- $(use_with tcl tcl-binding)
-}
-
-src_compile() {
- emake
- use doc && emake html
-}
-
-src_install() {
- emake DESTDIR="${D}" install
-
- use python && python_optimize
-
- use doc && HTML_DOCS=( doc/html/ )
- einstalldocs
-
- insinto /usr/$(get_libdir)/pkgconfig
- doins hamlib.pc
-
- echo "LDPATH=/usr/$(get_libdir)/hamlib" > "${T}"/73hamlib
- doenvd "${T}"/73hamlib
-
- find "${ED}" -name '*.la' -delete || die
-}
diff --git a/media-libs/hamlib/hamlib-4.4.ebuild b/media-libs/hamlib/hamlib-4.4.ebuild
index 7a49e5967232..e6b249beabfe 100644
--- a/media-libs/hamlib/hamlib-4.4.ebuild
+++ b/media-libs/hamlib/hamlib-4.4.ebuild
@@ -40,6 +40,7 @@ DOCS=(AUTHORS NEWS PLAN README README.betatester README.developer)
PATCHES=(
"${FILESDIR}/${P}-slibtool.patch" # 798273
+ "${FILESDIR}/${P}-fix-clang-warnings.patch" # 880961
)
S="${WORKDIR}/${MY_P}"