From 016382ea4f4eba2c1905d16ceb176246880f8044 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 13 Mar 2025 14:11:23 -0400 Subject: [PATCH] fix(build): using mesons built in patch system the previous custom patch system failed based on order sometimes. We now use mesons build in patch system which guarenees patch order application --- build-config/mfem/meson.build | 10 +--------- subprojects/mfem.wrap | 3 ++- .../packagefiles}/mfem/disable_mfem_selfcheck.patch | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) rename {build-config => subprojects/packagefiles}/mfem/disable_mfem_selfcheck.patch (95%) diff --git a/build-config/mfem/meson.build b/build-config/mfem/meson.build index 7152d04..ff60430 100644 --- a/build-config/mfem/meson.build +++ b/build-config/mfem/meson.build @@ -1,13 +1,5 @@ patchFile = files('disable_mfem_selfcheck.patch') -patch_check = run_command('grep', '-q', 'MFEM_CHECK_TARGET_NAME', 'subprojects/mfem/CMakeLists.txt', check: false) -if patch_check.returncode() == 0 - message('Patching MFEM CMakeLists.txt to remove self checks') - run_command('patch', '-p4', '-d', '../../subprojects/mfem', '-i', patchFile[0].full_path(), check: true) -else - message('MFEM CMakeLists.txt already patched') -endif - mfem_cmake_options = cmake.subproject_options() mfem_cmake_options.add_cmake_defines({ 'MFEM_ENABLE_EXAMPLES': 'OFF', @@ -20,4 +12,4 @@ mfem_sp = cmake.subproject( 'mfem', options: mfem_cmake_options) mfem_dep = mfem_sp.dependency('mfem') -add_project_arguments('-I' + meson.current_build_dir() + '/subprojects/mfem/__CMake_build/config', language: 'cpp') \ No newline at end of file +add_project_arguments('-I' + meson.current_build_dir() + '/subprojects/mfem/__CMake_build/config', language: 'cpp') diff --git a/subprojects/mfem.wrap b/subprojects/mfem.wrap index 43c167b..dc374af 100644 --- a/subprojects/mfem.wrap +++ b/subprojects/mfem.wrap @@ -1,5 +1,6 @@ [wrap-git] url = https://github.com/mfem/mfem.git revision = master +diff_files = mfem/disable_mfem_selfcheck.patch -[cmake] \ No newline at end of file +[cmake] diff --git a/build-config/mfem/disable_mfem_selfcheck.patch b/subprojects/packagefiles/mfem/disable_mfem_selfcheck.patch similarity index 95% rename from build-config/mfem/disable_mfem_selfcheck.patch rename to subprojects/packagefiles/mfem/disable_mfem_selfcheck.patch index 8e438c0..9931390 100644 --- a/build-config/mfem/disable_mfem_selfcheck.patch +++ b/subprojects/packagefiles/mfem/disable_mfem_selfcheck.patch @@ -1,4 +1,4 @@ ---- subprojects/mfem/CMakeLists.txt 2025-02-12 15:54:52.454728232 -0500 +--- mfem/CMakeLists.txt 2025-02-12 15:54:52.454728232 -0500 +++ CMakeLists.txt.bak 2025-02-12 16:08:06.654542689 -0500 @@ -765,7 +765,7 @@ if (MFEM_ENABLE_EXAMPLES)