2013-09-12 20:34:44 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Frescobaldi < Formula
|
|
|
|
homepage "http://frescobaldi.org/"
|
2015-04-27 16:07:34 +00:00
|
|
|
url "https://github.com/wbsoft/frescobaldi/releases/download/v2.18/frescobaldi-2.18.tar.gz"
|
|
|
|
sha256 "6531a6425a0b0a471fb0845098e9c890e59d6379636ed79b4512a48599327d4b"
|
2013-09-12 20:34:44 +00:00
|
|
|
|
|
|
|
option "without-launcher", "Don't build Mac .app launcher"
|
|
|
|
option "without-lilypond", "Don't install Lilypond"
|
|
|
|
|
2014-06-17 13:10:31 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
2015-04-27 16:07:34 +00:00
|
|
|
depends_on "portmidi" => :optional
|
|
|
|
depends_on "lilypond" => :optional
|
2013-09-12 20:34:44 +00:00
|
|
|
|
|
|
|
# python-poppler-qt4 dependencies
|
2014-11-14 20:35:08 +00:00
|
|
|
depends_on "poppler" => "with-qt"
|
2013-09-12 20:34:44 +00:00
|
|
|
depends_on "pyqt"
|
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
|
|
|
|
resource "python-poppler-qt4" do
|
2014-03-08 23:54:18 +00:00
|
|
|
url "https://github.com/wbsoft/python-poppler-qt4/archive/v0.18.1.tar.gz"
|
|
|
|
sha1 "584345ae2fae2e1d667222cafa404a241cf95a1f"
|
2013-09-12 20:34:44 +00:00
|
|
|
end
|
|
|
|
|
2015-04-27 16:07:34 +00:00
|
|
|
resource "python-ly" do
|
|
|
|
url "https://pypi.python.org/packages/source/p/python-ly/python-ly-0.9.1.tar.gz"
|
|
|
|
sha1 "0c9eaab04484c99eeab645a66c19ab499afb2c1d"
|
|
|
|
end
|
|
|
|
|
2013-09-12 20:34:44 +00:00
|
|
|
def install
|
2014-12-13 00:28:29 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
2014-01-24 04:32:47 +00:00
|
|
|
resource("python-poppler-qt4").stage do
|
2014-12-13 00:28:29 +00:00
|
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
2013-09-12 20:34:44 +00:00
|
|
|
end
|
2015-04-27 16:07:34 +00:00
|
|
|
resource("python-ly").stage do
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
|
|
end
|
2014-12-13 00:28:29 +00:00
|
|
|
|
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
|
|
|
rm "setup.cfg"
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec)
|
|
|
|
|
|
|
|
bin.install Dir[libexec/"bin/*"]
|
|
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
|
|
|
|
2013-09-12 20:34:44 +00:00
|
|
|
if build.with? "launcher"
|
2014-12-13 00:28:29 +00:00
|
|
|
system "python", "macosx/mac-app.py", "--force", "--version", version, "--script", libexec/"bin/frescobaldi"
|
|
|
|
inreplace "dist/Frescobaldi.app/Contents/Resources/__boot__.py",
|
|
|
|
"_path_inject(['#{libexec}/bin'])",
|
|
|
|
"_path_inject(['#{libexec}/bin', '#{libexec}/lib/python2.7/site-packages', '#{libexec}/vendor/lib/python2.7/site-packages'])"
|
2014-03-08 23:54:18 +00:00
|
|
|
prefix.install "dist/Frescobaldi.app"
|
2013-09-12 20:34:44 +00:00
|
|
|
end
|
|
|
|
end
|
2014-12-13 00:28:29 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
system bin/"frescobaldi", "--version"
|
|
|
|
end
|
2015-04-27 16:07:34 +00:00
|
|
|
|
|
|
|
def caveats
|
|
|
|
s = <<-EOS.undent
|
|
|
|
By default, a splash screen is shown on startup; this causes the main
|
|
|
|
window not to show until the application icon on the dock is clicked
|
|
|
|
(Cmd-Tab application switching does not appear to work). You may
|
|
|
|
want to disable the splash screen in the preferences to solve this
|
|
|
|
issue. See:
|
|
|
|
https://github.com/wbsoft/frescobaldi/issues/428
|
|
|
|
EOS
|
|
|
|
return s
|
|
|
|
end
|
2013-09-12 20:34:44 +00:00
|
|
|
end
|