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.
This commit is contained in:
parent
a250792202
commit
65c250699f
2 changed files with 12 additions and 8 deletions
|
@ -42,7 +42,7 @@ class Glib(Package):
|
||||||
depends_on('autoconf', type='build')
|
depends_on('autoconf', type='build')
|
||||||
depends_on('automake', type='build')
|
depends_on('automake', type='build')
|
||||||
depends_on('libtool', 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('libffi')
|
||||||
depends_on('zlib')
|
depends_on('zlib')
|
||||||
depends_on('gettext')
|
depends_on('gettext')
|
||||||
|
|
|
@ -30,23 +30,27 @@ class PkgConfig(Package):
|
||||||
and libraries"""
|
and libraries"""
|
||||||
|
|
||||||
homepage = "http://www.freedesktop.org/wiki/Software/pkg-config/"
|
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.29.1', 'f739a28cae4e0ca291f82d1d41ef107d')
|
||||||
version('0.28', 'aa3c86e67551adc3ac865160e34a2a0d')
|
version('0.28', 'aa3c86e67551adc3ac865160e34a2a0d')
|
||||||
|
|
||||||
parallel = False
|
parallel = False
|
||||||
|
variant('internal_glib', default=True,
|
||||||
|
description='Builds with internal glib')
|
||||||
|
|
||||||
# The following patch is needed for gcc-6.1
|
# The following patch is needed for gcc-6.1
|
||||||
patch('g_date_strftime.patch')
|
patch('g_date_strftime.patch')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
configure("--prefix={0}".format(prefix),
|
args = ["--prefix={0}".format(prefix),
|
||||||
"--enable-shared",
|
"--enable-shared"]
|
||||||
# There's a bootstrapping problem here;
|
if "+internal_glib" in spec:
|
||||||
# glib uses pkg-config as well, so break
|
# There's a bootstrapping problem here;
|
||||||
# the cycle by using the internal glib.
|
# glib uses pkg-config as well, so break
|
||||||
"--with-internal-glib")
|
# the cycle by using the internal glib.
|
||||||
|
args.append("--with-internal-glib")
|
||||||
|
configure(*args)
|
||||||
|
|
||||||
make()
|
make()
|
||||||
make("install")
|
make("install")
|
||||||
|
|
Loading…
Reference in a new issue