diff --git a/comms/wsjtz/Makefile b/comms/wsjtz/Makefile index 7efc1e3be351..5c1f815a6ca8 100644 --- a/comms/wsjtz/Makefile +++ b/comms/wsjtz/Makefile @@ -1,63 +1,58 @@ PORTNAME= wsjtz DISTVERSION= 2.5.4-1.22 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= comms hamradio MASTER_SITES= SF/wsjt-z/Source 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}" # for detailed debugging uncomment the next line #CMAKE_ARGS+= --debug-output --trace PLIST_SUB+= PORTVERSION="${PORTVERSION}" OPTIONS_DEFINE= DOCS PORTDOCS= * DOCSDIR= ${PREFIX}/share/doc/${PORTNAME:S/z/x/} DATADIR= ${PREFIX}/share/${PORTNAME:S/z/x/} WRKSRC= ${WRKDIR}/wsjtx .include .if ${GCC_DEFAULT} >= 10 # workaround for More actual than formal arguments in procedure call at (1) FFLAGS+= -fallow-argument-mismatch .endif post-install: .for f in fcal fmeasure fmtave fst4sim ft8code jt4code jt65code jt9 jt9code \ message_aggregator msk144code q65code q65sim udp_daemon wsjtx wsprd ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f} .endfor .include 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,78 +1,87 @@ ---- 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 # +if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set (FREEBSD TRUE) + link_directories("/usr/lib" "${LOCALBASE}/lib") + include_directories("/usr/include" "${LOCALBASE}/include") +endif() + 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 # -find_package (OpenMP) +# OpenMP_C_FLAGS - flags to add to the C compiler for OpenMP support +# OpenMP_CXX_FLAGS - flags to add to the CXX compiler for OpenMP support +# OpenMP_Fortran_FLAGS - flags to add to the Fortran compiler for OpenMP support +# OPENMP_FOUND - true if openmp is detected +if (FREEBSD) + set (OpenMP_C_FLAGS "-openmp") + set (OpenMP_CXX_FLAGS "-openmp") + set (OpenMP_Fortran_FLAGS "-openmp") + set (OPENMP_FOUND TRUE) +else() + find_package (OpenMP) +endif() + # # 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}) -target_link_libraries (wsprsim ${LIBM_LIBRARIES}) +target_link_libraries (wsprsim ${LIBM_LIBRARIES} -lm) 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) +if(FREEBSD) + set (extraLIBS "ltdl" "usb") + else() + set (extraLIBS "") +endif() + 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} ) -install (PROGRAMS - ${RIGCTLCOM_EXE} - DESTINATION ${CMAKE_INSTALL_BINDIR} - #COMPONENT runtime - RENAME rigctlcom-wsjtx${CMAKE_EXECUTABLE_SUFFIX} - ) +#install (PROGRAMS +# ${RIGCTLCOM_EXE} +# DESTINATION ${CMAKE_INSTALL_BINDIR} +# #COMPONENT runtime +# RENAME rigctlcom-wsjtx${CMAKE_EXECUTABLE_SUFFIX} +# ) install (FILES README 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,11 +1,11 @@ ---- 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 - FIND_LIBRARY usb-1.0 ${_library_options} + FIND_LIBRARY usb-1.0 usb ${_library_options} ) libfind_process (Usb) 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,20 +1,20 @@ ---- 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) { - if (value < 0. || value > std::numeric_limits::max ()) + if (value < 0. || value > (float)std::numeric_limits::max ()) { value = 0.; *ok = false; -@@ -70,7 +70,7 @@ namespace Radio +@@ -92,7 +92,7 @@ namespace Radio if (ok) { if (value < -std::numeric_limits::max () - || value > std::numeric_limits::max ()) + || value > (float)std::numeric_limits::max ()) { value = 0.; *ok = false;