unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob f9898748c7601ec3d050d3db0e86e19172a9a217 3470 bytes (raw)
name: gnu/packages/patches/mfem-remove-source-dir-refs.patch 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
 
From 0ad647e045e9cbe456ad0f5f3bdb6e015566e067 Mon Sep 17 00:00:00 2001
From: "Paul A. Patience" <paul@apatience.com>
Date: Thu, 28 Mar 2024 13:22:48 -0400
Subject: [PATCH 1/2] Remove references to MFEM_SOURCE_DIR

---
 config/cmake/config.hpp.in  | 3 ---
 config/config.hpp.in        | 3 ---
 config/config.mk.in         | 1 -
 fem/ceed/interface/util.cpp | 8 +-------
 general/device.cpp          | 6 +-----
 5 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/config/cmake/config.hpp.in b/config/cmake/config.hpp.in
index 7cb2a958d..13f13c48d 100644
--- a/config/cmake/config.hpp.in
+++ b/config/cmake/config.hpp.in
@@ -30,9 +30,6 @@
 #define MFEM_VERSION_MINOR (((MFEM_VERSION)/100)%100)
 #define MFEM_VERSION_PATCH ((MFEM_VERSION)%100)
 
-// MFEM source directory.
-#define MFEM_SOURCE_DIR "@MFEM_SOURCE_DIR@"
-
 // MFEM install directory.
 #define MFEM_INSTALL_DIR "@MFEM_INSTALL_DIR@"
 
diff --git a/config/config.hpp.in b/config/config.hpp.in
index 39d7737c7..dbee1f32f 100644
--- a/config/config.hpp.in
+++ b/config/config.hpp.in
@@ -30,9 +30,6 @@
 #define MFEM_VERSION_MINOR (((MFEM_VERSION)/100)%100)
 #define MFEM_VERSION_PATCH ((MFEM_VERSION)%100)
 
-// The absolute path of the MFEM source prefix.
-// #define MFEM_SOURCE_DIR "@MFEM_SOURCE_DIR@"
-
 // The absolute path of the MFEM installation prefix.
 // #define MFEM_INSTALL_DIR "@MFEM_INSTALL_DIR@"
 
diff --git a/config/config.mk.in b/config/config.mk.in
index 303750bf5..d2f538666 100644
--- a/config/config.mk.in
+++ b/config/config.mk.in
@@ -12,7 +12,6 @@
 # Variables corresponding to defines in config.hpp (YES, NO, or value)
 MFEM_VERSION           = @MFEM_VERSION@
 MFEM_VERSION_STRING    = @MFEM_VERSION_STRING@
-MFEM_SOURCE_DIR        = @MFEM_SOURCE_DIR@
 MFEM_INSTALL_DIR       = @MFEM_INSTALL_DIR@
 MFEM_GIT_STRING        = @MFEM_GIT_STRING@
 MFEM_USE_MPI           = @MFEM_USE_MPI@
diff --git a/fem/ceed/interface/util.cpp b/fem/ceed/interface/util.cpp
index d122c2ab5..f2bc900a5 100644
--- a/fem/ceed/interface/util.cpp
+++ b/fem/ceed/interface/util.cpp
@@ -257,20 +257,14 @@ const std::string &GetCeedPath()
    if (ceed_path.empty())
    {
       const char *install_dir = MFEM_INSTALL_DIR "/include/mfem/fem/ceed";
-      const char *source_dir = MFEM_SOURCE_DIR "/fem/ceed";
       struct_stat m_stat;
       if (stat(install_dir, &m_stat) == 0 && S_ISDIR(m_stat.st_mode))
       {
          ceed_path = install_dir;
       }
-      else if (stat(source_dir, &m_stat) == 0 && S_ISDIR(m_stat.st_mode))
-      {
-         ceed_path = source_dir;
-      }
       else
       {
-         MFEM_ABORT("Cannot find libCEED kernels in MFEM_INSTALL_DIR or "
-                    "MFEM_SOURCE_DIR");
+         MFEM_ABORT("Cannot find libCEED kernels in MFEM_INSTALL_DIR");
       }
       // Could be useful for debugging:
       // out << "Using libCEED dir: " << ceed_path << std::endl;
diff --git a/general/device.cpp b/general/device.cpp
index ccee71cd7..a68ba7191 100644
--- a/general/device.cpp
+++ b/general/device.cpp
@@ -464,13 +464,9 @@ static void OccaDeviceSetup(const int dev)
    {
       mfemDir = MFEM_INSTALL_DIR "/include/mfem/";
    }
-   else if (occa::io::exists(MFEM_SOURCE_DIR))
-   {
-      mfemDir = MFEM_SOURCE_DIR;
-   }
    else
    {
-      MFEM_ABORT("Cannot find OCCA kernels in MFEM_INSTALL_DIR or MFEM_SOURCE_DIR");
+      MFEM_ABORT("Cannot find OCCA kernels in MFEM_INSTALL_DIR");
    }
 
    occa::io::addLibraryPath("mfem", mfemDir);
-- 
2.41.0


debug log:

solving f9898748c7 ...
found f9898748c7 in https://yhetil.org/guix-patches/5a802d6de248452445b9a7671b2e28eef8259471.1711686959.git.paul@apatience.com/ ||
	https://yhetil.org/guix-patches/a9111c38f3124d6b4c7fb4da8bf8dbfad318f1af.1712079203.git.paul@apatience.com/

applying [1/1] https://yhetil.org/guix-patches/5a802d6de248452445b9a7671b2e28eef8259471.1711686959.git.paul@apatience.com/
diff --git a/gnu/packages/patches/mfem-remove-source-dir-refs.patch b/gnu/packages/patches/mfem-remove-source-dir-refs.patch
new file mode 100644
index 0000000000..f9898748c7

1:27: trailing whitespace.
 
1:33: trailing whitespace.
 
1:41: trailing whitespace.
 
1:47: trailing whitespace.
 
1:103: trailing whitespace.
 
Checking patch gnu/packages/patches/mfem-remove-source-dir-refs.patch...
Applied patch gnu/packages/patches/mfem-remove-source-dir-refs.patch cleanly.
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.

skipping https://yhetil.org/guix-patches/a9111c38f3124d6b4c7fb4da8bf8dbfad318f1af.1712079203.git.paul@apatience.com/ for f9898748c7
index at:
100644 f9898748c7601ec3d050d3db0e86e19172a9a217	gnu/packages/patches/mfem-remove-source-dir-refs.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).