diff options
| author | Gijs Molenaar | 2014-03-19 13:24:16 +0200 |
|---|---|---|
| committer | Mike McQuaid | 2014-03-19 14:54:07 +0000 |
| commit | 3e31fa160bb426a7e1c3e186a78fac623bc2baa4 (patch) | |
| tree | 41d1dadcec7bce7313bd79d3e234973d90832345 /Library | |
| parent | 5c5eaab66ed2eeb819ad5e92dd0f61ba4c7084a0 (diff) | |
| download | homebrew-3e31fa160bb426a7e1c3e186a78fac623bc2baa4.tar.bz2 | |
snap7 1.2 (new formula)
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/snap7.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Library/Formula/snap7.rb b/Library/Formula/snap7.rb new file mode 100644 index 000000000..aaa4d89af --- /dev/null +++ b/Library/Formula/snap7.rb @@ -0,0 +1,24 @@ +require "formula" + +class Snap7 < Formula + homepage "http://snap7.sourceforge.net/" + url "https://downloads.sourceforge.net/project/snap7/1.2.0/snap7-full-1.2.0.tar.gz" + sha1 "49e64997345dfcbb68cecee3e0bc098d96a96407" + + def install + archstr = MacOS.prefer_64_bit? ? "x86_64" : "i386" + lib.mkpath + inreplace "build/osx/common.mk", "libsnap7.so", "libsnap7.dylib" + inreplace "build/osx/common.mk", "/usr/lib", lib + + Dir.chdir "build/osx" do + system "make", "-f", "#{archstr}_osx.mk", "install" + end + + include.install "release/Wrappers/c-cpp/snap7.h" + end + + test do + system "python", "-c", "import ctypes.util,sys;ctypes.util.find_library('snap7') or sys.exit(1)" + end +end |
