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