summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-06-26 22:28:07 -0700
committerGitHub <noreply@github.com>2016-06-26 22:28:07 -0700
commitc096aa9557ffa5fc2932bdd51dfd5728a4e557cb (patch)
tree4e7883029600c780c543ab7a2b23409b395f383e /var
parent18222de7b6a6c6038f8a48c6544260f067d8c129 (diff)
parent66aaaa17512dbb2a72333e62f0166557785d4dbf (diff)
downloadspack-c096aa9557ffa5fc2932bdd51dfd5728a4e557cb.tar.gz
spack-c096aa9557ffa5fc2932bdd51dfd5728a4e557cb.tar.bz2
spack-c096aa9557ffa5fc2932bdd51dfd5728a4e557cb.tar.xz
spack-c096aa9557ffa5fc2932bdd51dfd5728a4e557cb.zip
Merge pull request #997 from glennpj/glib_gcc
Get glib to compile with gcc-6.1
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/glib/g_date_strftime.patch34
-rw-r--r--var/spack/repos/builtin/packages/glib/package.py8
2 files changed, 40 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/glib/g_date_strftime.patch b/var/spack/repos/builtin/packages/glib/g_date_strftime.patch
new file mode 100644
index 0000000000..532c743277
--- /dev/null
+++ b/var/spack/repos/builtin/packages/glib/g_date_strftime.patch
@@ -0,0 +1,34 @@
+From 00148329967adb196138372771052a3f606a6ea3 Mon Sep 17 00:00:00 2001
+From: coypu <coypu@sdf.org>
+Date: Wed, 2 Mar 2016 19:43:10 +0200
+Subject: [PATCH 2/2] gdate: Suppress string format literal warning
+
+Newer versions of GCC emit an error here, but we know it's safe.
+https://bugzilla.gnome.org/761550
+---
+ glib/gdate.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/glib/gdate.c b/glib/gdate.c
+index 4aece02..92c34d2 100644
+--- a/glib/gdate.c
++++ b/glib/gdate.c
+@@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d,
+ *
+ * Returns: number of characters written to the buffer, or 0 the buffer was too small
+ */
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wformat-nonliteral"
++
+ gsize
+ g_date_strftime (gchar *s,
+ gsize slen,
+@@ -2549,3 +2552,5 @@ g_date_strftime (gchar *s,
+ return retval;
+ #endif
+ }
++
++#pragma GCC diagnostic pop
+--
+2.7.1
+
diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py
index b146ea63d8..342a61a6a1 100644
--- a/var/spack/repos/builtin/packages/glib/package.py
+++ b/var/spack/repos/builtin/packages/glib/package.py
@@ -25,20 +25,24 @@
from spack import *
import sys
+
class Glib(Package):
"""The GLib package contains a low-level libraries useful for
providing data structure handling for C, portability wrappers
and interfaces for such runtime functionality as an event loop,
threads, dynamic loading and an object system."""
homepage = "https://developer.gnome.org/glib/"
- url = "http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz"
+ url = "http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz"
version('2.42.1', '89c4119e50e767d3532158605ee9121a')
depends_on("libffi")
depends_on("zlib")
depends_on("pkg-config")
- depends_on('gettext', sys.platform=='darwin')
+ depends_on('gettext', sys.platform == 'darwin')
+
+ # The following patch is needed for gcc-6.1
+ patch('g_date_strftime.patch')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)