Skip to content
Commits on Source (11)
SET(VERSION_MAJOR "4")
SET(VERSION_MINOR "8")
SET(VERSION_PATCH "5")
SET(VERSION_PATCH "6")
SET(VERSION_DATE "2018-08-02")
opencpn (4.8.6+dfsg.1-1) unstable; urgency=medium
opencpn (4.8.6~20180801.8d20a06+dfsg.1-1) unstable; urgency=medium
* New upstream version
* Fix ITP bugs. (closes: #907065, closes: #538067).
* README.harmonics: dropped, we now use the opencpn data.
* README.lucid: dropped, outdated.
* Dropped all existing patches (outdated).
* Added ten patches (0001..0010) backported from current upstream/master.
* compat level bumped to 11.
* Drop all existing patches (outdated).
* compat level bumped to 9.
* The copyright file is updated and now also supports the repacked source,
but #831870 makes it necessary to use get-orig-source.
* Add 14 patches (0001..0014) backported from current upstream/master,
mostly build fixes.
* Add two patches currently in an upstream PR (0015, 0016).
* Add one downstream patch 0017.
* Patching includes flexible freedesktop plugin paths, see new manpage.
* The manpage which used to be a debian patch is upstreamed.
* The -doc package is dropped in favor of downloading the manual from
the opencon website. Added patch providing a HTML pointer-to-docs page.
the opencpn website. Downstream patch provides HTML pointer-to-docs page.
* A large number of new build dependencies.
* The -plugins package is dropped, opencpn is not usable without the
default, limited set of plugins.
* The copyright file is updated and now also supports creating a tarball
without sources unusable in the Debian context with get-orig-source.
* The manpage which used to be a debian patch is upstreamed.
* A debian/upstream/metadata file added.
* Closing ITP. (Closes: #907065)
* A debian/upstream/metadata file is added.
-- Alec Leamas <leamas.alec@gmail.com> Sat, 06 Oct 2018 13:38:05 -0400
......
......@@ -3,7 +3,7 @@ Maintainer: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>
Uploaders: Alec Leamas <leamas.alec@gmail.com>
Section: misc
Priority: optional
Build-Depends: debhelper (>= 11),
Build-Depends: debhelper (>= 9),
cmake,
desktop-file-utils,
libarchive-dev,
......@@ -12,15 +12,15 @@ Build-Depends: debhelper (>= 11),
libelf-dev,
libexif-dev,
libgdk-pixbuf2.0-dev,
libgtk-3-dev,
libgtk2.0-dev,
liblz4-dev,
liblzma-dev,
libpango1.0-dev,
libsqlite3-dev,
libtinyxml-dev,
libunarr-dev,
libwxgtk3.0-dev,
libwxgtk3.0-gtk3-dev,
# libwxsvg-dev, ## under review.
libwxsvg-dev,
portaudio19-dev
Standards-Version: 4.2.1
Homepage: http://opencpn.org
......@@ -34,8 +34,9 @@ Depends:
bzip2,
wx3.0-i18n,
${shlibs:Depends}, ${misc:Depends}
Breaks: opencpn-plugins (<< 4.8.6)
Replaces: opencpn-plugins (<< 4.8.6)
Breaks: opencpn-plugins (<< 4.8.6~20180801.8d20a06+dfsg.1)
Replaces: opencpn-plugins (<< 4.8.6~20180801.8d20a06+dfsg.1)
Suggests: binutils
Description: Open Source Chartplotter and Marine GPS Navigation Software
Chart Plotter and Navigational software program for use underway
or as a planning tool. Developed by a team of active sailors using real
......@@ -63,6 +64,6 @@ Description: Open Source Chartplotter and Marine GPS Navigation Software (data)
Package: opencpn-plugins
Architecture: all
Depends: ${misc:Depends}, opencpn (>= 4.8.6)
Depends: ${misc:Depends}, opencpn (>= 4.8.6~20180801.8d20a06+dfsg.1)
Description: Open Source Chartplotter and Marine GPS Navigation Software (transition)
This package is a transitional, empty package.
......@@ -3,15 +3,17 @@ Upstream-Name: OpenCPN
Upstream-Contact: Dave S. Register <bdbcat@yahoo.com>
Source: http://www.opencpn.org
Files-Excluded: .*
buildosx/*
buildandroid/*
buildwin/*
data/doc/*
buildosx*
buildandroid*
buildwin*
data/doc*
include/tinyxml.h
plugins/chartdldr_pi/src/tinyxml/*
plugins/chartdldr_pi/src/unarr/*
plugins/grib_pi/src/bzip2/*
plugins/chartdldr_pi/src/tinyxml*
plugins/chartdldr_pi/src/unarr*
plugins/grib_pi/src/bzip2*
src/texcmp/lz4*
src/tinyxml*
src/wxsvg*
Files: *
Copyright: 2000-2018 The OpenCPN Authors
......@@ -157,11 +159,6 @@ Copyright: 2006, Simon Brown si@sjbrown.co.uk
2013, Bartosz Taudul <wolf.pld@gmail.com>
License: Expat
Files: src/texcmp/lz4/*
Copyright: 2011-2013, Yann Collet.
2011-2014, Yann Collet.
License: BSD-2-clause
Files: Curl.cmake
plugins/chartdldr_pi/cmake/PluginConfigure.cmake
plugins/chartdldr_pi/cmake/PluginInstall.cmake
......@@ -173,7 +170,7 @@ Files: Curl.cmake
plugins/wmm_pi/cmake/PluginConfigure.cmake
plugins/wmm_pi/cmake/PluginInstall.cmake
plugins/wmm_pi/cmake/PluginPackage.cmake
Copyright: APvel Xalian
Copyright: Pavel Xalian
License: GPL-3+
Files: src/garmin/jeeps/*
......@@ -208,59 +205,6 @@ Copyright: 2007, The Khronos Group Inc.
2013, The Khronos Group Inc.
License: MIT-KHRONOS
Files: src/wxsvg/*
Copyright: (c) 2005 Alex Thuering
Comment: GPLv2+ with some relaxed conditions
License: wxWidgets
Files: src/wxsvg/include/wxSVG/ExifHandler.h
src/wxsvg/include/wxSVG/imagsvg.h
src/wxsvg/include/wxSVG/mediadec_ffmpeg.h
src/wxsvg/src/ExifHandler.cpp
src/wxsvg/src/SVGAnimateMotionElement.cpp
src/wxsvg/src/SVGCanvasItem.cpp
src/wxsvg/src/imagsvg.cpp
src/wxsvg/src/mediadec_ffmpeg.cpp
Copyright: (c) Alex Thuering
License: wxWidgets
Files: src/wxsvg/include/wxSVGXML/svgxml.h
src/wxsvg/include/wxSVGXML/svgxmlhelpr.h
src/wxsvg/src/svgxml/svgxml.cpp
src/wxsvg/src/svgxml/svgxmlhelpr.cpp
Copyright: (c) 2000 Vaclav Slavik
License: wxWidgets
Files: src/wxsvg/src/cairo/SVGCanvasImageCairo.cpp
src/wxsvg/src/cairo/SVGCanvasImageCairo.h
src/wxsvg/src/cairo/SVGCanvasTextCairo.cpp
src/wxsvg/src/cairo/SVGCanvasTextCairo.h
Copyright: (c) 2011 Alex Thuering
License: wxWidgets
Files: src/wxsvg/include/wxSVG/SVGAnimatedType.h
src/wxsvg/src/SVGAnimateTransformElement.cpp
src/wxsvg/src/SVGAnimatedType.cpp
Copyright: (c) 2014 Alex Thuering
License: wxWidgets
Files: src/wxsvg/include/wxSVG/SVGCoordinates.h
src/wxsvg/src/SVGFitToViewBox.cpp
Copyright: (c) 2006 Alex Thuering
License: wxWidgets
Files: src/wxsvg/include/wxSVG/NodeListCls.h
Copyright: (c) 2005 Jonathan Hurtrel
License: wxWidgets
Files: src/wxsvg/src/SVGRadialGradientElement.cpp
Copyright: (c) 2012 Alex Thuering
License: wxWidgets
Files: src/wxsvg/src/NodeList.cpp
Copyright: (c) 2005 Edouard TISSERANT
License: wxWidgets
Files: include/crashprint.h src/crashprint.cpp
Copyright: (c) 2004 wxCode
License: wxWidgets
......@@ -341,6 +285,7 @@ License: GPL-3+
License version 3 can be found in the file
`/usr/share/common-licenses/GPL-3'.
License: LGPL-2+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
......@@ -351,6 +296,7 @@ License: LGPL-2+
License version 2 can be found in the file
`/usr/share/common-licenses/LGPL-2'.
License: wxWidgets
wxWindows Library License, Version 3.1
Copyright (c) 1998-2005 Julian Smart, Robert Roebling et al
......@@ -526,6 +472,7 @@ License: Jasper
RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
License: BSD-2-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
......@@ -587,6 +534,7 @@ License: BSD-CMAKE
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
License: MIT-KHRONOS
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
......
usr/share/doc/opencpn/changelog
usr/share/doc/opencpn/copyright
usr/share/opencpn/doc/README.harmonics
usr/share/opencpn/doc/README.bells
......@@ -4,4 +4,8 @@ usr/share/applications/opencpn.desktop
usr/share/icons/hicolor/*/apps/opencpn.*
usr/share/man/man1/opencpn.1
usr/share/metainfo/opencpn.appdata.xml
usr/share/doc/opencpn/changelog
usr/share/doc/opencpn/copyright
usr/share/doc/opencpn/README.harmonics
usr/share/doc/opencpn/README.bells
......@@ -2,6 +2,9 @@ From: Alec Leamas <leamas.alec@gmail.com>
Date: Mon, 27 Aug 2018 06:58:59 +0200
Subject: Build: Add the USE_BUNDLED_DOCS cmake configuration
Origin: upstream, https://github.com/OpenCPN/OpenCPN/commit/180299afd735
Applied-Upstream: 5.0.0
The variable basically acts as a master switch for most bundling
alternatives. The ON alternative blocks the use of system
libraries for (as planned) wxsvg, xwcurl and unarr. If OFF,
......
......@@ -2,6 +2,8 @@ From: Alec Leamas <leamas.alec@gmail.com>
Date: Mon, 27 Aug 2018 07:00:47 +0200
Subject: Build: Use external wxsvg library if available.
Origin: upstream, https://github.com/OpenCPN/OpenCPN/commit/a220a3852557
Applied-Upstream: 5.0.0
---
CMakeLists.txt | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
......
......@@ -2,6 +2,8 @@ From: Alec Leamas <leamas.alec@gmail.com>
Date: Sun, 19 Aug 2018 09:34:31 +0200
Subject: Build: Use system lz4 libs if available.
Origin: upstream, https://github.com/OpenCPN/OpenCPN/commit/9c8c28dbfc4d
Applied-Upstream: 5.0.0
---
CMakeLists.txt | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
......
......@@ -2,6 +2,8 @@ From: Alec Leamas <leamas.alec@gmail.com>
Date: Tue, 28 Aug 2018 23:06:01 +0200
Subject: Build: Use system unarr if available.
Origin: upstream, https://github.com/OpenCPN/OpenCPN/commit/79ed6ead84c
Applied-Upstream: 5.0.0
---
plugins/chartdldr_pi/CMakeLists.txt | 14 ++++++++++++++
1 file changed, 14 insertions(+)
......
From: Alec Leamas <leamas.alec@gmail.com>
Date: Tue, 28 Aug 2018 23:03:11 +0200
Subject: Build: Use system wxcurl if available.
---
CMakeLists.txt | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c26fe24..4bd2dbb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -641,12 +641,20 @@ IF(NOT QT_ANDROID)
src/wxcurl/thread.cpp
src/wxcurl/utils.cpp
)
- ADD_LIBRARY(WXCURL ${SRC_WXCURL})
- INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/wxcurl)
- SET(EXTRA_LIBS ${EXTRA_LIBS} WXCURL)
+ INCLUDE( FindPkgConfig )
+ PKG_SEARCH_MODULE(SYS_WXCURL libwxcurl wxcurl)
+ IF (SYS_WXCURL_FOUND AND USE_BUNDLED_LIBS MATCHES "OFF")
+ message (STATUS "Building with system wxcurl")
+ INCLUDE_DIRECTORIES(${SYS_WXCURL_INCLUDE_DIR})
+ SET(EXTRA_LIBS ${EXTRA_LIBS} ${SYS_WXCURL_LIBRARIES})
+ ELSE (SYS_WXCURL_FOUND AND USE_BUNDLED_LIBS MATCHES "OFF")
+ message (STATUS "Building with bundled wxcurl")
+ ADD_LIBRARY(WXCURL ${SRC_WXCURL})
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/wxcurl)
+ SET(EXTRA_LIBS ${EXTRA_LIBS} WXCURL)
+ ENDIF (SYS_WXCURL_FOUND AND USE_BUNDLED_LIBS MATCHES "OFF")
+
SET(EXTRA_LIBS ${EXTRA_LIBS} ${CURL_LIBRARIES})
-
- MESSAGE (STATUS "wxCurl configured...")
MESSAGE (STATUS "CURL_LIBRARIES:" ${CURL_LIBRARIES})
IF(WIN32 AND OCPN_USE_EXTERN_CURL)
......@@ -2,6 +2,9 @@ From: Alec Leamas <leamas.alec@gmail.com>
Date: Tue, 28 Aug 2018 08:50:01 +0200
Subject: Build: Streamline some diagnostics, print cmake version.
Origin: upstream https://github.com/OpenCPN/OpenCPN/commit/d4059ec067567
Applied-Upstream: 5.0.0
cmake version is needed when building on remote builders.
Change messages about "library not found" the more
meaningful "using bundled library...". Use the term bundled
......@@ -12,7 +15,7 @@ consistently.
2 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4bd2dbb..b702c42 100644
index c26fe24..1117a72 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,6 +40,7 @@ ENDIF (COMMAND cmake_policy)
......@@ -34,7 +37,7 @@ index 4bd2dbb..b702c42 100644
ENDIF(OCPN_USE_EXTERN_CURL)
SET(SRC_WXCURL
src/wxcurl/base.cpp
@@ -1271,13 +1272,13 @@ ENDIF(OPENGL_FOUND)
@@ -1263,13 +1264,13 @@ ENDIF(OPENGL_FOUND)
IF(TINYXML_FOUND)
......
......@@ -2,6 +2,9 @@ From: Alec Leamas <leamas@nowhere.net>
Date: Mon, 30 Jul 2018 13:18:12 -0400
Subject: CMakelists: Fix FTBS on Debian sid (+ likely other gtk3 platforms)
Origin: upstream https://github.com/OpenCPN/OpenCPN/commit/cb614812626d
Applied-Upstream: 5.0.0
On platforms using gtk3, invoke FIND_PACKAGE(wxWidgets) with proper
options to handle those who have mgtk2 as default, like Debian sid.
Also add the __WXGTK3__ symbol which seems to be missing from the
......@@ -14,7 +17,7 @@ APPLE or QT_ANDROID comes to mind.
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b702c42..4ed9f9f 100644
index 1117a72..cfebf6a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -440,14 +440,16 @@ set (WXWIDGETS_FORCE_VERSION CACHE VERSION "Force usage of a specific wxWidgets
......@@ -40,7 +43,7 @@ index b702c42..4ed9f9f 100644
MESSAGE (STATUS "Found wxWidgets..." )
MESSAGE (STATUS " wxWidgets Includ: ${wxWidgets_INCLUDE_DIRS}")
MESSAGE (STATUS " wxWidgets Libraries: ${wxWidgets_LIBRARIES}")
@@ -910,6 +912,7 @@ IF(NOT WIN32 AND NOT APPLE AND NOT QT_ANDROID)
@@ -902,6 +904,7 @@ IF(NOT WIN32 AND NOT APPLE AND NOT QT_ANDROID)
ENDIF(NOT OCPN_FORCE_GTK3)
IF(GTK2_FOUND)
......@@ -48,7 +51,7 @@ index b702c42..4ed9f9f 100644
INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
SET(GTK_LIBRARIES ${GTK2_LIBRARIES})
MESSAGE(STATUS "Building against GTK2...")
@@ -917,9 +920,12 @@ IF(NOT WIN32 AND NOT APPLE AND NOT QT_ANDROID)
@@ -909,9 +912,12 @@ IF(NOT WIN32 AND NOT APPLE AND NOT QT_ANDROID)
FIND_PACKAGE(GTK3)
INCLUDE_DIRECTORIES(${GTK3_INCLUDE_DIRS})
SET(GTK_LIBRARIES ${GTK3_LIBRARIES})
......
......@@ -2,6 +2,9 @@ From: Alec Leamas <leamas@nowhere.net>
Date: Sat, 28 Jul 2018 13:04:46 +0200
Subject: Unix: Add a simple manpage.
Origin: upstream https://github.com/OpenCPN/OpenCPN/commit/e1f621a0d9d5
Applied-Upstream: 5.0.0
Adding a manpage is mostly to have a pointer to the documentation on the
web in a standard location. However, it's also a good place for
Linux/unix-specific power user info.
......@@ -14,10 +17,10 @@ Also, Debian requires a manpage.
create mode 100644 opencpn.1
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4ed9f9f..a10dc38 100644
index cfebf6a..6e896a4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2048,6 +2048,8 @@ IF(UNIX)
@@ -2040,6 +2040,8 @@ IF(UNIX)
INSTALL(FILES data/opencpn.png DESTINATION ${PREFIX_DATA}/icons/hicolor/48x48/apps PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
INSTALL(FILES src/bitmaps/other_svg_src/opencpn.svg DESTINATION ${PREFIX_DATA}/icons/hicolor/scalable/apps PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
INSTALL(FILES data/opencpn.desktop DESTINATION ${PREFIX_DATA}/applications PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ )
......
......@@ -2,6 +2,8 @@ From: Alec Leamas <leamas.alec@gmail.com>
Date: Sat, 18 Aug 2018 05:00:57 +0200
Subject: licenses: Fix potfiles copyright notice.
Origin: upstream https://github.com/OpenCPN/OpenCPN/commit/d5806966b9b84
Applied-Upstream: 5.0.0
---
plugins/chartdldr_pi/po/chartdldr_pi.pot | 17 ++++++++---------
plugins/dashboard_pi/po/dashboard_pi.pot | 15 +++++++--------
......
......@@ -2,7 +2,7 @@ From: Alec Leamas <leamas.alec@nowhere.net>
Date: Sat, 15 Sep 2018 21:45:29 -0400
Subject: build: Preserve existing linker flags.
Submitted to upstream at https://github.com/OpenCPN/OpenCPN/pull/1145.
Bug: https://github.com/OpenCPN/OpenCPN/pull/1145.
---
plugins/chartdldr_pi/cmake/PluginConfigure.cmake | 4 ++--
plugins/chartdldr_pi/cmake/PluginInstall.cmake | 2 +-
......
......@@ -2,16 +2,16 @@ From: Alec Leamas <leamas.alec@nowhere.net>
Date: Mon, 17 Sep 2018 10:07:39 -0400
Subject: build: System wxsvg detection bugfix.
Upstream PR: https://github.com/OpenCPN/OpenCPN/pull/1155
Bug: https://github.com/OpenCPN/OpenCPN/pull/1155
---
CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 51b7f01..47375be 100644
index 0b9b5cd..fe7df11 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -885,11 +885,11 @@ IF(OCPN_USE_SVG)
@@ -877,11 +877,11 @@ IF(OCPN_USE_SVG)
endif()
PKG_SEARCH_MODULE(WXSVG libwxsvg wxsvg)
......@@ -25,7 +25,7 @@ index 51b7f01..47375be 100644
message (STATUS "Building with bundled wxsvg includes")
ADD_LIBRARY(WXSVG ${SRC_WXSVG})
TARGET_LINK_LIBRARIES(WXSVG ${SVG_LIBS})
@@ -899,7 +899,7 @@ IF(OCPN_USE_SVG)
@@ -891,7 +891,7 @@ IF(OCPN_USE_SVG)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/wxsvg/src)
set_property(TARGET WXSVG PROPERTY COMPILE_FLAGS "${OBJ_VISIBILITY}")
SET(EXTRA_LIBS ${EXTRA_LIBS} WXSVG)
......
From: Alec Leamas <leamas@nowhere.net>
Date: Tue, 24 Jul 2018 15:57:16 +0200
Subject: Linux: plugin loading: Support multiple plugin directories.
Origin: upstream, https://github.com/OpenCPN/OpenCPN/commit/4b68cc6bd77
Applied-Upstream: 5.0.0
The customary way to load plugins on linux is to have separate
directories for system (package manager), site (/usr/local) and
user (not really well defined). Patch by default supports
%{prefix}/%{lib}/opencpn
/usr/lib/opencpn
/usr/local/lib/opencpn
The first item is the path directly configured in cmake, the others
hardcoded defaults. The list of directories could be modified using the
OPENCPN_PLUGIN_DIRS environment variable, a standard :-separated path.
Docs and data paths are still pending. Usecases includes separately
compiled plugins and flatpak packaging.
---
include/pluginmanager.h | 1 +
src/OCPNPlatform.cpp | 2 --
src/pluginmanager.cpp | 26 ++++++++++++++++++++++++++
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/include/pluginmanager.h b/include/pluginmanager.h
index 93091c7..1609126 100644
--- a/include/pluginmanager.h
+++ b/include/pluginmanager.h
@@ -324,6 +324,7 @@ private:
wxBitmap *BuildDimmedToolBitmap(wxBitmap *pbmp_normal, unsigned char dim_ratio);
bool UpDateChartDataTypes(void);
bool CheckPluginCompatibility(wxString plugin_file);
+ bool LoadPlugInDirectory(const wxString &plugin_dir, bool enabled_plugins, bool b_enable_blackdialog);
MyFrame *pParent;
diff --git a/src/OCPNPlatform.cpp b/src/OCPNPlatform.cpp
index 20459dd..ab7ba9a 100644
--- a/src/OCPNPlatform.cpp
+++ b/src/OCPNPlatform.cpp
@@ -1155,7 +1155,6 @@ wxString &OCPNPlatform::GetPluginDir()
#ifdef __WXMSW__
m_PluginsDir += _T("\\plugins"); // Windows: {exe dir}/plugins
#endif
-
if( g_bportable ) {
m_PluginsDir = GetHomeDir();
m_PluginsDir += _T("plugins");
@@ -1166,7 +1165,6 @@ wxString &OCPNPlatform::GetPluginDir()
wxFileName fdir = wxFileName::DirName(std_path.GetUserConfigDir());
fdir.RemoveLastDir();
m_PluginsDir = fdir.GetPath();
-
#endif
diff --git a/src/pluginmanager.cpp b/src/pluginmanager.cpp
index 389b4ba..2a14eb4 100644
--- a/src/pluginmanager.cpp
+++ b/src/pluginmanager.cpp
@@ -131,6 +131,9 @@ extern bool g_bopengl;
extern ChartGroupArray *g_pGroupArray;
+static const char* const DEFAULT_PLUGIN_DIRS =
+ "/usr/local/lib/opencpn:/usr/lib/opencpn";
+
unsigned int gs_plib_flags;
enum
@@ -305,6 +308,29 @@ PlugInManager::~PlugInManager()
bool PlugInManager::LoadAllPlugIns(const wxString &plugin_dir, bool load_enabled, bool b_enable_blackdialog)
+{
+#ifdef __linux__
+ const char* const envdirs = getenv("OPENCPN_PLUGIN_DIRS");
+ wxString dirs(envdirs ? envdirs : DEFAULT_PLUGIN_DIRS);
+ if (envdirs == 0 && dirs.Find(plugin_dir) == wxNOT_FOUND)
+ dirs = dirs.Append(_T(":") + plugin_dir);
+#else
+ wxString dirs = plugin_dirs;
+#endif
+ wxLogMessage( _T("Plugins loading from ") + dirs);
+ bool any_dir_loaded = false;
+ wxStringTokenizer tokens(dirs, ":");
+ while (tokens.HasMoreTokens()) {
+ wxString dir = tokens.GetNextToken();
+ if (LoadPlugInDirectory(dir, load_enabled, b_enable_blackdialog))
+ any_dir_loaded = true;
+ }
+ return any_dir_loaded;
+}
+
+
+// Static helper function: loads all plugins from a single directory
+bool PlugInManager::LoadPlugInDirectory(const wxString &plugin_dir, bool load_enabled, bool b_enable_blackdialog)
{
pConfig->SetPath( _T("/PlugIns/") );
SetPluginOrder( pConfig->Read( _T("PluginOrder"), wxEmptyString ) );