gnu: Add tlf.
* gnu/packages/patches/tlf-support-hamlib-4.2+.patch: New file. * gnu/local.mk: Add it. * gnu/packages/radio.scm (tlf): New variable. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
This commit is contained in:
		
							parent
							
								
									a7495b04b5
								
							
						
					
					
						commit
						30a04c00be
					
				
					 3 changed files with 129 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1753,6 +1753,7 @@ dist_patch_DATA =						\
 | 
			
		|||
  %D%/packages/patches/tipp10-qt5.patch			\
 | 
			
		||||
  %D%/packages/patches/tk-find-library.patch			\
 | 
			
		||||
  %D%/packages/patches/tla2tools-build-xml.patch		\
 | 
			
		||||
  %D%/packages/patches/tlf-support-hamlib-4.2+.patch		\
 | 
			
		||||
  %D%/packages/patches/tor-fix-build-with-gcc-7.patch		\
 | 
			
		||||
  %D%/packages/patches/transcode-ffmpeg.patch	\
 | 
			
		||||
  %D%/packages/patches/transmission-honor-localedir.patch	\
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										66
									
								
								gnu/packages/patches/tlf-support-hamlib-4.2+.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								gnu/packages/patches/tlf-support-hamlib-4.2+.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,66 @@
 | 
			
		|||
From 295fa956f899af37acb6bda9c76ad77748eb9a4a Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Ervin Hegedus <airween@gmail.com>
 | 
			
		||||
Date: Sat, 5 Jun 2021 09:23:06 +0200
 | 
			
		||||
Subject: [PATCH] Quick fix for changing of Hamlib's FILPATHLEN macro
 | 
			
		||||
 | 
			
		||||
This patch was prepared for Guix by Jack Hill <jackhill@jackhill.us> by
 | 
			
		||||
squashing together the changes from upstream #268
 | 
			
		||||
<https://github.com/Tlf/tlf/pull/268>.
 | 
			
		||||
 | 
			
		||||
It allows the released version of Tlf to build against the version 4.2 of
 | 
			
		||||
hamlib in Guix.
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 src/sendqrg.c |  6 +++---
 | 
			
		||||
 src/sendqrg.h | 10 ++++++++++
 | 
			
		||||
 2 files changed, 13 insertions(+), 3 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/src/sendqrg.c b/src/sendqrg.c
 | 
			
		||||
index ceeb356..5d4420e 100644
 | 
			
		||||
--- a/src/sendqrg.c
 | 
			
		||||
+++ b/src/sendqrg.c
 | 
			
		||||
@@ -87,7 +87,7 @@ int init_tlf_rig(void) {
 | 
			
		||||
 
 | 
			
		||||
     rigportname[strlen(rigportname) - 1] = '\0';	// remove '\n'
 | 
			
		||||
     strncpy(my_rig->state.rigport.pathname, rigportname,
 | 
			
		||||
-	    FILPATHLEN - 1);
 | 
			
		||||
+	    TLFFILPATHLEN - 1);
 | 
			
		||||
 
 | 
			
		||||
     caps = my_rig->caps;
 | 
			
		||||
 
 | 
			
		||||
@@ -104,9 +104,9 @@ int init_tlf_rig(void) {
 | 
			
		||||
     if (dcd_type != RIG_DCD_NONE)
 | 
			
		||||
 	my_rig->state.dcdport.type.dcd = dcd_type;
 | 
			
		||||
     if (ptt_file)
 | 
			
		||||
-	strncpy(my_rig->state.pttport.pathname, ptt_file, FILPATHLEN);
 | 
			
		||||
+	strncpy(my_rig->state.pttport.pathname, ptt_file, TLFFILPATHLEN);
 | 
			
		||||
     if (dcd_file)
 | 
			
		||||
-	strncpy(my_rig->state.dcdport.pathname, dcd_file, FILPATHLEN);
 | 
			
		||||
+	strncpy(my_rig->state.dcdport.pathname, dcd_file, TLFFILPATHLEN);
 | 
			
		||||
 
 | 
			
		||||
     my_rig->state.rigport.parm.serial.rate = serial_rate;
 | 
			
		||||
 
 | 
			
		||||
diff --git a/src/sendqrg.h b/src/sendqrg.h
 | 
			
		||||
index 8c53f2e..1ef85a6 100644
 | 
			
		||||
--- a/src/sendqrg.h
 | 
			
		||||
+++ b/src/sendqrg.h
 | 
			
		||||
@@ -23,6 +23,16 @@
 | 
			
		||||
 
 | 
			
		||||
 #include <hamlib/rig.h>
 | 
			
		||||
 
 | 
			
		||||
+#ifdef HAMLIB_FILPATHLEN
 | 
			
		||||
+  #define TLFFILPATHLEN HAMLIB_FILPATHLEN
 | 
			
		||||
+#else
 | 
			
		||||
+  #ifdef FILPATHLEN
 | 
			
		||||
+  #define TLFFILPATHLEN FILPATHLEN
 | 
			
		||||
+  #else
 | 
			
		||||
+  #error "(HAMLIB_)FILPATHLEN macro not found"
 | 
			
		||||
+  #endif
 | 
			
		||||
+#endif
 | 
			
		||||
+
 | 
			
		||||
 int init_tlf_rig(void);
 | 
			
		||||
 void close_tlf_rig(RIG *my_rig);
 | 
			
		||||
 
 | 
			
		||||
-- 
 | 
			
		||||
2.32.0
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -7,6 +7,7 @@
 | 
			
		|||
;;; Copyright © 2020 Charlie Ritter <chewzerita@posteo.net>
 | 
			
		||||
;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
 | 
			
		||||
;;; Copyright © 2021 João Pedro Simas <jpsimas@gmail.com>
 | 
			
		||||
;;; Copyright © 2021 Jack Hill <jackhill@jackhill.us>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
| 
						 | 
				
			
			@ -29,6 +30,7 @@
 | 
			
		|||
  #:use-module (guix download)
 | 
			
		||||
  #:use-module (guix git-download)
 | 
			
		||||
  #:use-module (guix utils)
 | 
			
		||||
  #:use-module (gnu packages)
 | 
			
		||||
  #:use-module (gnu packages admin)
 | 
			
		||||
  #:use-module (gnu packages algebra)
 | 
			
		||||
  #:use-module (gnu packages astronomy)
 | 
			
		||||
| 
						 | 
				
			
			@ -68,6 +70,7 @@
 | 
			
		|||
  #:use-module (gnu packages multiprecision)
 | 
			
		||||
  #:use-module (gnu packages ncurses)
 | 
			
		||||
  #:use-module (gnu packages networking)
 | 
			
		||||
  #:use-module (gnu packages perl)
 | 
			
		||||
  #:use-module (gnu packages pkg-config)
 | 
			
		||||
  #:use-module (gnu packages pulseaudio)
 | 
			
		||||
  #:use-module (gnu packages python)
 | 
			
		||||
| 
						 | 
				
			
			@ -1065,6 +1068,65 @@ users.")
 | 
			
		|||
                           "--with-tcl-binding"
 | 
			
		||||
                           "--with-xml-support")))))
 | 
			
		||||
 | 
			
		||||
(define-public tlf
 | 
			
		||||
  (package
 | 
			
		||||
    (name "tlf")
 | 
			
		||||
    (version "1.4.1")
 | 
			
		||||
    (source
 | 
			
		||||
     (origin
 | 
			
		||||
       (method git-fetch)
 | 
			
		||||
       (uri (git-reference
 | 
			
		||||
             (url "https://github.com/tlf/tlf")
 | 
			
		||||
             (commit (string-append "tlf-" version))))
 | 
			
		||||
       (file-name (git-file-name name version))
 | 
			
		||||
       (sha256
 | 
			
		||||
        (base32 "1xpgs4k27pjd9mianfknknp6mf34365bcp96wrv5xh4dhph573rj"))
 | 
			
		||||
       (patches
 | 
			
		||||
        (search-patches "tlf-support-hamlib-4.2+.patch"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (arguments
 | 
			
		||||
     '(#:configure-flags
 | 
			
		||||
       (list "--enable-fldigi-xmlrpc")))
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     `(("autoconf" ,autoconf)
 | 
			
		||||
       ("automake" ,automake)
 | 
			
		||||
       ("perl" ,perl)
 | 
			
		||||
       ("pkg-config" ,pkg-config)))
 | 
			
		||||
    (inputs
 | 
			
		||||
     `(("cmocka" ,cmocka)
 | 
			
		||||
       ("glib" ,glib)
 | 
			
		||||
       ("hamlib" ,hamlib)
 | 
			
		||||
       ("libusb" ,libusb) ;`Requires.private: libusb-1.0` in hamlib pkg-config
 | 
			
		||||
       ("ncurses" ,ncurses)
 | 
			
		||||
       ("xmlrpc-c" ,xmlrpc-c)))
 | 
			
		||||
    (home-page "https://tlf.github.io/")
 | 
			
		||||
    (synopsis "Amateur radio contest logging for the terminal")
 | 
			
		||||
    (description "TLF is a @acronym{Text User Interface, TUI} amateur radio
 | 
			
		||||
contest logging program.  It integrates with radios supported by hamlib and
 | 
			
		||||
other ham radio programs like fldigi.  Many contests are supported including:
 | 
			
		||||
 | 
			
		||||
@itemize
 | 
			
		||||
@item CQWW (SO, M/S and M/M)
 | 
			
		||||
@item WPX (SO, M/S and M/M)
 | 
			
		||||
@item ARRL Sweepstakes (SO, M/S )
 | 
			
		||||
@item EU SPRINT
 | 
			
		||||
@item EUHFC
 | 
			
		||||
@item ARRL-DX (both sides)
 | 
			
		||||
@item ARRL-FD
 | 
			
		||||
@item ARRL 10m
 | 
			
		||||
@item ARRL 160m
 | 
			
		||||
@item Region1 field day
 | 
			
		||||
@item SP DX contest
 | 
			
		||||
@item PACC (both sides)
 | 
			
		||||
@item NRAU - scandinavian
 | 
			
		||||
@item Wysiwyg mults mode (per band or per contest)
 | 
			
		||||
@item WAEDX
 | 
			
		||||
@end itemize
 | 
			
		||||
 | 
			
		||||
It also supports connecting to DX clusters, log synchronization with other TLF
 | 
			
		||||
instances over the network, and general QSO and DXpedition logging.")
 | 
			
		||||
    (license license:gpl2+)))
 | 
			
		||||
 | 
			
		||||
(define-public wsjtx
 | 
			
		||||
  (package
 | 
			
		||||
    (name "wsjtx")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue