[packages/hamlib] - updated to 4.6.2, more usrp fixes
qboosh
qboosh at pld-linux.org
Sat Mar 29 22:14:23 CET 2025
commit 8e2c1b2532bc239a77746d5794a682cab7804636
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Mar 29 22:12:39 2025 +0100
- updated to 4.6.2, more usrp fixes
hamlib-usrp.patch | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
hamlib.spec | 49 ++++++++++++++++++++--------
2 files changed, 128 insertions(+), 16 deletions(-)
---
diff --git a/hamlib.spec b/hamlib.spec
index 12cbe2e..cdbf31c 100644
--- a/hamlib.spec
+++ b/hamlib.spec
@@ -12,13 +12,13 @@
Summary: Library to control radio transceivers and receivers
Summary(pl.UTF-8): Biblioteka do sterowania nadajnikami i odbiornikami radiowymi
Name: hamlib
-Version: 4.5.5
-Release: 5
+Version: 4.6.2
+Release: 1
License: LGPL v2.1+ (library), GPL v2+ (programs)
Group: Libraries
#Source0Download: https://github.com/Hamlib/Hamlib/releases
Source0: https://github.com/Hamlib/Hamlib/releases/download/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 9996f507ae570be50d09df1157f140e0
+# Source0-md5: 5cf7fa5fdc692050c7df8ea709f63f25
Patch0: %{name}-perl_install.patch
Patch1: %{name}-usrp.patch
URL: http://hamlib.org/
@@ -43,9 +43,9 @@ BuildRequires: pkgconfig
BuildRequires: readline-devel
BuildRequires: rpmbuild(macros) >= 2.043
BuildRequires: source-highlight
-%{?with_perl:BuildRequires: swig-perl >= 1.3.22}
-%{?with_python:BuildRequires: swig-python >= 1.3.22}
-%{?with_tcl:BuildRequires: swig-tcl >= 1.3.22}
+%{?with_perl:BuildRequires: swig-perl >= 3.0.12}
+%{?with_python:BuildRequires: swig-python >= 3.0.12}
+%{?with_tcl:BuildRequires: swig-tcl >= 3.0.12}
%{?with_tcl:BuildRequires: tcl-devel}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -253,6 +253,19 @@ cd build-python2
cd ..
%endif
+%if %{with static_libs}
+install -d build-static
+cd build-static
+%configure \
+ --disable-silent-rules \
+ --disable-shared \
+ %{?with_usrp:--enable-usrp} \
+ %{!?with_indi:--without-indi}
+
+%{__make}
+cd ..
+%endif
+
install -d build
cd build
%configure \
@@ -260,7 +273,7 @@ cd build
PYTHON=%{__python3} \
TCL_VERSION=%{tcl_version} \
--disable-silent-rules \
- %{!?with_static_libs:--disable-static} \
+ --disable-static \
%{?with_usrp:--enable-usrp} \
%{!?with_indi:--without-indi} \
%{?with_lua:--with-lua-binding} \
@@ -280,6 +293,11 @@ rm -rf $RPM_BUILD_ROOT
DESTDIR=$RPM_BUILD_ROOT
%endif
+%if %{with static_libs}
+%{__make} -C build-static install \
+ DESTDIR=$RPM_BUILD_ROOT
+%endif
+
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
@@ -287,8 +305,7 @@ rm -rf $RPM_BUILD_ROOT
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libhamlib*.la
%if %{with lua}
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/5.*/Hamliblua.la \
- %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/lua/5.*/Hamliblua.a}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/5.*/Hamliblua.la
%endif
%if %{with perl}
@@ -301,13 +318,11 @@ rm -rf $RPM_BUILD_ROOT
%endif
%if %{with python3}
-%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_Hamlib.la \
- %{?with_static_libs:$RPM_BUILD_ROOT%{py3_sitedir}/_Hamlib.a}
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_Hamlib.la
%endif
%if %{with tcl}
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/tcl*/Hamlib/hamlibtcl.la \
- %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/tcl*/Hamlib/hamlibtcl.a}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/tcl*/Hamlib/hamlibtcl.la
%endif
# packaged as %doc
@@ -330,10 +345,15 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/rigctl
%attr(755,root,root) %{_bindir}/rigctlcom
%attr(755,root,root) %{_bindir}/rigctld
+%attr(755,root,root) %{_bindir}/rigctlsync
+%attr(755,root,root) %{_bindir}/rigctltcp
+%attr(755,root,root) %{_bindir}/rigfreqwalk
%attr(755,root,root) %{_bindir}/rigmem
%attr(755,root,root) %{_bindir}/rigsmtr
%attr(755,root,root) %{_bindir}/rigswr
%attr(755,root,root) %{_bindir}/rigtestlibusb
+%attr(755,root,root) %{_bindir}/rigtestmcast
+%attr(755,root,root) %{_bindir}/rigtestmcastrx
%attr(755,root,root) %{_bindir}/rotctl
%attr(755,root,root) %{_bindir}/rotctld
%attr(755,root,root) %{_libdir}/libhamlib.so.*.*.*
@@ -343,6 +363,7 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/rigctl.1*
%{_mandir}/man1/rigctlcom.1*
%{_mandir}/man1/rigctld.1*
+%{_mandir}/man1/rigctlsync.1*
%{_mandir}/man1/rigmem.1*
%{_mandir}/man1/rigsmtr.1*
%{_mandir}/man1/rigswr.1*
@@ -359,7 +380,7 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/hamlib/ampclass.h
%{_includedir}/hamlib/amplifier.h
%{_includedir}/hamlib/amplist.h
-%{_includedir}/hamlib/config.h
+%{_includedir}/hamlib/multicast.h
%{_includedir}/hamlib/rig.h
%{_includedir}/hamlib/rig_dll.h
%{_includedir}/hamlib/riglist.h
diff --git a/hamlib-usrp.patch b/hamlib-usrp.patch
index 56dbfea..f7badab 100644
--- a/hamlib-usrp.patch
+++ b/hamlib-usrp.patch
@@ -1,5 +1,5 @@
---- hamlib-4.5.5/rigs/kit/usrp_impl.cc.orig 2018-08-20 17:30:25.000000000 +0200
-+++ hamlib-4.5.5/rigs/kit/usrp_impl.cc 2019-05-13 05:31:23.318062894 +0200
+--- hamlib-4.6.2/rigs/kit/usrp_impl.cc.orig 2025-03-29 19:21:53.168641530 +0100
++++ hamlib-4.6.2/rigs/kit/usrp_impl.cc 2025-03-29 19:28:39.819771845 +0100
@@ -32,7 +32,7 @@
#include <stdlib.h>
#include <stdio.h>
@@ -9,3 +9,94 @@
#include "usrp_impl.h"
#include "token.h"
+@@ -46,7 +46,7 @@ struct usrp_priv_data {
+ int usrp_init(RIG *rig)
+ {
+ // cppcheck-suppress leakReturnValNotUsed
+- STATE(rig)->priv = static_cast<struct usrp_priv_data*>malloc(sizeof(struct usrp_priv_data));
++ STATE(rig)->priv = static_cast<struct usrp_priv_data*>(malloc(sizeof(struct usrp_priv_data)));
+ if (!STATE(rig)->priv) {
+ /* whoops! memory shortage! */
+ return -RIG_ENOMEM;
+@@ -69,7 +69,7 @@ int usrp_cleanup(RIG *rig)
+
+ int usrp_open(RIG *rig)
+ {
+- struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>STATE(rig)->priv;
++ struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>(STATE(rig)->priv);
+
+ int which_board = 0;
+ int decim = 125;
+@@ -83,7 +83,7 @@ int usrp_open(RIG *rig)
+
+ int usrp_close(RIG *rig)
+ {
+- struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>STATE(rig)->priv;
++ struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>(STATE(rig)->priv);
+
+ if (!priv)
+ {
+@@ -101,7 +101,7 @@ int usrp_close(RIG *rig)
+ */
+ int usrp_set_conf(RIG *rig, hamlib_token_t token, const char *val)
+ {
+- struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>STATE(rig)->priv;
++ struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>(STATE(rig)->priv);
+
+ if (!priv)
+ {
+@@ -111,7 +111,7 @@ int usrp_set_conf(RIG *rig, hamlib_token
+
+ switch(token) {
+ case TOK_IFMIXFREQ:
+- sscanf(val, "%"SCNfreq, &priv->if_mix_freq);
++ sscanf(val, "%" SCNfreq, &priv->if_mix_freq);
+ break;
+ default:
+ return -RIG_EINVAL;
+@@ -126,7 +126,7 @@ int usrp_set_conf(RIG *rig, hamlib_token
+ */
+ int usrp_get_conf(RIG *rig, hamlib_token_t token, char *val)
+ {
+- const struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>STATE(rig)->priv;
++ const struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>(STATE(rig)->priv);
+
+ if (!priv)
+ {
+@@ -136,7 +136,7 @@ int usrp_get_conf(RIG *rig, hamlib_token
+
+ switch(token) {
+ case TOK_IFMIXFREQ:
+- sprintf(val, "%"PRIfreq, priv->if_mix_freq);
++ sprintf(val, "%" PRIfreq, priv->if_mix_freq);
+ break;
+ default:
+ return -RIG_EINVAL;
+@@ -148,7 +148,7 @@ int usrp_get_conf(RIG *rig, hamlib_token
+
+ int usrp_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
+ {
+- const struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>STATE(rig)->priv;
++ const struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>(STATE(rig)->priv);
+ int chan = 0;
+
+ if (!priv)
+@@ -166,7 +166,7 @@ int usrp_set_freq(RIG *rig, vfo_t vfo, f
+
+ int usrp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
+ {
+- const struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>STATE(rig)->priv;
++ const struct usrp_priv_data *priv = static_cast<struct usrp_priv_data*>(STATE(rig)->priv);
+ int chan = 0;
+
+ if (!priv)
+--- hamlib-4.6.2/rigs/kit/usrp.c.orig 2025-02-09 22:22:13.000000000 +0100
++++ hamlib-4.6.2/rigs/kit/usrp.c 2025-03-29 21:09:18.280392029 +0100
+@@ -22,6 +22,7 @@
+ /*
+ * Compile only this model if usrp is available
+ */
++#include "hamlib/config.h"
+ #if defined(HAVE_USRP)
+
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/hamlib.git/commitdiff/8e2c1b2532bc239a77746d5794a682cab7804636
More information about the pld-cvs-commit
mailing list