grass: use Formula[]

master
Adam Vandenberg 2014-02-25 06:33:37 -08:00
parent 53679a0c0e
commit 2573abb960
1 changed files with 10 additions and 10 deletions

View File

@ -43,8 +43,8 @@ class Grass < Formula
end
def install
readline = Formula.factory('readline')
gettext = Formula.factory('gettext')
readline = Formula["readline"].opt_prefix
gettext = Formula["gettext"].opt_prefix
args = [
"--disable-debug", "--disable-dependency-tracking",
@ -57,13 +57,13 @@ class Grass < Formula
"--with-lapack",
"--with-sqlite",
"--with-odbc",
"--with-geos=#{Formula.factory('geos').opt_prefix}/bin/geos-config",
"--with-geos=#{Formula["geos"].opt_prefix}/bin/geos-config",
"--with-png",
"--with-readline-includes=#{readline.opt_prefix}/include",
"--with-readline-libs=#{readline.opt_prefix}/lib",
"--with-readline-includes=#{readline}/include",
"--with-readline-libs=#{readline}/lib",
"--with-readline",
"--with-nls-includes=#{gettext.opt_prefix}/include",
"--with-nls-libs=#{gettext.opt_prefix}/lib",
"--with-nls-includes=#{gettext}/include",
"--with-nls-libs=#{gettext}/lib",
"--with-nls",
"--with-freetype",
"--without-tcltk" # Disabled due to compatibility issues with OS X Tcl/Tk
@ -78,13 +78,13 @@ class Grass < Formula
if headless? or build.without? 'wxmac'
args << "--without-wxwidgets"
else
args << "--with-wxwidgets=#{Formula.factory('wxmac').opt_prefix}/bin/wx-config"
args << "--with-wxwidgets=#{Formula["wxmac"].opt_prefix}/bin/wx-config"
end
args << "--enable-64bit" if MacOS.prefer_64_bit?
args << "--with-macos-archs=#{MacOS.preferred_arch}"
cairo = Formula.factory('cairo')
cairo = Formula["cairo"]
args << "--with-cairo-includes=#{cairo.include}/cairo"
args << "--with-cairo-libs=#{cairo.lib}"
args << "--with-cairo"
@ -93,7 +93,7 @@ class Grass < Formula
args << "--with-postgres" if build.with? "postgresql"
if build.with? "mysql"
mysql = Formula.factory('mysql')
mysql = Formula["mysql"]
args << "--with-mysql-includes=#{mysql.include}/mysql"
args << "--with-mysql-libs=#{mysql.lib}"
args << "--with-mysql"