1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00
freebsd-ports/comms/wsjtx/files/wsjtx.patch
Diane Bruce 38d057b579 - 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.
2019-03-07 13:45:03 +00:00

163 lines
5.3 KiB
Diff

--- 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