diff --git a/var/spack/repos/builtin/packages/openbabel/cmake-time.patch b/var/spack/repos/builtin/packages/openbabel/cmake-time.patch new file mode 100644 index 0000000000..bc55894ff6 --- /dev/null +++ b/var/spack/repos/builtin/packages/openbabel/cmake-time.patch @@ -0,0 +1,15 @@ +diff --git a/src/config.h.cmake b/src/config.h.cmake +index 1c59c6769..26e5dde94 100644 +--- a/src/config.h.cmake ++++ b/src/config.h.cmake +@@ -182,8 +182,8 @@ + #define OB_MODULE_PATH "@OB_MODULE_PATH@" + + #ifndef TIME_WITH_SYS_TIME +- #ifdef HAVE_SYS_TIME +- #ifdef HAVE_TIME ++ #ifdef HAVE_SYS_TIME_H ++ #ifdef HAVE_TIME_H + #define TIME_WITH_SYS_TIME 1 + #else + #define TIME_WITH_SYS_TIME 0 diff --git a/var/spack/repos/builtin/packages/openbabel/package.py b/var/spack/repos/builtin/packages/openbabel/package.py index 65cff9e35c..1d028565aa 100644 --- a/var/spack/repos/builtin/packages/openbabel/package.py +++ b/var/spack/repos/builtin/packages/openbabel/package.py @@ -58,6 +58,9 @@ class Openbabel(CMakePackage): # Convert tabs to spaces. Allows unit tests to pass patch("testpdbformat-tabs-to-spaces.patch", when="@:2.4.1") + # https://github.com/openbabel/openbabel/pull/2493 + patch("cmake-time.patch", when="@3.1.1") + def cmake_args(self): spec = self.spec args = []