summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2016-08-25 11:00:58 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2016-09-06 16:00:21 -0400
commita05a6456d5aa69fdc369b99134227a4958b9832e (patch)
tree6d71f9e01e9dff2780b96a972f2e5159c792a9d5 /var
parentb810a113af9ce32b7e83d122187878cf1b014631 (diff)
downloadspack-a05a6456d5aa69fdc369b99134227a4958b9832e.tar.gz
spack-a05a6456d5aa69fdc369b99134227a4958b9832e.tar.bz2
spack-a05a6456d5aa69fdc369b99134227a4958b9832e.tar.xz
spack-a05a6456d5aa69fdc369b99134227a4958b9832e.zip
glib: build on macos
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/glib/no-Werror=format-security.patch16
-rw-r--r--var/spack/repos/builtin/packages/glib/package.py19
2 files changed, 34 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/glib/no-Werror=format-security.patch b/var/spack/repos/builtin/packages/glib/no-Werror=format-security.patch
new file mode 100644
index 0000000000..cfcfe424be
--- /dev/null
+++ b/var/spack/repos/builtin/packages/glib/no-Werror=format-security.patch
@@ -0,0 +1,16 @@
+--- a/configure.ac 2016-08-16 11:57:34.000000000 -0400
++++ b/configure.ac 2016-08-16 11:57:36.000000000 -0400
+@@ -3357,11 +3357,11 @@
+ enable_compile_warnings=yes)
+ AS_IF([test "x$enable_compile_warnings" = xyes], [
+ CC_CHECK_FLAGS_APPEND([GLIB_WARN_CFLAGS], [CFLAGS], [\
+ -Wall -Wstrict-prototypes -Werror=declaration-after-statement \
+ -Werror=missing-prototypes -Werror=implicit-function-declaration \
+- -Werror=pointer-arith -Werror=init-self -Werror=format-security \
+- -Werror=format=2 -Werror=missing-include-dirs])
++ -Werror=pointer-arith -Werror=init-self \
++ -Werror=missing-include-dirs])
+ ])
+ AC_SUBST(GLIB_WARN_CFLAGS)
+
+ #
diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py
index 94ef95e7ab..3e687ccd95 100644
--- a/var/spack/repos/builtin/packages/glib/package.py
+++ b/var/spack/repos/builtin/packages/glib/package.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import os
class Glib(Package):
@@ -38,14 +39,20 @@ class Glib(Package):
version('2.48.1', '67bd3b75c9f6d5587b457dc01cdcd5bb')
version('2.42.1', '89c4119e50e767d3532158605ee9121a')
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+ depends_on('pkg-config', type='build')
depends_on('libffi')
depends_on('zlib')
- depends_on('pkg-config', type='build')
depends_on('gettext')
depends_on('pcre+utf', when='@2.48:')
# The following patch is needed for gcc-6.1
patch('g_date_strftime.patch', when='@2.42.1')
+ # Clang doesn't seem to acknowledge the pragma lines to disable the -Werror
+ # around a legitimate usage.
+ patch('no-Werror=format-security.patch')
def url_for_version(self, version):
"""Handle glib's version-based custom URLs."""
@@ -53,6 +60,16 @@ class Glib(Package):
return url + '/%s/glib-%s.tar.xz' % (version.up_to(2), version)
def install(self, spec, prefix):
+ autoreconf = which("autoreconf")
+ autoreconf("--install", "--verbose", "--force",
+ "-I", "config",
+ "-I", os.path.join(spec['pkg-config'].prefix,
+ "share", "aclocal"),
+ "-I", os.path.join(spec['automake'].prefix,
+ "share", "aclocal"),
+ "-I", os.path.join(spec['libtool'].prefix,
+ "share", "aclocal"),
+ )
configure("--prefix=%s" % prefix)
make()
make("install", parallel=False)