Created
October 19, 2013 01:25
-
-
Save hanxue/7050634 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class DBusPython < Formula | |
url 'http://dbus.freedesktop.org/releases/dbus-python/dbus-python-1.2.0.tar.gz' | |
sha1 '7a00f7861d26683ab7e3f4418860bd426deed9b5' | |
def install | |
# Install dbus-python package dependency first | |
# system "./configure", "--prefix=#{prefix}" | |
# system "make", "install" | |
end | |
end | |
class Scribes < Formula | |
homepage 'http://scribes.sourceforge.net/' | |
url 'http://launchpad.net/scribes/0.4/scribes-milestone1/+download/scribes-0.4-dev-build954.tar.bz2' | |
sha1 '0089c967872db6c72893945ba790a489620b3fc1' | |
version '0.4-dev-build954' | |
depends_on 'pkg-config' => :build | |
depends_on 'intltool' | |
depends_on :x11 | |
depends_on :python | |
depends_on "pygtk" | |
depends_on "d-bus" | |
depends_on "gtkspell3" | |
depends_on "pygtksourceview" | |
depends_on "gnome-doc-utils" | |
def install | |
install_args = [ "setup.py", "install", "--prefix=#{libexec}" ] | |
python do | |
DBusPython.new.brew { system python, *install_args } | |
def patches | |
p = [] | |
p << 'https://gist.github.com/hanxue/7048247/raw/698d65b94543872a0301793aa2c02c25e732fa44/dbus-python.patch' | |
# Patch to create setup.py for dbus-python | |
# Based on this bug https://bugs.freedesktop.org/show_bug.cgi?id=55439 | |
# Original patch file at https://bugs.freedesktop.org/attachment.cgi?id=80061 | |
p | |
end | |
system python, "setup.py", "install", "--prefix=#{prefix}" | |
end | |
man1.install Dir['docs/man/man1/*.1'] | |
Dir["#{bin}/*"].each do |bin_file| | |
wrap bin_file, python.site_packages | |
end | |
system "./configure", "--disable-debug", | |
"--disable-dependency-tracking", | |
"--disable-silent-rules", | |
"--prefix=#{prefix}" | |
system "make", "install" | |
end | |
test do | |
system "scribus" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment