- update to 2.0.1

- builds on i386 now
- remove MAKE_JOBS_UNSAFE
- Upstream wsjtx build instructions call for their forked
  version of hamlib for wsjtx to work correctly.
  Upstream distribution includes both wsjtx and a copy of their
  forked hamlib with their own build system. This is now used in
  this updated port. The cmake build provided does not have an
  install/strip target which forces use of do-install.

N.B. If hamlib is already installed, this port will incorrectly
link against the shared library version of hamlib instead of the
private copy provided. There seems no easy solution to this.
This commit is contained in:
Diane Bruce 2019-03-07 13:45:03 +00:00
parent 3d7d776255
commit 38d057b579
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=494945
11 changed files with 217 additions and 190 deletions

View file

@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= wsjtx
PORTVERSION= 2.0.0
PORTREVISION= 1
PORTVERSION= 2.0.1
CATEGORIES= comms hamradio
MASTER_SITES= SF/wsjt/${PORTNAME}-${PORTVERSION}${DISTVERSIONSUFFIX}
@ -12,44 +11,37 @@ COMMENT= Weak signal ham radio communication package
LICENSE= GPLv3
BUILD_DEPENDS= asciidoctor:textproc/rubygem-asciidoctor \
autoconf>=2.69:devel/autoconf \
automake>=1.16.1:devel/automake \
a2x:textproc/asciidoc \
libtool:devel/libtool \
${LOCALBASE}/share/xsl/docbook:textproc/docbook-xsl
LIB_DEPENDS= libfftw3.so:math/fftw3 \
libfftw3f.so:math/fftw3-float \
libhamlib.so:comms/hamlib \
libxslt.so:textproc/libxslt \
libomp.so:devel/openmp
MAKE_JOBS_UNSAFE= yes
USES= cmake compiler:c++11-lib dos2unix fortran pkgconfig \
qt:5 readline tar:tgz
USE_GL= yes
USES= cmake compiler:c++11-lib fortran gl \
makeinfo pkgconfig qt:5 tar:tgz
USE_GL= glu
USE_QT= core gui buildtools network qmake_build widgets \
multimedia concurrent printsupport serialport
CMAKE_ARGS+= -DPORT_BUILDING::STRING="ON" \
-DCMAKE_PREFIX_PATH+=${LOCALBASE}/wsjtx/lib \
multimedia concurrent printsupport serialport sql
CMAKE_ARGS+= -DCMAKE_PREFIX_PATH+=${LOCALBASE}/wsjtx/lib \
-DLOCALBASE::STRING="${LOCALBASE}"
WRKSRC= ${WRKDIR}/${PORTNAME}
PLIST_SUB+= PORTVERSION="${PORTVERSION}"
BROKEN_i386= does not build on i386 due to openmp
post-patch:
${CP} ${FILESDIR}/wsjtx.patch ${WRKSRC}
${CP} ${FILESDIR}/hamlib.patch ${WRKSRC}
#
# This nonsense is because wsjtx is shipped with a copy of hamlib
# as well as wsjtx
#
.include <bsd.port.pre.mk>
do-install:
(cd ${CONFIGURE_WRKSRC};${MAKE} -f Makefile DESTDIR=${STAGEDIR} install)
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200000
EXTRA_PATCHES+= ${FILESDIR}/add_clogf
.endif
post-install:
.for f in fcal fmeasure fmtave ft8code jt4code jt65code jt9 jt9code \
message_aggregator msk144code qra64code qra64sim udp_daemon wsjtx wsprd
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f}
.endfor
do-extract:
# clogf is only present in FreeBSD 12
${TAR} xf ${DISTDIR}/${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} -C${WRKDIR}
${TAR} xf ${WRKDIR}/${PORTNAME}-${PORTVERSION}/src/wsjtx.tgz -C${WRKDIR}
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200000
${CP} ${FILESDIR}/clogf.c ${WRKDIR}/wsjtx
.endif
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1545885409
SHA256 (wsjtx-2.0.0.tgz) = 66434f69f256742da1fe057ec51e4464cab2614f0bfb1a310c04a385b77bd014
SIZE (wsjtx-2.0.0.tgz) = 42090145
TIMESTAMP = 1551222360
SHA256 (wsjtx-2.0.1.tgz) = 18f18f93f7e0ecc631ff5f7e0002521c41b54322ea33e5d6ca3ab5144fe1a0cd
SIZE (wsjtx-2.0.1.tgz) = 43779157

View file

@ -1,11 +0,0 @@
--- CMakeLists.txt.orig 2018-12-26 23:40:10.475771000 -0500
+++ CMakeLists.txt 2018-12-26 23:40:25.193281000 -0500
@@ -318,6 +318,8 @@
wsprnet.cpp
WSPRBandHopping.cpp
widgets/ExportCabrillo.cpp
+# No, this isn't the right place for clogf
+ clogf.c
)
set (wsjt_CXXSRCS

View file

@ -1,46 +0,0 @@
/* $NetBSD: clogf.c,v 1.1 2007/08/20 16:01:35 drochner Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software written by Stephen L. Moshier.
* It is redistributed by the NetBSD Foundation by permission of the author.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <complex.h>
#include <math.h>
float complex
clogf(float complex z)
{
float complex w;
float p, rr;
rr = cabsf(z);
p = logf(rr);
rr = atan2f(cimagf(z), crealf(z));
w = p + rr * I;
return w;
}

View file

@ -0,0 +1,10 @@
--- hamlib/configure.ac.orig 2019-02-24 18:41:47.000000000 -0500
+++ hamlib/configure.ac 2019-03-03 22:03:13.673990000 -0500
@@ -317,6 +317,7 @@
AC_MSG_RESULT([$cf_with_libusb])
+LIBUSB_LIBS="-lusb"
LIBUSB=""
AC_ARG_VAR([LIBUSB_CFLAGS], [C compiler flags for libusb, overriding configure defaults])
AC_ARG_VAR([LIBUSB_LIBS], [linker flags for libusb, overriding configure check (useful for specifying static libusb-1.0.a (see INSTALL))])

View file

@ -1,56 +1,20 @@
--- CMakeLists.txt.orig 2018-06-14 13:07:32 UTC
--- CMakeLists.txt.orig 2019-02-25 04:11:18 UTC
+++ CMakeLists.txt
@@ -1,5 +1,4 @@
cmake_minimum_required (VERSION 2.8.10 FATAL_ERROR)
-
if (APPLE)
#
# The following variables define the portability and compatability attributes of the Mac OS X build
@@ -132,6 +131,12 @@ if (CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][B
set (is_debug_build 1)
endif ()
+if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ set (FREEBSD TRUE)
+ link_directories("/usr/lib" "${LOCALBASE}/lib")
+ include_directories("/usr/include" "${LOCALBASE}/include")
+endif()
+
@@ -23,7 +23,7 @@ source tarball." )
#
# Find_library (USB_LIBRARY NAMES libusb.a usb)
Find_program (PATCH_EXECUTABLE patch REQUIRED)
-Find_package (Git REQUIRED)
+#Find_package (Git REQUIRED)
#
# Options & features
@@ -850,7 +855,19 @@ endif ()
#
# 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
@@ -1297,6 +1314,13 @@ else (${OPENMP_FOUND} OR APPLE)
target_link_libraries (jt9 wsjt_fort wsjt_cxx Qt5::Core)
endif (${OPENMP_FOUND} OR APPLE)
+if(FREEBSD)
+ set (extraLIBS "ltdl" "usb")
+ else()
+ set (extraLIBS "")
+endif()
+
+
# build the main application
add_executable (wsjtx MACOSX_BUNDLE
${wsjtx_CXXSRCS}
# extra C flags to minimize hamlib excutable sizes
@@ -91,7 +91,7 @@ ExternalProject_Add (hamlib
URL_HASH MD5=${hamlib_md5sum}
UPDATE_COMMAND ./bootstrap
PATCH_COMMAND ${PATCH_EXECUTABLE} -p1 -N < ${CMAKE_CURRENT_SOURCE_DIR}/hamlib.patch
- CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --disable-shared --enable-static --without-cxx-binding ${EXTRA_FLAGS} # LIBUSB_LIBS=${USB_LIBRARY}
+ CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --disable-shared --enable-static --without-cxx-binding --without-readline ${EXTRA_FLAGS} # LIBUSB_LIBS=${USB_LIBRARY}
BUILD_COMMAND $(MAKE) all V=1 # $(MAKE) is ExternalProject_Add() magic to do recursive make
INSTALL_COMMAND $(MAKE) install-strip V=1 DESTDIR=""
STEP_TARGETS update install

View file

@ -1,19 +0,0 @@
--- Configuration.cpp.orig 2018-06-14 13:07:01 UTC
+++ Configuration.cpp
@@ -2798,14 +2798,14 @@ void Configuration::impl::fill_port_comb
auto Configuration::impl::apply_calibration (Frequency f) const -> Frequency
{
if (frequency_calibration_disabled_) return f;
- return std::llround (calibration_.intercept
+ return llround (calibration_.intercept
+ (1. + calibration_.slope_ppm / 1.e6) * f);
}
auto Configuration::impl::remove_calibration (Frequency f) const -> Frequency
{
if (frequency_calibration_disabled_) return f;
- return std::llround ((f - calibration_.intercept)
+ return llround ((f - calibration_.intercept)
/ (1. + calibration_.slope_ppm / 1.e6));
}

View file

@ -1,18 +0,0 @@
--- lib/wsprd/Makefile.orig 2017-10-19 22:13:43 UTC
+++ lib/wsprd/Makefile
@@ -1,10 +1,10 @@
-CC = gcc
+#CC = gcc
#CC = clang-3.5
-FC = gfortran
+#FC = gfortran
-CFLAGS= -I/usr/include -Wall -Wno-missing-braces -O3 -ffast-math
-LDFLAGS = -L/usr/lib
-FFLAGS = -O2 -Wall -Wno-conversion
+#CFLAGS= -I/usr/include -Wall -Wno-missing-braces -O3 -ffast-math
+#LDFLAGS = -L/usr/lib
+#FFLAGS = -O2 -Wall -Wno-conversion
LIBS = -lfftw3f -lm
# Default rules

View file

@ -1,11 +0,0 @@
--- manpages/CMakeLists.txt.orig 2017-10-19 22:13:51 UTC
+++ manpages/CMakeLists.txt
@@ -2,8 +2,6 @@ set (ASCIIDOC_MANS
man1/wsjtx.1.txt
man1/wsprd.1.txt
man1/jt65code.1.txt
- man1/rigctl-wsjtx.1.txt
- man1/rigctld-wsjtx.1.txt
man1/message_aggregator.1.txt
man1/udp_daemon.1.txt
)

View file

@ -0,0 +1,162 @@
--- wsjtx/CMakeLists.txt.orig 2019-02-24 22:48:37.000000000 -0500
+++ wsjtx/CMakeLists.txt 2019-03-01 08:30:47.282749000 -0500
@@ -1,5 +1,4 @@
cmake_minimum_required (VERSION 2.8.10 FATAL_ERROR)
-
if (APPLE)
#
# The following variables define the portability and compatability attributes of the Mac OS X build
@@ -132,7 +131,13 @@
set (is_debug_build 1)
endif ()
+if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ set (FREEBSD TRUE)
+ link_directories("/usr/lib" "${LOCALBASE}/lib")
+ include_directories("/usr/include" "${LOCALBASE}/include")
+endif()
+
#
# Options & features
#
@@ -834,8 +839,20 @@
#
# 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
#
@@ -1258,6 +1275,13 @@
target_link_libraries (msk144sim wsjt_fort wsjt_cxx)
endif(WSJT_BUILD_UTILS)
+
+if(FREEBSD)
+ set (extraLIBS "ltdl" "usb")
+ else()
+ set (extraLIBS "")
+endif()
+
# build the main application
add_executable (wsjtx MACOSX_BUNDLE
--- /dev/null 2019-03-02 11:25:56.795397000 -0500
--- /dev/null 2019-03-02 11:44:18.831676000 -0500
+++ wsjtx/clogf.c 2019-03-02 11:43:18.833490000 -0500
@@ -0,0 +1,100 @@
+#include <sys/param.h>
+#if __FreeBSD_version <= 1200000
+
+/* $NetBSD: clogf.c,v 1.1 2007/08/20 16:01:35 drochner Exp $ */
+
+/*-
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software written by Stephen L. Moshier.
+ * It is redistributed by the NetBSD Foundation by permission of the author.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <complex.h>
+#include <math.h>
+
+float complex
+clogf(float complex z)
+{
+ float complex w;
+ float p, rr;
+
+ rr = cabsf(z);
+ p = logf(rr);
+ rr = atan2f(cimagf(z), crealf(z));
+ w = p + rr * I;
+ return w;
+}
+#endif
+#include <sys/param.h>
+#if __FreeBSD_version <= 1200000
+
+/* $NetBSD: clogf.c,v 1.1 2007/08/20 16:01:35 drochner Exp $ */
+
+/*-
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software written by Stephen L. Moshier.
+ * It is redistributed by the NetBSD Foundation by permission of the author.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <complex.h>
+#include <math.h>
+
+float complex
+clogf(float complex z)
+{
+ float complex w;
+ float p, rr;
+
+ rr = cabsf(z);
+ p = logf(rr);
+ rr = atan2f(cimagf(z), crealf(z));
+ w = p + rr * I;
+ return w;
+}
+#endif

View file

@ -11,6 +11,7 @@ bin/msk144code
bin/qra64code
bin/qra64sim
bin/rigctl-wsjtx
bin/rigctlcom-wsjtx
bin/rigctld-wsjtx
bin/udp_daemon
bin/wsjtx
@ -20,6 +21,9 @@ man/man1/jt65code.1.gz
man/man1/jt9.1.gz
man/man1/jt9code.1.gz
man/man1/message_aggregator.1.gz
man/man1/rigctl-wsjtx.1.gz
man/man1/rigctlcom-wsjtx.1.gz
man/man1/rigctld-wsjtx.1.gz
man/man1/udp_daemon.1.gz
man/man1/wsjtx.1.gz
man/man1/wsprd.1.gz