diff options
| author | Adam Vandenberg | 2014-05-25 12:17:06 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2014-06-01 15:40:44 -0700 |
| commit | 86cff16c7108aa319e81bccf58ee46d88a0671e2 (patch) | |
| tree | 2daf3c5c04200a21afc0b4c0f970306ed54edd22 /Library/Formula/librem.rb | |
| parent | 3cc12267f47378c5ae7802fa9f7096c6d690a63c (diff) | |
| download | homebrew-86cff16c7108aa319e81bccf58ee46d88a0671e2.tar.bz2 | |
librem: fix for non-/usr/local installs
Diffstat (limited to 'Library/Formula/librem.rb')
| -rw-r--r-- | Library/Formula/librem.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Library/Formula/librem.rb b/Library/Formula/librem.rb index 232c3c78b..0b0f7eead 100644 --- a/Library/Formula/librem.rb +++ b/Library/Formula/librem.rb @@ -8,7 +8,11 @@ class Librem < Formula depends_on "libre" def install - system "make", "install", "PREFIX=#{prefix}" + libre = Formula["libre"] + system "make", "install", "PREFIX=#{prefix}", + "LIBRE_MK=#{libre.opt_share}/re/re.mk", + "LIBRE_INC=#{libre.opt_include}/re", + "LIBRE_SO=#{libre.opt_lib}" end test do @@ -16,9 +20,10 @@ class Librem < Formula #include <re/re.h> #include <rem/rem.h> int main() { - return NULL != vidfmt_name(VID_FMT_YUV420P); + return (NULL != vidfmt_name(VID_FMT_YUV420P)) ? 0 : 1; } EOS - system ENV.cc, "test.c", "-lrem" + system ENV.cc, "test.c", "-L#{opt_lib}", "-lrem", "-o", "test" + system "./test" end end |
