summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/glib/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/glib/package.py')
-rw-r--r--var/spack/repos/builtin/packages/glib/package.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py
index 0a0a02f464..2720831e4f 100644
--- a/var/spack/repos/builtin/packages/glib/package.py
+++ b/var/spack/repos/builtin/packages/glib/package.py
@@ -23,7 +23,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import sys
class Glib(Package):
@@ -32,17 +31,24 @@ class Glib(Package):
and interfaces for such runtime functionality as an event loop,
threads, dynamic loading and an object system."""
homepage = "https://developer.gnome.org/glib/"
- url = "http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz"
+ url = "http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz"
+ version('2.49.4', 'e2c87c03017b0cd02c4c73274b92b148')
version('2.42.1', '89c4119e50e767d3532158605ee9121a')
- depends_on("libffi")
- depends_on("zlib")
- depends_on("pkg-config", type='build')
- depends_on('gettext', when=sys.platform == 'darwin')
+ depends_on('libffi')
+ depends_on('zlib')
+ depends_on('pkg-config', type='build')
+ depends_on('gettext')
+ depends_on('pcre+utf', when='@2.49:')
# The following patch is needed for gcc-6.1
- patch('g_date_strftime.patch')
+ patch('g_date_strftime.patch', when='@2.42.1')
+
+ def url_for_version(self, version):
+ """Handle glib's version-based custom URLs."""
+ url = 'http://ftp.gnome.org/pub/gnome/sources/glib'
+ return url + '/%s/glib-%s.tar.xz' % (version.up_to(2), version)
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)