summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorPraveen C <cpraveen@gmail.com>2017-10-25 14:09:32 +0530
committerTodd Gamblin <tgamblin@llnl.gov>2017-10-25 10:39:32 +0200
commit5b9de2eabaac6fc8da98d1580da9d10b6f3697f8 (patch)
treefbc658551de85106e09bd1700a575c9ad9633f0d /var
parent882480fad629f9e98f7b6c83b7dc98ac7d836cc3 (diff)
downloadspack-5b9de2eabaac6fc8da98d1580da9d10b6f3697f8.tar.gz
spack-5b9de2eabaac6fc8da98d1580da9d10b6f3697f8.tar.bz2
spack-5b9de2eabaac6fc8da98d1580da9d10b6f3697f8.tar.xz
spack-5b9de2eabaac6fc8da98d1580da9d10b6f3697f8.zip
Glibc 2.26 does not provide xlocale.h (#5862)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/oce/package.py4
-rw-r--r--var/spack/repos/builtin/packages/oce/xlocale.patch13
2 files changed, 17 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py
index d01b5a4546..e3ad222e85 100644
--- a/var/spack/repos/builtin/packages/oce/package.py
+++ b/var/spack/repos/builtin/packages/oce/package.py
@@ -60,6 +60,10 @@ class Oce(Package):
# https://github.com/tpaviot/oce/commit/61cb965b9ffeca419005bc15e635e67589c421dd.patch
patch('null.patch', when='@0.16:0.17.1')
+ # OCE depends on xlocale.h from glibc-headers but it was removed in 2.26,
+ # see https://github.com/tpaviot/oce/issues/675
+ patch('xlocale.patch', level=0, when='@0.18.1:')
+
# fix build with Xcode 8 "previous definition of CLOCK_REALTIME"
# reported 27 Sep 2016 https://github.com/tpaviot/oce/issues/643
if (platform.system() == "Darwin") and (
diff --git a/var/spack/repos/builtin/packages/oce/xlocale.patch b/var/spack/repos/builtin/packages/oce/xlocale.patch
new file mode 100644
index 0000000000..2c4ba59958
--- /dev/null
+++ b/var/spack/repos/builtin/packages/oce/xlocale.patch
@@ -0,0 +1,13 @@
+--- src/Standard/Standard_CLocaleSentry.hxx.ORIG 2017-08-11 07:51:11.000000000 +0200
++++ src/Standard/Standard_CLocaleSentry.hxx 2017-08-18 01:07:11.639206272 +0200
+@@ -30,7 +30,9 @@
+ #endif
+
+ //! We check _GNU_SOURCE for glibc extensions here and it is always defined by g++ compiler.
+- #if defined(_GNU_SOURCE) && !defined(__ANDROID__)
++ //! Musl libc does not provide xlocale.h
++ //! glibc 2.26+ does not provide xlocale.h (anymore)
++ #if defined(_GNU_SOURCE) && defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 26 && !defined(__ANDROID__)
+ #define HAVE_XLOCALE_H
+ #endif
+ #endif // ifndef HAVE_LOCALE_H