From b448a2606ba4fdde086d0d9926ce060a7b50f3b9 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 31 Jul 2026 15:05:13 +0200 Subject: [PATCH] Remove obsolete patches folder The patches for libecl, ert and qwt were applied manually and are no longer referenced by the build system. Also remove the corresponding entry from the repository map documentation. --- docs/agents/repo-map.md | 1 - patches/fix-synthetic-odb-cases.patch | 45 ---------------- patches/install-ert-set-git-sha-to-zero.patch | 30 ----------- patches/install-ert.patch | 49 ----------------- ...uard-null-pointer-access-util_access.patch | 34 ------------ patches/libecl-use-external-actnum.patch | 52 ------------------- patches/libecl_always_export_mapaxes.patch | 25 --------- patches/libecl_dualporo_actnum.patch | 34 ------------ patches/qwt_single_interval_sample_fix.patch | 26 ---------- patches/readme.txt | 9 ---- 10 files changed, 305 deletions(-) delete mode 100644 patches/fix-synthetic-odb-cases.patch delete mode 100644 patches/install-ert-set-git-sha-to-zero.patch delete mode 100644 patches/install-ert.patch delete mode 100644 patches/libecl-guard-null-pointer-access-util_access.patch delete mode 100644 patches/libecl-use-external-actnum.patch delete mode 100644 patches/libecl_always_export_mapaxes.patch delete mode 100644 patches/libecl_dualporo_actnum.patch delete mode 100644 patches/qwt_single_interval_sample_fix.patch delete mode 100644 patches/readme.txt diff --git a/docs/agents/repo-map.md b/docs/agents/repo-map.md index 4eed99b0e6..facfe2480f 100644 --- a/docs/agents/repo-map.md +++ b/docs/agents/repo-map.md @@ -35,7 +35,6 @@ ResInsight/ │ └── class-diagrams/ # PlantUML class diagrams ├── scripts/ # Build and utility scripts ├── tooling/ # Development tools -├── patches/ # Patches for dependencies ├── CMakeLists.txt # Main CMake configuration ├── CMakePresets.json # CMake build presets ├── ResInsightVersion.cmake # Version information diff --git a/patches/fix-synthetic-odb-cases.patch b/patches/fix-synthetic-odb-cases.patch deleted file mode 100644 index 368fb05bd5..0000000000 --- a/patches/fix-synthetic-odb-cases.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 188e8fa023257d7047c576de6160e7c4c4888989 Mon Sep 17 00:00:00 2001 -From: Magne Sjaastad -Date: Thu, 4 Jan 2018 20:29:09 +0100 -Subject: [PATCH] #2317 Apply fix for synthetic odb files - ---- - ThirdParty/Ert/lib/ecl/ecl_rsthead.cpp | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/ThirdParty/Ert/lib/ecl/ecl_rsthead.cpp b/ThirdParty/Ert/lib/ecl/ecl_rsthead.cpp -index e8d9cef..2993b1e 100644 ---- a/ThirdParty/Ert/lib/ecl/ecl_rsthead.cpp -+++ b/ThirdParty/Ert/lib/ecl/ecl_rsthead.cpp -@@ -88,7 +88,10 @@ ecl_rsthead_type * ecl_rsthead_alloc_from_kw( int report_step , const ecl_kw_typ - // The only derived quantity - rsthead->sim_time = rsthead_date( rsthead->day , rsthead->month , rsthead->year ); - } -- rsthead->sim_days = ecl_kw_iget_double( doubhead_kw , DOUBHEAD_DAYS_INDEX ); -+ -+ if (doubhead_kw) -+ rsthead->sim_days = ecl_kw_iget_double( doubhead_kw , DOUBHEAD_DAYS_INDEX ); -+ - if (logihead_kw) - rsthead->dualp = ecl_kw_iget_bool( logihead_kw , LOGIHEAD_DUALP_INDEX); - -@@ -109,12 +112,15 @@ ecl_rsthead_type * ecl_rsthead_alloc_from_kw( int report_step , const ecl_kw_typ - - ecl_rsthead_type * ecl_rsthead_alloc( const ecl_file_view_type * rst_view, int report_step) { - const ecl_kw_type * intehead_kw = ecl_file_view_iget_named_kw( rst_view , INTEHEAD_KW , 0); -- const ecl_kw_type * doubhead_kw = ecl_file_view_iget_named_kw( rst_view , DOUBHEAD_KW , 0); -+ const ecl_kw_type * doubhead_kw = NULL; - const ecl_kw_type * logihead_kw = NULL; - - if (ecl_file_view_has_kw(rst_view, LOGIHEAD_KW)) - logihead_kw = ecl_file_view_iget_named_kw( rst_view , LOGIHEAD_KW , 0); - -+ if (ecl_file_view_has_kw(rst_view, DOUBHEAD_KW)) -+ doubhead_kw = ecl_file_view_iget_named_kw(rst_view, DOUBHEAD_KW, 0); -+ - if (ecl_file_view_has_kw( rst_view , SEQNUM_KW)) { - const ecl_kw_type * seqnum_kw = ecl_file_view_iget_named_kw( rst_view , SEQNUM_KW , 0); - report_step = ecl_kw_iget_int( seqnum_kw , 0); --- -2.10.2.windows.1 - \ No newline at end of file diff --git a/patches/install-ert-set-git-sha-to-zero.patch b/patches/install-ert-set-git-sha-to-zero.patch deleted file mode 100644 index 8b520b3e51..0000000000 --- a/patches/install-ert-set-git-sha-to-zero.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0157e501cdc44ae354dcf1113012a413ce9858c9 Mon Sep 17 00:00:00 2001 -From: Magne Sjaastad -Date: Tue, 22 Jan 2019 07:19:25 +0100 -Subject: [PATCH] System : Set git to zero to avoid recompile on every commit - ---- - ThirdParty/Ert/lib/CMakeLists.txt | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/ThirdParty/Ert/lib/CMakeLists.txt b/ThirdParty/Ert/lib/CMakeLists.txt -index a57e50e21..b0fb796a1 100644 ---- a/ThirdParty/Ert/lib/CMakeLists.txt -+++ b/ThirdParty/Ert/lib/CMakeLists.txt -@@ -183,6 +183,13 @@ target_include_directories(ecl - ${CMAKE_CURRENT_BINARY_DIR}/include - ) - -+ -+if (NOT INSTALL_ERT) -+ # set git info to zero, to avoid recompile of libecl files at every commit -+ set(GIT_COMMIT 0) -+ set(GIT_COMMIT_SHORT 0) -+endif() -+ - target_compile_definitions(ecl PRIVATE - -DGIT_COMMIT=${GIT_COMMIT} - -DGIT_COMMIT_SHORT=${GIT_COMMIT_SHORT} --- -2.20.1.windows.1 - diff --git a/patches/install-ert.patch b/patches/install-ert.patch deleted file mode 100644 index d794f8e25f..0000000000 --- a/patches/install-ert.patch +++ /dev/null @@ -1,49 +0,0 @@ -From cff955fb7f4c0f87ce4164b58a5fd2359f1ee9d7 Mon Sep 17 00:00:00 2001 -From: Magne Sjaastad -Date: Thu, 9 May 2019 09:19:18 +0200 -Subject: [PATCH] tmp - ---- - ThirdParty/Ert/CMakeLists.txt | 5 ++++- - ThirdParty/Ert/lib/CMakeLists.txt | 3 ++- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/ThirdParty/Ert/CMakeLists.txt b/ThirdParty/Ert/CMakeLists.txt -index 36417d18e..c8050a1ca 100644 ---- a/ThirdParty/Ert/CMakeLists.txt -+++ b/ThirdParty/Ert/CMakeLists.txt -@@ -346,6 +346,9 @@ if (ENABLE_PYTHON) - endif() - endif() - --install(EXPORT ecl-config DESTINATION share/cmake/ecl) -+if (INSTALL_ERT) -+ install(EXPORT ecl-config DESTINATION share/cmake/ecl) -+endif() -+ - export(TARGETS ecl FILE eclConfig.cmake) - export(PACKAGE ecl) -diff --git a/ThirdParty/Ert/lib/CMakeLists.txt b/ThirdParty/Ert/lib/CMakeLists.txt -index 079eb127d..ddf3e7821 100644 ---- a/ThirdParty/Ert/lib/CMakeLists.txt -+++ b/ThirdParty/Ert/lib/CMakeLists.txt -@@ -200,7 +200,7 @@ endif () - set_target_properties(ecl PROPERTIES - VERSION ${ECL_VERSION_MAJOR}.${ECL_VERSION_MINOR} - SOVERSION ${ECL_VERSION_MAJOR}) -- -+if (INSTALL_ERT) - install(TARGETS ecl - EXPORT ecl-config - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -@@ -212,6 +212,7 @@ install(DIRECTORY include/ - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ - DESTINATION include - ) -+endif() - - if (NOT BUILD_TESTS) - return () --- -2.21.0.windows.1 - diff --git a/patches/libecl-guard-null-pointer-access-util_access.patch b/patches/libecl-guard-null-pointer-access-util_access.patch deleted file mode 100644 index 9b79b94f89..0000000000 --- a/patches/libecl-guard-null-pointer-access-util_access.patch +++ /dev/null @@ -1,34 +0,0 @@ -From ecec875147b3ccf80be619bfa3c45b84ab4202f7 Mon Sep 17 00:00:00 2001 -From: Magne Sjaastad -Date: Tue, 2 Apr 2019 10:11:47 +0200 -Subject: [PATCH] guard null pointer - ---- - ThirdParty/Ert/lib/util/util.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/ThirdParty/Ert/lib/util/util.c b/ThirdParty/Ert/lib/util/util.c -index b3eab9822..dfcab323f 100644 ---- a/ThirdParty/Ert/lib/util/util.c -+++ b/ThirdParty/Ert/lib/util/util.c -@@ -2153,6 +2153,8 @@ int util_fmove( FILE * stream , long offset , long shift) { - #ifdef HAVE_WINDOWS__ACCESS - - bool util_access(const char * entry, int mode) { -+ if (!entry) return false; -+ - return (_access(entry, mode) == 0); - } - -@@ -2160,6 +2162,8 @@ bool util_access(const char * entry, int mode) { - - #ifdef HAVE_POSIX_ACCESS - bool util_access(const char * entry, mode_t mode) { -+ if (!entry) return false; -+ - return (access(entry, mode) == 0); - } - #endif --- -2.21.0.windows.1 - diff --git a/patches/libecl-use-external-actnum.patch b/patches/libecl-use-external-actnum.patch deleted file mode 100644 index 860f49819f..0000000000 --- a/patches/libecl-use-external-actnum.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 7339186f7288b625bc642a4511e5e626e8832616 Mon Sep 17 00:00:00 2001 -From: Magne Sjaastad -Date: Fri, 5 Apr 2019 11:12:15 +0200 -Subject: [PATCH] patch - ---- - ThirdParty/Ert/lib/ecl/ecl_grid.cpp | 28 ++++++++++++---------------- - 1 file changed, 12 insertions(+), 16 deletions(-) - -diff --git a/ThirdParty/Ert/lib/ecl/ecl_grid.cpp b/ThirdParty/Ert/lib/ecl/ecl_grid.cpp -index 9883cba1b..c01ece639 100644 ---- a/ThirdParty/Ert/lib/ecl/ecl_grid.cpp -+++ b/ThirdParty/Ert/lib/ecl/ecl_grid.cpp -@@ -3021,23 +3021,19 @@ static ecl_grid_type * ecl_grid_alloc_EGRID__( ecl_grid_type * main_grid , const - eclipse_version = main_grid->eclipse_version; - } - -- // If ACTNUM and ext_actnum are not present - that is is interpreted as all active. -- const int * actnum_data; -- std::vector actnum_product; -- if (ecl_file_get_num_named_kw(ecl_file , ACTNUM_KW) > grid_nr) { -- actnum_kw = ecl_file_iget_named_kw( ecl_file , ACTNUM_KW , grid_nr); -- actnum_data = ecl_kw_get_int_ptr(actnum_kw); -- if (ext_actnum) { -- int size = ecl_kw_get_size(actnum_kw); -- actnum_product.resize(size); -- for (int i = 0; i < size; i++) -- actnum_product[i] = actnum_data[i] * ext_actnum[i]; -- actnum_data = actnum_product.data(); -- } -+ /* -+ If ext_actnum is present that is used as ACTNUM, and the file is not checked -+ for an ACTNUM keyword at all. -+ */ -+ const int * actnum_data = NULL; -+ if (ext_actnum) -+ actnum_data = ext_actnum; -+ else { -+ if (ecl_file_get_num_named_kw(ecl_file, ACTNUM_KW) > grid_nr) { -+ actnum_kw = ecl_file_iget_named_kw(ecl_file, ACTNUM_KW, grid_nr); -+ actnum_data = ecl_kw_get_int_ptr(actnum_kw); -+ } - } -- else -- actnum_data = ext_actnum; -- - - if (grid_nr == 0) { - /* MAPAXES and COARSENING only apply to the global grid. */ --- -2.21.0.windows.1 - diff --git a/patches/libecl_always_export_mapaxes.patch b/patches/libecl_always_export_mapaxes.patch deleted file mode 100644 index 0d829c83e3..0000000000 --- a/patches/libecl_always_export_mapaxes.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b5fb3a0199fefb80f2ec1267f78d982a98fa4aa3 Mon Sep 17 00:00:00 2001 -From: Gaute Lindkvist -Date: Mon, 1 Apr 2019 11:39:05 +0200 -Subject: [PATCH] #4259 Make libecl always export MAPAXES if available - ---- - ThirdParty/Ert/lib/ecl/ecl_grid.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ThirdParty/Ert/lib/ecl/ecl_grid.cpp b/ThirdParty/Ert/lib/ecl/ecl_grid.cpp -index ed0830b8f..9883cba1b 100644 ---- a/ThirdParty/Ert/lib/ecl/ecl_grid.cpp -+++ b/ThirdParty/Ert/lib/ecl/ecl_grid.cpp -@@ -6947,7 +6947,7 @@ void ecl_grid_fprintf_grdecl2(ecl_grid_type * grid , FILE * stream , ert_ecl_uni - fprintf(stream , "\n"); - } - -- if (grid->use_mapaxes) { -+ if (grid->mapaxes != NULL) { - ecl_kw_type * mapaxes_kw = ecl_grid_alloc_mapaxes_kw( grid ); - ecl_kw_fprintf_grdecl( mapaxes_kw , stream ); - ecl_kw_free( mapaxes_kw ); --- -2.16.2.windows.1 - diff --git a/patches/libecl_dualporo_actnum.patch b/patches/libecl_dualporo_actnum.patch deleted file mode 100644 index 2c9a1e56ff..0000000000 --- a/patches/libecl_dualporo_actnum.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 978139b8cd9361fa1a5884079e66999ee39ea1bd Mon Sep 17 00:00:00 2001 -From: Magne Sjaastad -Date: Fri, 31 May 2019 14:37:50 +0200 -Subject: [PATCH] helper function for libecl dual porosity - ---- - ThirdParty/Ert/lib/ecl/ecl_kw_functions.cpp | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/ThirdParty/Ert/lib/ecl/ecl_kw_functions.cpp b/ThirdParty/Ert/lib/ecl/ecl_kw_functions.cpp -index d10646fd3..e5d980fb1 100644 ---- a/ThirdParty/Ert/lib/ecl/ecl_kw_functions.cpp -+++ b/ThirdParty/Ert/lib/ecl/ecl_kw_functions.cpp -@@ -143,9 +143,16 @@ ecl_kw_type * ecl_kw_alloc_actnum(const ecl_kw_type * porv_kw, float porv_limit) - const float * porv_values = ecl_kw_get_float_ptr(porv_kw); - int * actnum_values = ecl_kw_get_int_ptr( actnum_kw); - -+ // When PORV is used as criteria, make sure all active cells are assigned both -+ // active matrix and active fracture. This will make sure that both single porosity -+ // models and dual porosity models in initialized with the correct bit mask -+ // See documentation in top of ecl_grid.cpp -+ // -+ const int combinedActnumValueForMatrixAndFracture = CELL_ACTIVE_MATRIX + CELL_ACTIVE_FRACTURE; -+ - for (int i=0; i < size; i++) { - if (porv_values[i] > porv_limit) -- actnum_values[i] = 1; -+ actnum_values[i] = combinedActnumValueForMatrixAndFracture; - else - actnum_values[i] = 0; - } --- -2.21.0.windows.1 - diff --git a/patches/qwt_single_interval_sample_fix.patch b/patches/qwt_single_interval_sample_fix.patch deleted file mode 100644 index c68fb1d8ae..0000000000 --- a/patches/qwt_single_interval_sample_fix.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 08ad8a98db66e2f222554c61ead97cccc31f2531 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Jensen?= -Date: Wed, 4 Jul 2018 09:15:29 +0200 -Subject: [PATCH] Qwt fix. Fix plotting of interval series having only one - sample - ---- - ThirdParty/Qwt/src/qwt_plot_intervalcurve.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ThirdParty/Qwt/src/qwt_plot_intervalcurve.cpp b/ThirdParty/Qwt/src/qwt_plot_intervalcurve.cpp -index 200ea39b5..d61b7978e 100644 ---- a/ThirdParty/Qwt/src/qwt_plot_intervalcurve.cpp -+++ b/ThirdParty/Qwt/src/qwt_plot_intervalcurve.cpp -@@ -298,7 +298,7 @@ const QBrush& QwtPlotIntervalCurve::brush() const - QRectF QwtPlotIntervalCurve::boundingRect() const - { - QRectF rect = QwtPlotSeriesItem::boundingRect(); -- if ( rect.isValid() && orientation() == Qt::Vertical ) -+ if ( rect.width() >= 0.0 && rect.height() >= 0.0 && orientation() == Qt::Vertical ) - rect.setRect( rect.y(), rect.x(), rect.height(), rect.width() ); - - return rect; --- -2.16.2.windows.1 - diff --git a/patches/readme.txt b/patches/readme.txt deleted file mode 100644 index 0a0d7ecc9a..0000000000 --- a/patches/readme.txt +++ /dev/null @@ -1,9 +0,0 @@ - -Command line: -git apply --reject --whitespace=fix patches/fix-synthetic-odb-cases.patch - -Description: -Will fix reading of special Eclipse cases related to synthetic ODB test cases. Required for regression testing. - -Patch is created by : -git format-patch -1 --stdout > patch-file