diff options
| author | Alexis Hildebrandt | 2015-01-06 13:42:19 +0100 | 
|---|---|---|
| committer | Mike McQuaid | 2015-01-08 10:29:34 +0000 | 
| commit | 16814b4eac2298c76cefcde342623ee224d5cdcc (patch) | |
| tree | 7942051da0878a4b76c6d2274a71de8b33da5650 | |
| parent | 1a1080e142d80b35eeb0b02d1ce37b4705950a4d (diff) | |
| download | homebrew-16814b4eac2298c76cefcde342623ee224d5cdcc.tar.bz2 | |
ledger: modernize
* Remove obsolete require "formula"
* Remove unecessary build dependency to ninja
* Rename debug option to with-debug
* Use %w instead of %W
Closes #35602.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
| -rw-r--r-- | Library/Formula/ledger.rb | 16 | 
1 files changed, 8 insertions, 8 deletions
diff --git a/Library/Formula/ledger.rb b/Library/Formula/ledger.rb index 33034652c..d659c352a 100644 --- a/Library/Formula/ledger.rb +++ b/Library/Formula/ledger.rb @@ -1,5 +1,3 @@ -require "formula" -  class Ledger < Formula    homepage "http://ledger-cli.org" @@ -20,14 +18,15 @@ class Ledger < Formula    head "https://github.com/ledger/ledger.git" -  option "debug", "Build with debugging symbols enabled" +  deprecated_option "debug" => "with-debug" + +  option "with-debug", "Build with debugging symbols enabled"    option "with-docs", "Build HTML documentation" -  depends_on "cmake" => :build -  depends_on "ninja" => :build    depends_on "mpfr"    depends_on "gmp"    depends_on :python => :optional +  depends_on "cmake" => :build    boost_opts = []    boost_opts << "c++11" if MacOS.version < "10.9" @@ -41,11 +40,11 @@ class Ledger < Formula      (buildpath/"lib/utfcpp").install resource("utfcpp") unless build.head? -    flavor = build.include?("debug") ? "debug" : "opt" +    flavor = (build.with? "debug") ? "debug" : "opt" -    opts = %W[-- -DBUILD_DOCS=1] +    opts = %w[-- -DBUILD_DOCS=1]      args = %W[ -      --ninja --jobs=#{ENV.make_jobs} +      --jobs=#{ENV.make_jobs}        --output=build        --prefix=#{prefix}        --boost=#{Formula["boost"].opt_prefix} @@ -68,6 +67,7 @@ class Ledger < Formula      args += opts +    system "./acprep", flavor, "make", *args      system "./acprep", flavor, "make", "doc", *args      system "./acprep", flavor, "make", "install", *args      (share+"ledger/examples").install Dir["test/input/*.dat"]  | 
