diff options
| author | David Holm | 2013-06-22 16:58:32 +0200 |
|---|---|---|
| committer | Adam Vandenberg | 2013-08-15 20:38:04 -0700 |
| commit | 2ebe83ce1789371e09410cada6f05bb260d12b6c (patch) | |
| tree | b43e842a48a74e2fcca7f5e03a86913393293025 /Library | |
| parent | bd770d2cc47163e1498528af93b915ea663dd845 (diff) | |
| download | homebrew-2ebe83ce1789371e09410cada6f05bb260d12b6c.tar.bz2 | |
libgsm 1.0.13
Closes #20688.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/libgsm.rb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Library/Formula/libgsm.rb b/Library/Formula/libgsm.rb new file mode 100644 index 000000000..443d746d0 --- /dev/null +++ b/Library/Formula/libgsm.rb @@ -0,0 +1,39 @@ +require 'formula' + +class Libgsm < Formula + homepage 'http://www.quut.com/gsm/' + url 'http://www.quut.com/gsm/gsm-1.0.13.tar.gz' + sha1 '668b0a180039a50d379b3d5a22e78da4b1d90afc' + + option :universal + + def patches + # Builds a dynamic library for gsm, this package is no longer developed + # upstream. Patch taken from Debian and modified to build a dylib. + 'https://gist.github.com/dholm/5840964/raw/' + end + + def install + ENV.universal_binary if build.universal? + ENV.append_to_cflags '-c -O2 -DNeedFunctionPrototypes=1' + + # Only the targets for which a directory exists will be installed + bin.mkpath + lib.mkpath + include.mkpath + man1.mkpath + man3.mkpath + + # Dynamic library must be built first + system "make", "lib/libgsm.1.0.13.dylib", + "CC=#{ENV.cc}", "CCFLAGS=#{ENV.cflags}", + "LDFLAGS=#{ENV.ldflags}" + system "make", "all", + "CC=#{ENV.cc}", "CCFLAGS=#{ENV.cflags}", + "LDFLAGS=#{ENV.ldflags}" + system "make", "install", + "INSTALL_ROOT=#{prefix}", + "GSM_INSTALL_INC=#{include}" + lib.install Dir['lib/*dylib'] + end +end |
