git: 3575e3dddb95 - main - comms/sdr++: Add Airspy HF+ support

From: Dmitri Goutnik <dmgk_at_FreeBSD.org>
Date: Thu, 23 Jun 2022 22:48:09 UTC
The branch main has been updated by dmgk:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3575e3dddb95bbab51f45ec2e9201f0ac7501023

commit 3575e3dddb95bbab51f45ec2e9201f0ac7501023
Author:     Dmitri Goutnik <dmgk@FreeBSD.org>
AuthorDate: 2022-06-23 22:44:12 +0000
Commit:     Dmitri Goutnik <dmgk@FreeBSD.org>
CommitDate: 2022-06-23 22:47:51 +0000

    comms/sdr++: Add Airspy HF+ support
    
    Approved by:    yuri (maintainer)
---
 comms/sdr++/Makefile                   |  5 ++++-
 comms/sdr++/files/patch-CMakeLists.txt | 15 ++++++++++-----
 comms/sdr++/pkg-message                |  8 ++++++++
 comms/sdr++/pkg-plist                  |  2 +-
 4 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/comms/sdr++/Makefile b/comms/sdr++/Makefile
index 5e30e8c278a1..70037a94159c 100644
--- a/comms/sdr++/Makefile
+++ b/comms/sdr++/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	sdr++
 DISTVERSION=	1.0.4
+PORTREVISION=	1
 CATEGORIES=	comms hamradio
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -10,6 +11,7 @@ LICENSE_FILE=	${WRKSRC}/license
 
 LIB_DEPENDS=	libad9361.so:misc/libad9361-iio \
 		libairspy.so:comms/airspy \
+		libairspyhf.so:comms/airspyhf \
 		libfftw3f.so:math/fftw3-float \
 		libglfw.so:graphics/glfw \
 		libhackrf.so:comms/hackrf \
@@ -27,6 +29,7 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	AlexandreRouma
 GH_PROJECT=	SDRPlusPlus
 
-CMAKE_OFF=	OPT_BUILD_AIRSPYHF_SOURCE # dependency isn't ported yet
+# Broken with clang 14
+CMAKE_OFF=	OPT_BUILD_DISCORD_PRESENCE
 
 .include <bsd.port.mk>
diff --git a/comms/sdr++/files/patch-CMakeLists.txt b/comms/sdr++/files/patch-CMakeLists.txt
index 479c84390851..d7694bd817f6 100644
--- a/comms/sdr++/files/patch-CMakeLists.txt
+++ b/comms/sdr++/files/patch-CMakeLists.txt
@@ -1,17 +1,22 @@
---- CMakeLists.txt.orig	2022-06-23 16:25:30 UTC
+--- CMakeLists.txt.orig	2021-10-17 22:38:02 UTC
 +++ CMakeLists.txt
-@@ -3,8 +3,8 @@ project(sdrpp)
+@@ -1,11 +1,11 @@ project(sdrpp)
+ cmake_minimum_required(VERSION 3.13)
+ project(sdrpp)
  
- if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+-if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
++#if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
      set(CMAKE_INSTALL_PREFIX "/usr/local")
 -else()
 -    set(CMAKE_INSTALL_PREFIX "/usr")
+-endif()
 +#else()
 +#    set(CMAKE_INSTALL_PREFIX "/usr")
- endif()
++#endif()
  
  # Compatibility Options
-@@ -206,8 +206,8 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/icons D
+ option(OPT_OVERRIDE_STD_FILESYSTEM "Use a local version of std::filesystem on systems that don't have it yet" OFF)
+@@ -206,8 +206,8 @@ configure_file(${CMAKE_SOURCE_DIR}/sdrpp.desktop ${CMA
  install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/themes DESTINATION share/sdrpp)
  configure_file(${CMAKE_SOURCE_DIR}/sdrpp.desktop ${CMAKE_CURRENT_BINARY_DIR}/sdrpp.desktop @ONLY)
  
diff --git a/comms/sdr++/pkg-message b/comms/sdr++/pkg-message
new file mode 100644
index 000000000000..3e90c198aefc
--- /dev/null
+++ b/comms/sdr++/pkg-message
@@ -0,0 +1,8 @@
+[
+{ type: install
+  message: <<EOM
+This port requires audio/rtaudio built with PULSEAUDIO option.
+audio/rtaudio currently doesn't work with PCM devices directly.
+EOM
+}
+]
diff --git a/comms/sdr++/pkg-plist b/comms/sdr++/pkg-plist
index 92f3c356cb11..282d33da157e 100644
--- a/comms/sdr++/pkg-plist
+++ b/comms/sdr++/pkg-plist
@@ -5,8 +5,8 @@ lib/libcorrect.a
 lib/libcorrect.so
 lib/libsdrpp_core.so
 lib/sdrpp/plugins/airspy_source.so
+lib/sdrpp/plugins/airspyhf_source.so
 lib/sdrpp/plugins/audio_sink.so
-lib/sdrpp/plugins/discord_integration.so
 lib/sdrpp/plugins/file_source.so
 lib/sdrpp/plugins/frequency_manager.so
 lib/sdrpp/plugins/hackrf_source.so