summaryrefslogtreecommitdiff
path: root/geography/opencpn/patches
diff options
context:
space:
mode:
Diffstat (limited to 'geography/opencpn/patches')
-rw-r--r--geography/opencpn/patches/patch-CMakeLists.txt42
-rw-r--r--geography/opencpn/patches/patch-FindPortaudio.cmake6
-rw-r--r--geography/opencpn/patches/patch-plugins_chartdldr_pi_CMakeLists.txt10
-rw-r--r--geography/opencpn/patches/patch-plugins_chartdldr_pi_cmake_PluginConfigure.cmake20
-rw-r--r--geography/opencpn/patches/patch-plugins_dashboard_pi_CMakeLists.txt19
-rw-r--r--geography/opencpn/patches/patch-plugins_grib_pi_CMakeLists.txt21
-rw-r--r--geography/opencpn/patches/patch-plugins_wmm_pi_cmake_PluginConfigure.cmake20
-rw-r--r--geography/opencpn/patches/patch-plugins_wmm_pi_src_MagneticPlotMap.cpp39
-rw-r--r--geography/opencpn/patches/patch-src_chart1.cpp55
-rw-r--r--geography/opencpn/patches/patch-src_crashprint.cpp21
-rw-r--r--geography/opencpn/patches/patch-src_tcmgr.cpp16
11 files changed, 28 insertions, 241 deletions
diff --git a/geography/opencpn/patches/patch-CMakeLists.txt b/geography/opencpn/patches/patch-CMakeLists.txt
index 7c6f55dfa2a..742974d0e5c 100644
--- a/geography/opencpn/patches/patch-CMakeLists.txt
+++ b/geography/opencpn/patches/patch-CMakeLists.txt
@@ -1,8 +1,8 @@
-$NetBSD: patch-CMakeLists.txt,v 1.8 2018/11/25 17:04:40 bouyer Exp $
+$NetBSD: patch-CMakeLists.txt,v 1.9 2019/03/25 11:34:05 bouyer Exp $
---- CMakeLists.txt.orig 2018-11-07 04:14:41.000000000 +0100
-+++ CMakeLists.txt 2018-11-25 14:47:14.684811535 +0100
-@@ -91,8 +91,21 @@
+--- CMakeLists.txt.orig 2019-03-13 05:01:43.000000000 +0100
++++ CMakeLists.txt 2019-03-13 12:59:52.443556322 +0100
+@@ -157,7 +157,19 @@
# Based on code from nohal
IF (NOT WIN32)
# default
@@ -21,11 +21,9 @@ $NetBSD: patch-CMakeLists.txt,v 1.8 2018/11/25 17:04:40 bouyer Exp $
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ ENDIF (CMAKE_SYSTEM_PROCESSOR MATCHES "arm*")
SET (LIB_INSTALL_DIR "lib")
-+
IF (EXISTS /etc/debian_version)
SET (PACKAGE_FORMAT "DEB")
- SET (PACKAGE_DEPS "libc6, libwxgtk3.0-0, wx3.0-i18n, libglu1-mesa (>= 7.0.0), libgl1-mesa-glx (>= 7.0.0), zlib1g, bzip2, libtinyxml2.6.2, libportaudio2")
-@@ -125,7 +138,6 @@
+@@ -191,7 +203,6 @@
ELSE (CMAKE_SYSTEM_PROCESSOR MATCHES "arm*")
IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
SET (ARCH "x86_64")
@@ -33,35 +31,19 @@ $NetBSD: patch-CMakeLists.txt,v 1.8 2018/11/25 17:04:40 bouyer Exp $
ELSE (CMAKE_SIZEOF_VOID_P MATCHES "8")
SET (ARCH "i386")
SET (LIB_INSTALL_DIR "lib")
-@@ -344,7 +356,7 @@
+@@ -1033,7 +1044,6 @@
- # Search for opengles, short of running a program to test the speed
- # of acceleration, I simply use gles on "native linux" arm systems
--IF (ARCH MATCHES "arm*" AND (NOT QT_ANDROID) )
-+IF (ARCH MATCHES "arm*" AND (NOT QT_ANDROID) AND CMAKE_SYSTEM_NAME MATCHES ".*Linux" )
- find_path(OPENGLESv1_INCLUDE_DIR GLES/gl.h )
- IF (OPENGLESv1_INCLUDE_DIR)
- MESSAGE (STATUS "Found OpenGLESv1")
-@@ -927,7 +939,6 @@
-
IF(NOT WIN32 AND NOT APPLE AND NOT QT_ANDROID)
- OPTION(OCPN_FORCE_GTK3 "Force the build to use GTK3" OFF)
- IF(NOT OCPN_FORCE_GTK3)
- FIND_PACKAGE(GTK2)
-@@ -1978,10 +1989,10 @@
- # Certain older Cmake FindGTK2 modules ( e.g. cmake-2.8.0-2) do not yield all of the required link libraries
+ IF(NOT OCPN_FORCE_GTK3)
+@@ -2336,6 +2346,7 @@
# So, add them manually. These declarations may be redundant in some architectures, but do no harm.
--IF(UNIX)
--TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} dl )
--ENDIF(UNIX)
--
-+IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
-+ TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} dl )
+ IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} dl )
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--export-dynamic")
-+ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+
- IF( UNIX AND NOT APPLE )
- FIND_PATH( LIBELF_INCLUDE_DIR NAMES libelf.h gelf.h PATH_SUFFIXES libelf )
diff --git a/geography/opencpn/patches/patch-FindPortaudio.cmake b/geography/opencpn/patches/patch-FindPortaudio.cmake
index 0a38f81d4a2..063c8308866 100644
--- a/geography/opencpn/patches/patch-FindPortaudio.cmake
+++ b/geography/opencpn/patches/patch-FindPortaudio.cmake
@@ -1,9 +1,9 @@
-$NetBSD: patch-FindPortaudio.cmake,v 1.2 2015/01/22 12:34:15 bouyer Exp $
+$NetBSD: patch-FindPortaudio.cmake,v 1.3 2019/03/25 11:34:05 bouyer Exp $
really find portaudio in portaudio2 subdir
---- FindPortaudio.cmake.orig 2014-05-26 21:26:36.000000000 +0200
-+++ FindPortaudio.cmake 2014-05-26 21:30:22.000000000 +0200
+--- cmake/FindPortaudio.cmake.orig 2014-05-26 21:26:36.000000000 +0200
++++ cmake/FindPortaudio.cmake 2014-05-26 21:30:22.000000000 +0200
@@ -45,24 +45,13 @@
set(PORTAUDIO_FOUND TRUE)
else (PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS)
diff --git a/geography/opencpn/patches/patch-plugins_chartdldr_pi_CMakeLists.txt b/geography/opencpn/patches/patch-plugins_chartdldr_pi_CMakeLists.txt
index 5ee1fe245a4..b7ff56b348e 100644
--- a/geography/opencpn/patches/patch-plugins_chartdldr_pi_CMakeLists.txt
+++ b/geography/opencpn/patches/patch-plugins_chartdldr_pi_CMakeLists.txt
@@ -1,11 +1,11 @@
-$NetBSD: patch-plugins_chartdldr_pi_CMakeLists.txt,v 1.1 2016/05/21 10:50:41 bouyer Exp $
+$NetBSD: patch-plugins_chartdldr_pi_CMakeLists.txt,v 1.2 2019/03/25 11:34:05 bouyer Exp $
---- plugins/chartdldr_pi/CMakeLists.txt.orig 2016-05-21 11:06:35.652268145 +0200
-+++ plugins/chartdldr_pi/CMakeLists.txt 2016-05-21 11:08:36.585112791 +0200
-@@ -130,6 +130,9 @@
+--- plugins/chartdldr_pi/CMakeLists.txt.orig 2019-02-22 04:55:10.000000000 +0100
++++ plugins/chartdldr_pi/CMakeLists.txt 2019-02-22 14:32:36.748813048 +0100
+@@ -185,6 +185,9 @@
+ TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} "-lz" )
ENDIF(QT_ANDROID)
-
+IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
+ SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-fPIC")
+ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
diff --git a/geography/opencpn/patches/patch-plugins_chartdldr_pi_cmake_PluginConfigure.cmake b/geography/opencpn/patches/patch-plugins_chartdldr_pi_cmake_PluginConfigure.cmake
deleted file mode 100644
index 57d7d2aee28..00000000000
--- a/geography/opencpn/patches/patch-plugins_chartdldr_pi_cmake_PluginConfigure.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-plugins_chartdldr_pi_cmake_PluginConfigure.cmake,v 1.2 2016/05/21 10:50:41 bouyer Exp $
-
---- plugins/chartdldr_pi/cmake/PluginConfigure.cmake.orig 2016-02-03 18:44:17.000000000 +0100
-+++ plugins/chartdldr_pi/cmake/PluginConfigure.cmake 2016-05-21 11:07:31.835017011 +0200
-@@ -41,11 +41,12 @@
- ADD_DEFINITIONS( "-Wall -Wno-unused-result -g -O2 -fexceptions" )
- ENDIF(PROFILING)
-
-- IF(NOT APPLE)
-+ IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
- SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
-- ELSE(NOT APPLE)
-+ ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
-+ IF(APPLE)
- SET(CMAKE_SHARED_LINKER_FLAGS "-Wl -undefined dynamic_lookup")
-- ENDIF(NOT APPLE)
-+ ENDIF(APPLE)
-
- ENDIF(NOT MSVC)
-
diff --git a/geography/opencpn/patches/patch-plugins_dashboard_pi_CMakeLists.txt b/geography/opencpn/patches/patch-plugins_dashboard_pi_CMakeLists.txt
index 5787011fd4a..e4615854518 100644
--- a/geography/opencpn/patches/patch-plugins_dashboard_pi_CMakeLists.txt
+++ b/geography/opencpn/patches/patch-plugins_dashboard_pi_CMakeLists.txt
@@ -1,19 +1,8 @@
-$NetBSD: patch-plugins_dashboard_pi_CMakeLists.txt,v 1.2 2016/05/21 10:50:41 bouyer Exp $
+$NetBSD: patch-plugins_dashboard_pi_CMakeLists.txt,v 1.3 2019/03/25 11:34:05 bouyer Exp $
---- plugins/dashboard_pi/CMakeLists.txt.orig 2016-02-03 18:44:17.000000000 +0100
-+++ plugins/dashboard_pi/CMakeLists.txt 2016-05-21 11:08:40.892255884 +0200
-@@ -45,7 +45,9 @@
- # IF NOT DEBUGGING CFLAGS="-O2 -march=native"
- IF(NOT WIN32 AND NOT APPLE)
- ADD_DEFINITIONS( "-Wall -O2 -fexceptions -fvisibility=hidden" )
-- SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
-+ IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
-+ SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
-+ ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
- ENDIF(NOT WIN32 AND NOT APPLE)
-
- IF( APPLE )
-@@ -263,5 +265,8 @@
+--- plugins/dashboard_pi/CMakeLists.txt.orig 2019-02-22 04:55:10.000000000 +0100
++++ plugins/dashboard_pi/CMakeLists.txt 2019-02-22 14:34:10.074874697 +0100
+@@ -266,5 +268,8 @@
ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/data)
ENDIF(WIN32)
diff --git a/geography/opencpn/patches/patch-plugins_grib_pi_CMakeLists.txt b/geography/opencpn/patches/patch-plugins_grib_pi_CMakeLists.txt
index 8f4f8b09116..4f1c2fe3cae 100644
--- a/geography/opencpn/patches/patch-plugins_grib_pi_CMakeLists.txt
+++ b/geography/opencpn/patches/patch-plugins_grib_pi_CMakeLists.txt
@@ -1,21 +1,8 @@
-$NetBSD: patch-plugins_grib_pi_CMakeLists.txt,v 1.2 2016/05/21 10:50:41 bouyer Exp $
+$NetBSD: patch-plugins_grib_pi_CMakeLists.txt,v 1.3 2019/03/25 11:34:05 bouyer Exp $
---- plugins/grib_pi/CMakeLists.txt.orig 2016-02-03 18:44:17.000000000 +0100
-+++ plugins/grib_pi/CMakeLists.txt 2016-05-21 11:08:48.884522634 +0200
-@@ -42,9 +42,11 @@
- #ADD_DEFINITIONS( "-Wall -ansi -pedantic -Wno-variadic-macros" )
- #TODO: Should we use -fno-stack-protector
- # IF NOT DEBUGGING CFLAGS="-O2 -march=native"
-+IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
-+ SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
-+ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
- IF(NOT WIN32 AND NOT APPLE)
- ADD_DEFINITIONS( "-Wall -fexceptions -fvisibility=hidden" )
-- SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
- ENDIF(NOT WIN32 AND NOT APPLE)
-
- IF( APPLE )
-@@ -258,5 +260,8 @@
+--- plugins/grib_pi/CMakeLists.txt.orig 2019-02-22 04:55:10.000000000 +0100
++++ plugins/grib_pi/CMakeLists.txt 2019-02-22 14:35:35.500028250 +0100
+@@ -283,5 +285,8 @@
ENDIF(WIN32)
diff --git a/geography/opencpn/patches/patch-plugins_wmm_pi_cmake_PluginConfigure.cmake b/geography/opencpn/patches/patch-plugins_wmm_pi_cmake_PluginConfigure.cmake
deleted file mode 100644
index 3cceb0bfe38..00000000000
--- a/geography/opencpn/patches/patch-plugins_wmm_pi_cmake_PluginConfigure.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-plugins_wmm_pi_cmake_PluginConfigure.cmake,v 1.2 2016/05/21 10:50:41 bouyer Exp $
-
---- plugins/wmm_pi/cmake/PluginConfigure.cmake.orig 2016-02-03 18:44:17.000000000 +0100
-+++ plugins/wmm_pi/cmake/PluginConfigure.cmake 2016-05-21 11:07:42.654361498 +0200
-@@ -41,11 +41,12 @@
- ADD_DEFINITIONS( "-Wall -Wno-unused-result -g -O2 -fexceptions" )
- ENDIF(PROFILING)
-
-- IF(NOT APPLE)
-+ IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
- SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
-- ELSE(NOT APPLE)
-+ ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
-+ IF(APPLE)
- SET(CMAKE_SHARED_LINKER_FLAGS "-Wl -undefined dynamic_lookup")
-- ENDIF(NOT APPLE)
-+ ENDIF(APPLE)
-
- ENDIF(NOT MSVC)
-
diff --git a/geography/opencpn/patches/patch-plugins_wmm_pi_src_MagneticPlotMap.cpp b/geography/opencpn/patches/patch-plugins_wmm_pi_src_MagneticPlotMap.cpp
deleted file mode 100644
index 0c12c9b4884..00000000000
--- a/geography/opencpn/patches/patch-plugins_wmm_pi_src_MagneticPlotMap.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-$NetBSD: patch-plugins_wmm_pi_src_MagneticPlotMap.cpp,v 1.2 2018/07/03 15:14:15 bouyer Exp $
-
---- plugins/wmm_pi/src/MagneticPlotMap.cpp.orig 2018-02-07 12:08:26.000000000 +0100
-+++ plugins/wmm_pi/src/MagneticPlotMap.cpp 2018-07-02 12:16:38.589797991 +0200
-@@ -32,6 +32,7 @@
- #endif //precompiled headers
-
- #include <wx/progdlg.h>
-+#include <cmath>
-
- #include "ocpn_plugin.h"
-
-@@ -230,7 +231,7 @@
- else
- p = CalcParameter(lonval, rx);
-
-- if(isnan(p)) /* is this actually correct? */
-+ if(std::isnan(p)) /* is this actually correct? */
- return true;
-
- if(m_type == DECLINATION && p-ry*m_Spacing < -180) /* way off, try other way around */
-@@ -290,7 +291,7 @@
- double p3 = CachedCalcParameter(lat2, lon1);
- double p4 = CachedCalcParameter(lat2, lon2);
-
-- if(isnan(p1) || isnan(p2) || isnan(p3) || isnan(p4))
-+ if(std::isnan(p1) || std::isnan(p2) || std::isnan(p3) || std::isnan(p4))
- return;
-
- double ry1, ry2, ry3, ry4 = 0.0;
-@@ -318,7 +319,7 @@
- ry1*=m_Spacing, ry2*=m_Spacing, ry3*=m_Spacing, ry4*=m_Spacing;
-
- /* determine which interpolations need line segments */
-- switch(((isnan(lat4)*2 + isnan(lat3))*2 + isnan(lon4))*2 + isnan(lon3)) {
-+ switch(((std::isnan(lat4)*2 + std::isnan(lat3))*2 + std::isnan(lon4))*2 + std::isnan(lon3)) {
- case 0: /* all 4 sides? need to recurse to get better resolution */
- lon3 = (lon1+lon2)/2;
- lat3 = (lat1+lat2)/2;
diff --git a/geography/opencpn/patches/patch-src_chart1.cpp b/geography/opencpn/patches/patch-src_chart1.cpp
deleted file mode 100644
index 5a11506c4b3..00000000000
--- a/geography/opencpn/patches/patch-src_chart1.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-$NetBSD: patch-src_chart1.cpp,v 1.2 2015/01/22 12:34:15 bouyer Exp $
-
-Adapt for tty devices on NetBSD
-Reported in FS#1403
-
---- src/chart1.cpp.orig 2014-05-26 21:26:36.000000000 +0200
-+++ src/chart1.cpp 2014-05-26 21:30:22.000000000 +0200
-@@ -8032,7 +8032,9 @@
-
- #include <termios.h>
- #include <sys/ioctl.h>
-+#ifdef __linux__
- #include <linux/serial.h>
-+#endif
-
- #endif
-
-@@ -8098,6 +8100,15 @@
-
- int isTTYreal(const char *dev)
- {
-+#ifdef __NetBSD__
-+ if (strncmp("/dev/tty0", dev, 9) == 0)
-+ return 1;
-+ if (strncmp("/dev/ttyU", dev, 9) == 0)
-+ return 1;
-+ if (strcmp("/dev/gps", dev) == 0)
-+ return 1;
-+ return 0;
-+#else /* !NetBSD */
- struct serial_struct serinfo;
- int ret = 0;
-
-@@ -8114,6 +8125,7 @@
- }
-
- return ret;
-+#endif /* !NetBSD */
- }
-
-
-@@ -8154,11 +8166,13 @@
-
- // We try to add a few more, arbitrarily, for those systems that have fixed, traditional COM ports
-
-+#ifdef __linux__
- if( isTTYreal("/dev/ttyS0") )
- preturn->Add( _T("/dev/ttyS0") );
-
- if( isTTYreal("/dev/ttyS1") )
- preturn->Add( _T("/dev/ttyS1") );
-+#endif /* linux */
-
-
- #endif
diff --git a/geography/opencpn/patches/patch-src_crashprint.cpp b/geography/opencpn/patches/patch-src_crashprint.cpp
deleted file mode 100644
index 7ec35c335d5..00000000000
--- a/geography/opencpn/patches/patch-src_crashprint.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-src_crashprint.cpp,v 1.1 2015/01/22 12:34:15 bouyer Exp $
-
-backtrace support is linux-only for now
-
---- src/crashprint.cpp.orig 2015-01-20 16:46:17.000000000 +0000
-+++ src/crashprint.cpp 2015-01-20 16:46:24.000000000 +0000
-@@ -76,6 +76,7 @@
- // general functions
-
- void wxCrashPrint::Report () {
-+#if defined(__linux__)
- wxString appname = wxTheApp->GetAppName();
-
- // get the backtrace with symbols
-@@ -136,5 +137,5 @@
- wxPrintf (_T("%s\n"), lines[i].c_str());
- }
- }
--
-+#endif
- }
diff --git a/geography/opencpn/patches/patch-src_tcmgr.cpp b/geography/opencpn/patches/patch-src_tcmgr.cpp
deleted file mode 100644
index 3e751c96429..00000000000
--- a/geography/opencpn/patches/patch-src_tcmgr.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-src_tcmgr.cpp,v 1.2 2015/01/22 12:34:15 bouyer Exp $
-
-64bit time_t fix
-Reported in FS#1403
-
---- src/tcmgr.cpp.orig 2014-05-26 21:26:36.000000000 +0200
-+++ src/tcmgr.cpp 2014-05-26 21:30:22.000000000 +0200
-@@ -518,7 +518,7 @@
- f += fact * w[n] * (fr[deriv-n] - fl[deriv-n]);
- fact *= (double)(deriv - n)/(n+1) * (1.0/TIDE_BLEND_TIME);
- }
-- printf(" %ld %g %g %g %g\n", t, blend, fr[0], fl[0], f);
-+ printf(" %ld %g %g %g %g\n", (long)t, blend, fr[0], fl[0], f);
- return f;
- }
-