diff options
| author | Frizlab | 2014-09-26 23:05:50 +0200 |
|---|---|---|
| committer | Mike McQuaid | 2014-10-03 07:31:42 -0700 |
| commit | 7442c8fa1cff694a3be1229a5aceaeb95abdb179 (patch) | |
| tree | bb46c5bd082c7748f2860b6ace17e3b89d14fda8 /Library | |
| parent | ebe4fa4d201865427e7199d22c89c45f1015a774 (diff) | |
| download | homebrew-7442c8fa1cff694a3be1229a5aceaeb95abdb179.tar.bz2 | |
mvptree 1.0 (new formula)
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/mvptree.rb | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Library/Formula/mvptree.rb b/Library/Formula/mvptree.rb new file mode 100644 index 000000000..0fa8b8ccf --- /dev/null +++ b/Library/Formula/mvptree.rb @@ -0,0 +1,49 @@ +require "formula" + +class Mvptree < Formula + homepage "http://www.phash.org" + url "http://www.phash.org/releases/mvptree-1.0.tar.gz" + sha1 "586bdc458116bed61caf7310804a70d55af9ce6e" + + # Patch submitted to upstream by mail + # Fixes a "permission denied" problem in the Makefile + patch :DATA + + def install + lib.mkpath + include.mkpath + system "make", "install", "DESTDIR=#{prefix}" + end + + test do + (testpath/'test.c').write <<-EOS.undent + #include <stdio.h> + #include <mvptree.h> + int main() { + MVPDP *pt = dp_alloc(MVP_BYTEARRAY); + dp_free(pt, (MVPFreeFunc)0); + return 0; + } + EOS + system ENV.cc, "-g", "-c", "test.c", "-o", "test.o" + system ENV.cc, "-g", "test.o", "#{lib}/libmvptree.a", "-o", "test" + system "./test" + end +end + +__END__ +diff --git a/Makefile b/Makefile +index bb155e2..29876b1 100644 +--- a/Makefile ++++ b/Makefile +@@ -43,8 +43,9 @@ clean : + + install : $(HFLS) $(LIBRARY) + install -c -m 444 $(HFLS) $(DESTDIR)/include +- install -c -m 444 $(LIBRARY) $(DESTDIR)/lib ++ install -c -m 644 $(LIBRARY) $(DESTDIR)/lib + $(RANLIB) $(DESTDIR)/lib/$(LIBRARY) ++ chmod 444 $(DESTDIR)/lib/$(LIBRARY) + + $(LIBRARY) : $(OBJS) + ar cr $(LIBRARY) $? |
