From 66d5a1e3ed7dd36ff112f744da881009a77acca2 Mon Sep 17 00:00:00 2001 From: Manuel Jung Date: Thu, 30 Apr 2026 14:39:02 +0200 Subject: [PATCH] opencpn: 5.12.4 -> 5.14.0 --- pkgs/applications/misc/opencpn/default.nix | 6 +- .../misc/opencpn/fix-clang20.patch | 82 ------------------- 2 files changed, 2 insertions(+), 86 deletions(-) delete mode 100644 pkgs/applications/misc/opencpn/fix-clang20.patch diff --git a/pkgs/applications/misc/opencpn/default.nix b/pkgs/applications/misc/opencpn/default.nix index 1ae9cdb2a8ec..6fe8c40be81f 100644 --- a/pkgs/applications/misc/opencpn/default.nix +++ b/pkgs/applications/misc/opencpn/default.nix @@ -50,18 +50,16 @@ stdenv.mkDerivation (finalAttrs: { pname = "opencpn"; - version = "5.12.4"; + version = "5.14.0"; src = fetchFromGitHub { owner = "OpenCPN"; repo = "OpenCPN"; rev = "Release_${finalAttrs.version}"; - hash = "sha256-1JCb2aYyjaiUvtYkBFtEdlClmiMABN3a/Hts9V1sbgc="; + hash = "sha256-2yCVv1wRkmRJ2FBwg1CJ9xkXUPx0TPSkRHiNZXaMJZQ="; }; patches = [ - # https://github.com/OpenCPN/OpenCPN/pull/4900 - ./fix-clang20.patch ]; postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' diff --git a/pkgs/applications/misc/opencpn/fix-clang20.patch b/pkgs/applications/misc/opencpn/fix-clang20.patch deleted file mode 100644 index cfc5e5c3f9f8..000000000000 --- a/pkgs/applications/misc/opencpn/fix-clang20.patch +++ /dev/null @@ -1,82 +0,0 @@ -From cb5d28c48c814454182a5169e852f2596ba018ae Mon Sep 17 00:00:00 2001 -From: Ihar Hrachyshka -Date: Thu, 13 Nov 2025 22:25:56 -0500 -Subject: [PATCH] Fix clang 20 build failure (-Wnontrivial-memcall), attempt 2 - -The previous attempt [1] resulted in -Werror=use-after-free violation -when built with gcc on bookworm because `*this` triggered the class -destructor, calling `free` on an uninitialized pointer. - -In this new patch, we are going to use an explicit initializer list to -initialize all class members with zero values. - -[1] d3eb15de1e5aa8f85890d5c83cbc025ac7a467be ---- - gui/src/IDX_entry.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 51 insertions(+), 1 deletion(-) - -diff --git a/gui/src/IDX_entry.cpp b/gui/src/IDX_entry.cpp -index 726833ccc..46923d633 100644 ---- a/gui/src/IDX_entry.cpp -+++ b/gui/src/IDX_entry.cpp -@@ -29,6 +29,56 @@ - - WX_DEFINE_OBJARRAY(ArrayOfIDXEntry); - --IDX_entry::IDX_entry() { memset(this, 0, sizeof(IDX_entry)); } -+IDX_entry::IDX_entry() -+ : source_data_type(SOURCE_TYPE_UNKNOWN), -+ pDataSource(nullptr), -+ IDX_rec_num(0), -+ IDX_type(0), -+ IDX_lon(0.0), -+ IDX_lat(0.0), -+ IDX_ht_time_off(0), -+ IDX_ht_mpy(0.0f), -+ IDX_ht_off(0.0f), -+ IDX_lt_time_off(0), -+ IDX_lt_mpy(0.0f), -+ IDX_lt_off(0.0f), -+ IDX_sta_num(0), -+ IDX_flood_dir(0), -+ IDX_ebb_dir(0), -+ IDX_Useable(0), -+ Valid15(0), -+ Value15(0.0f), -+ Dir15(0.0f), -+ Ret15(false), -+ IDX_tzname(nullptr), -+ IDX_ref_file_num(0), -+ IDX_ref_dbIndex(0), -+ max_amplitude(0.0), -+ have_offsets(0), -+ station_tz_offset(0), -+ IDX_time_zone(0), -+ pref_sta_data(nullptr), -+ num_nodes(0), -+ num_csts(0), -+ num_epochs(0), -+ m_cst_speeds(nullptr), -+ m_cst_nodes(nullptr), -+ m_cst_epochs(nullptr), -+ m_work_buffer(nullptr), -+ first_year(0), -+ epoch(0), -+ epoch_year(0), -+ current_depth(0), -+ b_skipTooDeep(false), -+ recent_highlow_calc_time(0), -+ recent_high_level(0.0f), -+ recent_high_time(0), -+ recent_low_level(0.0f), -+ recent_low_time(0) { -+ memset(source_ident, 0, sizeof(source_ident)); -+ memset(IDX_zone, 0, sizeof(IDX_zone)); -+ memset(IDX_station_name, 0, sizeof(IDX_station_name)); -+ memset(IDX_reference_name, 0, sizeof(IDX_reference_name)); -+} - - IDX_entry::~IDX_entry() { free(IDX_tzname); } --- -2.51.0 -