libffi: simplify test execution

This commit is contained in:
Jack Nagel 2013-03-13 22:38:07 -05:00
parent f2381ca8a2
commit 60601399ff

View file

@ -67,11 +67,8 @@ class Libffi < Formula
} }
TEST_SCRIPT TEST_SCRIPT
cellar = `brew --prefix libffi`.chomp ENV['PKG_CONFIG_PATH'] = "#{opt_prefix}/lib/pkgconfig"
ENV['PKG_CONFIG_PATH'] = "#{cellar}/lib/pkgconfig/" flags = `pkg-config --cflags --libs libffi`.split + ENV.cflags.split
flags = *`pkg-config --cflags --libs libffi`.split
flags += ENV.cflags.split
ohai flags
system ENV.cc, "-o", "closure", "closure.c", *flags system ENV.cc, "-o", "closure", "closure.c", *flags
system "./closure" system "./closure"
end end