glib: build on macos
This commit is contained in:
parent
b810a113af
commit
a05a6456d5
@ -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)
|
||||||
|
|
||||||
|
#
|
@ -23,6 +23,7 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
##############################################################################
|
##############################################################################
|
||||||
from spack import *
|
from spack import *
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
class Glib(Package):
|
class Glib(Package):
|
||||||
@ -38,14 +39,20 @@ class Glib(Package):
|
|||||||
version('2.48.1', '67bd3b75c9f6d5587b457dc01cdcd5bb')
|
version('2.48.1', '67bd3b75c9f6d5587b457dc01cdcd5bb')
|
||||||
version('2.42.1', '89c4119e50e767d3532158605ee9121a')
|
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('libffi')
|
||||||
depends_on('zlib')
|
depends_on('zlib')
|
||||||
depends_on('pkg-config', type='build')
|
|
||||||
depends_on('gettext')
|
depends_on('gettext')
|
||||||
depends_on('pcre+utf', when='@2.48:')
|
depends_on('pcre+utf', when='@2.48:')
|
||||||
|
|
||||||
# The following patch is needed for gcc-6.1
|
# The following patch is needed for gcc-6.1
|
||||||
patch('g_date_strftime.patch', when='@2.42.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):
|
def url_for_version(self, version):
|
||||||
"""Handle glib's version-based custom URLs."""
|
"""Handle glib's version-based custom URLs."""
|
||||||
@ -53,6 +60,16 @@ def url_for_version(self, version):
|
|||||||
return url + '/%s/glib-%s.tar.xz' % (version.up_to(2), version)
|
return url + '/%s/glib-%s.tar.xz' % (version.up_to(2), version)
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
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)
|
configure("--prefix=%s" % prefix)
|
||||||
make()
|
make()
|
||||||
make("install", parallel=False)
|
make("install", parallel=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user