summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMayeul d'Avezac <m.davezac@ucl.ac.uk>2016-10-25 19:08:32 +0100
committerTodd Gamblin <tgamblin@llnl.gov>2016-10-25 11:08:32 -0700
commit65c250699f12fac5deb618e7dd719669e2c65497 (patch)
treeb607971626d528277958b846578aaef908129dd2 /var
parenta250792202087f4798e1dc114d8ea3f5037c4b0f (diff)
downloadspack-65c250699f12fac5deb618e7dd719669e2c65497.tar.gz
spack-65c250699f12fac5deb618e7dd719669e2c65497.tar.bz2
spack-65c250699f12fac5deb618e7dd719669e2c65497.tar.xz
spack-65c250699f12fac5deb618e7dd719669e2c65497.zip
pkg-config variant to use internal glib (#2104)
Pkg-config depends on glib which depends on pkg-config. As a result, pkg-config used to build glib internally. However, this fails on Mac. Building pkg-config with an internal glib is now a variant, turned on by default, and required to build glib.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/glib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/pkg-config/package.py18
2 files changed, 12 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py
index 3e687ccd95..4d8085baf2 100644
--- a/var/spack/repos/builtin/packages/glib/package.py
+++ b/var/spack/repos/builtin/packages/glib/package.py
@@ -42,7 +42,7 @@ class Glib(Package):
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
- depends_on('pkg-config', type='build')
+ depends_on('pkg-config+internal_glib', type='build')
depends_on('libffi')
depends_on('zlib')
depends_on('gettext')
diff --git a/var/spack/repos/builtin/packages/pkg-config/package.py b/var/spack/repos/builtin/packages/pkg-config/package.py
index 45e8e8b74e..a98f65fb07 100644
--- a/var/spack/repos/builtin/packages/pkg-config/package.py
+++ b/var/spack/repos/builtin/packages/pkg-config/package.py
@@ -30,23 +30,27 @@ class PkgConfig(Package):
and libraries"""
homepage = "http://www.freedesktop.org/wiki/Software/pkg-config/"
- url = "http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz"
+ url = "http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz"
version('0.29.1', 'f739a28cae4e0ca291f82d1d41ef107d')
version('0.28', 'aa3c86e67551adc3ac865160e34a2a0d')
parallel = False
+ variant('internal_glib', default=True,
+ description='Builds with internal glib')
# The following patch is needed for gcc-6.1
patch('g_date_strftime.patch')
def install(self, spec, prefix):
- configure("--prefix={0}".format(prefix),
- "--enable-shared",
- # There's a bootstrapping problem here;
- # glib uses pkg-config as well, so break
- # the cycle by using the internal glib.
- "--with-internal-glib")
+ args = ["--prefix={0}".format(prefix),
+ "--enable-shared"]
+ if "+internal_glib" in spec:
+ # There's a bootstrapping problem here;
+ # glib uses pkg-config as well, so break
+ # the cycle by using the internal glib.
+ args.append("--with-internal-glib")
+ configure(*args)
make()
make("install")