From 4a20d170f43d2c8c5c165da2dbd0cb40787d97ff Mon Sep 17 00:00:00 2001 From: Gregory Lee Date: Tue, 14 Feb 2017 10:52:05 -0800 Subject: fixes for pygtk and some dependencies (#3077) --- .../repos/builtin/packages/fontconfig/package.py | 11 ++++- .../repos/builtin/packages/gtkplus/package.py | 1 + .../repos/builtin/packages/py-pygobject/package.py | 11 +++-- .../pygobject-2.28.6-gio-types-2.32.patch | 50 ++++++++++++++++++++++ .../repos/builtin/packages/py-pygtk/package.py | 8 ++-- .../builtin/packages/py-virtualenv/package.py | 2 +- 6 files changed, 75 insertions(+), 8 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-pygobject/pygobject-2.28.6-gio-types-2.32.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/fontconfig/package.py b/var/spack/repos/builtin/packages/fontconfig/package.py index 4f79bbb6fc..ec486bac61 100644 --- a/var/spack/repos/builtin/packages/fontconfig/package.py +++ b/var/spack/repos/builtin/packages/fontconfig/package.py @@ -35,7 +35,7 @@ class Fontconfig(AutotoolsPackage): depends_on('freetype') depends_on('libxml2') depends_on('pkg-config', type='build') - depends_on('font-util', type='build') + depends_on('font-util') def configure_args(self): font_path = join_path(self.spec['font-util'].prefix, 'share', 'fonts') @@ -44,3 +44,12 @@ class Fontconfig(AutotoolsPackage): "--enable-libxml2", "--disable-docs", "--with-default-fonts={0}".format(font_path)] + + @run_after('install') + def system_fonts(self): + # point configuration file to system-install fonts + # gtk applications were failing to display text without this + config_file = join_path(self.prefix, 'etc', 'fonts', 'fonts.conf') + filter_file('fonts', + 'fonts/usr/share/fonts', + config_file) diff --git a/var/spack/repos/builtin/packages/gtkplus/package.py b/var/spack/repos/builtin/packages/gtkplus/package.py index b17b1877ec..13036c3e33 100644 --- a/var/spack/repos/builtin/packages/gtkplus/package.py +++ b/var/spack/repos/builtin/packages/gtkplus/package.py @@ -42,6 +42,7 @@ class Gtkplus(AutotoolsPackage): depends_on("pango") depends_on("pango~X", when='~X') depends_on("pango+X", when='+X') + depends_on('gobject-introspection', when='+X') def patch(self): # remove disable deprecated flag. diff --git a/var/spack/repos/builtin/packages/py-pygobject/package.py b/var/spack/repos/builtin/packages/py-pygobject/package.py index 1dae1a128b..52a8c13dd6 100644 --- a/var/spack/repos/builtin/packages/py-pygobject/package.py +++ b/var/spack/repos/builtin/packages/py-pygobject/package.py @@ -31,18 +31,23 @@ class PyPygobject(AutotoolsPackage): homepage = "https://pypi.python.org/pypi/pygobject" - # FIXME: This URL is no longer available for download from PyPi - url = "https://pypi.python.org/packages/6d/15/97c8b5ccca2be14cf59a2f79e15e3a82a1c3408a6b76b4107689a8b94846/pygobject-2.28.3.tar.bz2" + url = "http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-2.28.6.tar.bz2" + version('2.28.6', 'a43d783228dd32899e6908352b8308f3') version('2.28.3', 'aa64900b274c4661a5c32e52922977f9') extends('python') + depends_on("libffi") depends_on('glib') depends_on('py-py2cairo') depends_on('gobject-introspection') - patch('pygobject-2.28.6-introspection-1.patch') + patch('pygobject-2.28.6-introspection-1.patch', when='@2.28.3:2.28.6') + + # patch from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/development/python-modules/pygobject/pygobject-2.28.6-gio-types-2.32.patch + # for https://bugzilla.gnome.org/show_bug.cgi?id=668522 + patch('pygobject-2.28.6-gio-types-2.32.patch', when='@2.28.6') def install(self, spec, prefix): make('install', parallel=False) diff --git a/var/spack/repos/builtin/packages/py-pygobject/pygobject-2.28.6-gio-types-2.32.patch b/var/spack/repos/builtin/packages/py-pygobject/pygobject-2.28.6-gio-types-2.32.patch new file mode 100644 index 0000000000..fa0adf54ad --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pygobject/pygobject-2.28.6-gio-types-2.32.patch @@ -0,0 +1,50 @@ +From 42d01f060c5d764baa881d13c103d68897163a49 Mon Sep 17 00:00:00 2001 +From: Ryan Lortie +Date: Mon, 12 Mar 2012 16:44:14 -0400 +Subject: [PATCH] gio-types.defs: change some enums to flags + +These flags types were originally incorrectly handled in glib as being +enums. That bug was fixed, but they're still enums here, leading to +warnings about the mismatch. + +Change them to flags. + +https://bugzilla.gnome.org/show_bug.cgi?id=668522 +--- + gio/gio-types.defs | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gio/gio-types.defs b/gio/gio-types.defs +index 331e0bc..7eee5c8 100644 +--- a/gio/gio-types.defs ++++ b/gio/gio-types.defs +@@ -526,7 +526,7 @@ + ) + ) + +-(define-enum MountMountFlags ++(define-flags MountMountFlags + (in-module "gio") + (c-name "GMountMountFlags") + (gtype-id "G_TYPE_MOUNT_MOUNT_FLAGS") +@@ -545,7 +545,7 @@ + ) + ) + +-(define-enum DriveStartFlags ++(define-flags DriveStartFlags + (in-module "gio") + (c-name "GDriveStartFlags") + (gtype-id "G_TYPE_DRIVE_START_FLAGS") +@@ -770,7 +770,7 @@ + ) + ) + +-(define-enum SocketMsgFlags ++(define-flags SocketMsgFlags + (in-module "gio") + (c-name "GSocketMsgFlags") + (gtype-id "G_TYPE_SOCKET_MSG_FLAGS") +-- +1.7.8.5 + diff --git a/var/spack/repos/builtin/packages/py-pygtk/package.py b/var/spack/repos/builtin/packages/py-pygtk/package.py index 56e0b39fd5..462bc88910 100644 --- a/var/spack/repos/builtin/packages/py-pygtk/package.py +++ b/var/spack/repos/builtin/packages/py-pygtk/package.py @@ -26,7 +26,8 @@ from spack import * class PyPygtk(AutotoolsPackage): - """bindings for the Gtk in Python""" + """bindings for the Gtk2 in Python. + use pygobject for Gtk3.""" homepage = "http://www.pygtk.org/" url = "http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/pygtk-2.24.0.tar.gz" @@ -36,8 +37,9 @@ class PyPygtk(AutotoolsPackage): depends_on("libffi") depends_on('cairo') depends_on('glib') - depends_on('gtkplus') - depends_on('py-pygobject') + # for GTK 3.X use pygobject 3.X instead of pygtk + depends_on('gtkplus+X@2.24:2.99') + depends_on('py-pygobject@2.28:2.99') depends_on('py-py2cairo') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/py-virtualenv/package.py b/var/spack/repos/builtin/packages/py-virtualenv/package.py index 5e6431b637..535a525b1c 100644 --- a/var/spack/repos/builtin/packages/py-virtualenv/package.py +++ b/var/spack/repos/builtin/packages/py-virtualenv/package.py @@ -34,4 +34,4 @@ class PyVirtualenv(PythonPackage): version('13.0.1', '1ffc011bde6667f0e37ecd976f4934db') version('15.0.1', '28d76a0d9cbd5dc42046dd14e76a6ecc') - depends_on('py-setuptools', type='build') + depends_on('py-setuptools') # not just build-time, requires pkg_resources -- cgit v1.2.3-70-g09d2