require 'formula' class Liboil :build depends_on 'glib' def install arch = Hardware.is_64_bit? ? 'x64_64' : 'i386' inreplace "configure", "__HOST_CPU__", arch system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" system "make" system "make install" end def patches {:p0 => [ "http://svn.macports.org/repository/macports/trunk/dports/devel/liboil/files/patch-liboil_liboilcpu-x86.c.diff", "http://svn.macports.org/repository/macports/trunk/dports/devel/liboil/files/host_cpu.diff" ]} end end