git: e5b6e9e6504f - main - comms/wsjtz: Fix build under FreeBSD-current

From: Diane Bruce <db_at_FreeBSD.org>
Date: Mon, 29 Apr 2024 16:52:07 UTC
The branch main has been updated by db:

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

commit e5b6e9e6504f98d8f69612eb413f93a99d68241e
Author:     Diane Bruce <db@FreeBSD.org>
AuthorDate: 2024-04-29 16:48:55 +0000
Commit:     Diane Bruce <db@FreeBSD.org>
CommitDate: 2024-04-29 16:48:55 +0000

    comms/wsjtz: Fix build under FreeBSD-current
    
    - Changes in compile marked variable length array as error
    - Cleaned up Makefile removing some bogus dependences
---
 comms/wsjtz/Makefile                               | 37 ++++++++++------------
 comms/wsjtz/files/patch-CMakeLists.txt             | 19 ++++++++---
 ...Usb.cmake => patch-CMake_Modules_FindUsb.cmake} |  6 ++--
 comms/wsjtz/files/patch-Radio.cpp                  |  6 ++--
 4 files changed, 36 insertions(+), 32 deletions(-)

diff --git a/comms/wsjtz/Makefile b/comms/wsjtz/Makefile
index 7efc1e3be351..5c1f815a6ca8 100644
--- a/comms/wsjtz/Makefile
+++ b/comms/wsjtz/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	wsjtz
 DISTVERSION=	2.5.4-1.22
-PORTREVISION=	7
+PORTREVISION=	8
 CATEGORIES=	comms hamradio
 MASTER_SITES=	SF/wsjt-z/Source
 
@@ -8,30 +8,25 @@ MAINTAINER=	hamradio@FreeBSD.org
 COMMENT=	Clone of WSJT-X software with additional features
 WWW=		https://sourceforge.net/projects/wsjt-z/
 
-CONFLICTS=	wsjtx
-
 LICENSE=	GPLv3
 
-BUILD_DEPENDS=	asciidoctor:textproc/rubygem-asciidoctor \
-		autoconf>=2.69:devel/autoconf \
-		automake>=1.16.1:devel/automake \
-		a2x:textproc/asciidoc \
-		boost-libs>0:devel/boost-libs \
-		libtool:devel/libtool \
-		${LOCALBASE}/share/xsl/docbook:textproc/docbook-xsl
-LIB_DEPENDS=	libfftw3.so:math/fftw3 \
+LIB_DEPENDS=	libboost_log_setup.so:devel/boost-libs \
+		libfftw3.so:math/fftw3 \
 		libfftw3f.so:math/fftw3-float \
-		libxslt.so:textproc/libxslt \
 		libhamlib.so:comms/hamlib \
-		libreadline.so:devel/readline \
-		libportaudio.so:audio/portaudio
-
-USES=		cmake compiler:c++11-lib fortran gl \
-		makeinfo pkgconfig qt:5 zip
-USE_GL=		glu
-USE_QT=		core gui network widgets \
-		multimedia concurrent printsupport serialport sql sql-sqlite3 \
-		testlib buildtools:build linguisttools:build qmake:build
+		libreadline.so:devel/readline
+BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook:textproc/docbook-xsl \
+		a2x:textproc/asciidoc \
+		asciidoctor:textproc/rubygem-asciidoctor \
+		boost-libs>0:devel/boost-libs \
+		libtool:devel/libtool
+
+USES=		cmake compiler:c++14-lang fortran makeinfo pkgconfig qt:5 zip
+USE_QT=		concurrent core gui multimedia network printsupport serialport \
+		sql sql-sqlite3 testlib widgets buildtools:build \
+		linguisttools:build qmake:build
+
+CONFLICTS=	wsjtx
 
 CMAKE_ARGS+=	-DCMAKE_PREFIX_PATH+=${LOCALBASE}/wsjtx/lib \
 		-DLOCALBASE::STRING="${LOCALBASE}"
diff --git a/comms/wsjtz/files/patch-CMakeLists.txt b/comms/wsjtz/files/patch-CMakeLists.txt
index 7dfab188f567..f174fe7d41ed 100644
--- a/comms/wsjtz/files/patch-CMakeLists.txt
+++ b/comms/wsjtz/files/patch-CMakeLists.txt
@@ -1,4 +1,4 @@
---- CMakeLists.txt.orig	2021-02-08 14:51:20 UTC
+--- CMakeLists.txt.orig	2022-04-18 18:07:26 UTC
 +++ CMakeLists.txt
 @@ -141,6 +141,12 @@ attach a debugger which will then receive the console 
  # install locations
@@ -13,7 +13,7 @@
  if (APPLE)
    set (CMAKE_INSTALL_BINDIR ${CMAKE_PROJECT_NAME}.app/Contents/MacOS)
    set (CMAKE_INSTALL_DATAROOTDIR ${CMAKE_PROJECT_NAME}.app/Contents/Resources)
-@@ -847,8 +853,20 @@ find_package (Boost 1.62 REQUIRED COMPONENTS log_setup
+@@ -875,8 +881,20 @@ find_package (Boost 1.62 REQUIRED COMPONENTS log_setup
  #
  # OpenMP
  #
@@ -35,7 +35,16 @@
  #
  # fftw3 single precision library
  #
-@@ -1135,7 +1153,7 @@ add_executable (encode77 lib/77bit/encode77.f90)
+@@ -923,7 +941,7 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
+ #
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
+ 
+-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -fexceptions -frtti")
++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wno-vla -Wextra -fexceptions -frtti")
+ 
+ if (NOT APPLE)
+   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pragmas")
+@@ -1169,7 +1187,7 @@ add_executable (wsprsim ${wsprsim_CSRCS})
  target_link_libraries (encode77 wsjt_fort wsjt_cxx)
  
  add_executable (wsprsim ${wsprsim_CSRCS})
@@ -44,7 +53,7 @@
  
  add_executable (jt4code lib/jt4code.f90)
  target_link_libraries (jt4code wsjt_fort wsjt_cxx)
-@@ -1177,6 +1195,12 @@ target_link_libraries (ldpcsim240_74 wsjt_fort wsjt_cx
+@@ -1211,6 +1229,12 @@ endif(WSJT_BUILD_UTILS)
  
  endif(WSJT_BUILD_UTILS)
  
@@ -57,7 +66,7 @@
  add_executable (fmtave lib/fmtave.f90)
  
  add_executable (fcal lib/fcal.f90)
-@@ -1561,12 +1585,12 @@ install (PROGRAMS
+@@ -1601,12 +1625,12 @@ install (PROGRAMS
    RENAME rigctld-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
    )
  
diff --git a/comms/wsjtz/files/patch-CMake-Modules_FindUsb.cmake b/comms/wsjtz/files/patch-CMake_Modules_FindUsb.cmake
similarity index 57%
rename from comms/wsjtz/files/patch-CMake-Modules_FindUsb.cmake
rename to comms/wsjtz/files/patch-CMake_Modules_FindUsb.cmake
index 6b181e59cf49..75c7a19faca7 100644
--- a/comms/wsjtz/files/patch-CMake-Modules_FindUsb.cmake
+++ b/comms/wsjtz/files/patch-CMake_Modules_FindUsb.cmake
@@ -1,6 +1,6 @@
---- CMake/Modules/FindUsb.cmake	2021-11-30 23:55:50.616592000 -0500
-+++ CMake/Modules/FindUsb.cmake	2021-11-30 23:56:00.350981000 -0500
-@@ -27,7 +27,7 @@
+--- CMake/Modules/FindUsb.cmake.orig	2021-12-28 16:31:58 UTC
++++ CMake/Modules/FindUsb.cmake
+@@ -27,7 +27,7 @@ libfind_pkg_detect (Usb usb-1.0
  endif ()
  libfind_pkg_detect (Usb usb-1.0
    FIND_PATH libusb.h PATH_SUFFIXES libusb-1.0
diff --git a/comms/wsjtz/files/patch-Radio.cpp b/comms/wsjtz/files/patch-Radio.cpp
index 4beb7759b8e8..482155884385 100644
--- a/comms/wsjtz/files/patch-Radio.cpp
+++ b/comms/wsjtz/files/patch-Radio.cpp
@@ -1,6 +1,6 @@
---- Radio.cpp.orig	2021-02-01 18:08:30 UTC
+--- Radio.cpp.orig	2021-12-28 16:31:58 UTC
 +++ Radio.cpp
-@@ -45,7 +45,7 @@ namespace Radio
+@@ -54,7 +54,7 @@ namespace Radio
      value *= std::pow (10., scale);
      if (ok)
        {
@@ -9,7 +9,7 @@
            {
              value = 0.;
              *ok = false;
-@@ -70,7 +70,7 @@ namespace Radio
+@@ -92,7 +92,7 @@ namespace Radio
      if (ok)
        {
          if (value < -std::numeric_limits<Frequency>::max ()