Skip to content
Snippets Groups Projects
Commit 65c25069 authored by Mayeul d'Avezac's avatar Mayeul d'Avezac Committed by Todd Gamblin
Browse files

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.
parent a2507922
No related branches found
No related tags found
No related merge requests found
......@@ -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')
......
......@@ -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")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment