diff options
| author | Kieran Ramos | 2013-10-18 21:34:08 -0400 |
|---|---|---|
| committer | Jack Nagel | 2013-11-16 23:18:35 -0600 |
| commit | b6cdca737ae57b49b0ffe8268c4917d42bf75d34 (patch) | |
| tree | 64c48ce2dbb772ae6405461fa51194229adc9525 /Library | |
| parent | 0fa2ccf386c4a5c405adcff771177fd9457254b9 (diff) | |
| download | homebrew-b6cdca737ae57b49b0ffe8268c4917d42bf75d34.tar.bz2 | |
New formula: pygobject3
Provides Python 2 and 3 bindings to the GObject class from GLib.
Closes #23362.
Signed-off-by: Kieran Ramos <ramos.kieran@gmail.com>
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/pygobject3.rb | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Library/Formula/pygobject3.rb b/Library/Formula/pygobject3.rb new file mode 100644 index 000000000..a9d9fa692 --- /dev/null +++ b/Library/Formula/pygobject3.rb @@ -0,0 +1,50 @@ +require 'formula' + +class Pygobject3 < Formula + homepage 'http://live.gnome.org/PyGObject' + url 'http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.8/pygobject-3.8.3.tar.xz' + sha256 '384b3e1b8d1e7c8796d7eb955380d62946dd0ed9c54ecf0817af2d6b254e082c' + + option 'with-tests', 'run tests' + + depends_on 'pkg-config' => :build + + if build.with? 'tests' + depends_on 'automake' => :build + depends_on 'autoconf' => :build + depends_on 'libtool' => :build + depends_on 'gnome-common' => :build + depends_on 'gtk+3' => :build + end + + depends_on 'libffi' => :optional + depends_on 'glib' + depends_on :python + depends_on :python3 => :optional + depends_on 'py2cairo' + depends_on 'py3cairo' if build.with? 'python3' + depends_on 'gobject-introspection' + + option :universal + + def patches + "https://gist.github.com/krrk/6439665/raw/a527e14cd3a77c19b089f27bea884ce46c988f55/pygobject-fix-module.patch" if build.with? 'tests' + end + + def install + ENV.universal_binary if build.universal? + + python do + if build.with? 'tests' + # autogen.sh is necessary to update the build system after the above + # patch and XDG_DATA_DIRS needs to be fixed for some tests to run + inreplace 'tests/Makefile.am', '/usr/share', HOMEBREW_PREFIX/'share' + system "./autogen.sh" + end + + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" + system "make", "install" + system "make", "check" if build.with? 'tests' + end + end +end |
