diff --git a/comms/wsjtx/Makefile b/comms/wsjtx/Makefile index 2f3e20bb1b3e..604e41b5689a 100644 --- a/comms/wsjtx/Makefile +++ b/comms/wsjtx/Makefile @@ -1,87 +1,87 @@ PORTNAME= wsjtx DISTVERSION= 2.5.4 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= comms hamradio MASTER_SITES= SF/wsjt/${PORTNAME}-${PORTVERSION}${DISTVERSIONSUFFIX} MAINTAINER= hamradio@FreeBSD.org COMMENT= Weak signal ham radio communication package WWW= https://physics.princeton.edu/pulsar/k1jt/wsjtx.html LICENSE= GPLv3 BUILD_DEPENDS= asciidoctor:textproc/rubygem-asciidoctor \ a2x:textproc/asciidoc \ git:devel/git \ ${LOCALBASE}/share/xsl/docbook:textproc/docbook-xsl LIB_DEPENDS= libfftw3.so:math/fftw3 \ libfftw3f.so:math/fftw3-float \ libboost_log_setup.so:devel/boost-libs \ libxslt.so:textproc/libxslt USES= cmake:noninja compiler:c++11-lang fortran gl libedit \ makeinfo pkgconfig qt:5 readline tar:tgz USE_GL= glu USE_QT= core gui network widgets \ multimedia concurrent printsupport serialport sql sql-sqlite3 \ buildtools:build linguisttools:build qmake:build testlib CONFLICTS_INSTALL= wsjtz # for detailed debugging uncomment the next line #CMAKE_ARGS+= --debug-output --trace PLIST_SUB+= PORTVERSION="${PORTVERSION}" _PATCHES= wsjtx.patch hamlib.patch .include .if ${GCC_DEFAULT} >= 10 # workaround for More actual than formal arguments in procedure call at (1) FFLAGS+= -fallow-argument-mismatch .endif -_HAMLIB_PATCHES= configure hamlib.pc.in tests/rigtestlibusb.c +_HAMLIB_PATCHES= configure hamlib.pc.in tests/rigtestlibusb.c src/misc.c make-hamlib-patch: ${MV} ${FILESDIR}/hamlib.patch ${FILESDIR}/hamlib.patch.old . for f in ${_HAMLIB_PATCHES} (cd ${WRKDIR}/.build/hamlib-prefix/src;diff -u hamlib/$f.orig hamlib/$f >> ${FILESDIR}/hamlib.patch || true) . endfor _WSJTX_PATCHES= CMakeLists.txt Radio.cpp widgets/FrequencyLineEdit.cpp \ widgets/FrequencyDeltaLineEdit.cpp \ CMake/Modules/FindUsb.cmake \ CMake/Modules/FindHamlib.cmake make-wsjtx-patch: ${MV} ${FILESDIR}/wsjtx.patch ${FILESDIR}/wsjtx.patch.old . for f in ${_WSJTX_PATCHES} (cd ${WRKDIR}/.build/wsjtx-prefix/src;diff -u wsjtx/$f.orig wsjtx/$f >> ${FILESDIR}/wsjtx.patch || true) . endfor post-patch: . for _patch in ${_PATCHES} # Keep a copy of the blank patch for the post-build target below ${MV} ${WRKSRC}/${_patch} ${WRKSRC}/${_patch}.orig # Copy the patch provided by the ports system ${CP} ${FILESDIR}/${_patch} ${WRKSRC} . endfor post-build: # With cmake 3.18, the patching stage in the internal build # is run again, trick it by removing the patch again. . for _patch in ${_PATCHES} ${MV} ${WRKSRC}/${_patch}.orig ${WRKSRC}/${_patch} . endfor do-install: (cd ${CONFIGURE_WRKSRC};${MAKE} -f Makefile DESTDIR=${STAGEDIR} install) post-install: .for f in fcal fmeasure fmtave fst4sim ft8code jt4code jt65code jt9 jt9code \ message_aggregator msk144code rigctld-wsjtx rigctlcom-wsjtx \ rigctl-wsjtx udp_daemon q65code q65sim \ wsjtx wsjtx_app_version wsprd ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f} .endfor .include diff --git a/comms/wsjtx/files/hamlib.patch b/comms/wsjtx/files/hamlib.patch index 448098d51819..335e13502141 100644 --- a/comms/wsjtx/files/hamlib.patch +++ b/comms/wsjtx/files/hamlib.patch @@ -1,62 +1,74 @@ ---- hamlib/configure.orig 2022-01-02 11:10:19.000000000 +0100 -+++ hamlib/configure 2022-04-13 12:51:01.174492000 +0200 +--- hamlib/configure.orig 2022-01-02 05:10:19.000000000 -0500 ++++ hamlib/configure 2023-02-17 16:55:21.413328000 -0500 @@ -19135,7 +19135,7 @@ case "$host_os" in #( freebsd*) : - AM_CPPFLAGS="-I/usr/local/include ${AM_CPPFLAGS}" + AM_CPPFLAGS="${AM_CPPFLAGS} -I/usr/local/include" AM_LDFLAGS="${AM_LDFLAGS} -L/usr/local/lib" ;; #( darwin* | rhapsody*) : @@ -19211,6 +19211,7 @@ fi +LIBUSB_LIBS="-lusb" LIBUSB="" ---- hamlib/hamlib.pc.in.orig 2022-01-02 11:10:11.000000000 +0100 -+++ hamlib/hamlib.pc.in 2022-04-13 12:34:36.119285000 +0200 +--- hamlib/hamlib.pc.in.orig 2022-01-02 05:10:11.000000000 -0500 ++++ hamlib/hamlib.pc.in 2023-02-17 16:55:21.413939000 -0500 @@ -7,7 +7,6 @@ Description: Library to control radio and rotator equipment. URL: @PACKAGE_URL@ Version: @PACKAGE_VERSION@ -Requires.private: @LIBUSB@ Cflags: -I${includedir} @PTHREAD_CFLAGS@ -Libs: -L${libdir} -lhamlib -Libs.private: @MATH_LIBS@ @DL_LIBS@ @NET_LIBS@ @PTHREAD_LIBS@ +Libs: -L${libdir} ${libdir}/libhamlib.a +Libs.private: @MATH_LIBS@ @DL_LIBS@ @NET_LIBS@ @PTHREAD_LIBS@ -lusb ---- hamlib/tests/rigtestlibusb.c.orig 2022-01-02 11:10:11.000000000 +0100 -+++ hamlib/tests/rigtestlibusb.c 2022-04-13 12:34:36.119728000 +0200 +--- hamlib/tests/rigtestlibusb.c.orig 2022-01-02 05:10:11.000000000 -0500 ++++ hamlib/tests/rigtestlibusb.c 2023-02-17 16:55:21.414509000 -0500 @@ -115,7 +115,10 @@ printf(" wSpeedSupported: %u\n", ss_usb_cap->wSpeedSupported); printf(" bFunctionalitySupport: %u\n", ss_usb_cap->bFunctionalitySupport); printf(" bU1devExitLat: %u\n", ss_usb_cap->bU1DevExitLat); - printf(" bU2devExitLat: %u\n", ss_usb_cap->bU2DevExitLat); +/* + * does not exist on FreeBSD libusb.h yet + * printf(" bU2devExitLat: %u\n", ss_usb_cap->bU2DevExitLat); + */ } static void print_bos(libusb_device_handle *handle) @@ -133,6 +136,7 @@ printf(" Binary Object Store (BOS):\n"); printf(" wTotalLength: %u\n", bos->wTotalLength); +#if 0 printf(" bNumDeviceCaps: %u\n", bos->bNumDeviceCaps); for (i = 0; i < bos->bNumDeviceCaps; i++) @@ -170,7 +174,7 @@ libusb_free_ss_usb_device_capability_descriptor(ss_dev_cap); } } - +#endif libusb_free_bos_descriptor(bos); } +--- hamlib/src/misc.c.orig 2023-02-17 18:06:57.171679000 -0500 ++++ hamlib/src/misc.c 2023-02-17 18:13:49.377881000 -0500 +@@ -2550,7 +2550,8 @@ + if (localtime) + { + mytm = localtime_r(&t, &result); +- mytimezone = timezone; ++ /* For FreeBSD */ ++ mytimezone = mytm->tm_gmtoff; + } + else + {