2013-06-22 14:58:32 +00:00
|
|
|
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'
|
|
|
|
|
2014-07-03 19:34:33 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-10-21 15:14:31 +00:00
|
|
|
revision 1
|
|
|
|
sha1 "832cbeb382112a042221bdef53980c1432d9acb5" => :yosemite
|
|
|
|
sha1 "90ebcfff95c504b5e3b0a1dca09164a4342239ae" => :mavericks
|
|
|
|
sha1 "45ce069c68066f2a93148379ec1539f5bf398280" => :mountain_lion
|
2014-07-03 19:34:33 +00:00
|
|
|
end
|
|
|
|
|
2013-06-22 14:58:32 +00:00
|
|
|
option :universal
|
|
|
|
|
2014-03-17 02:35:20 +00:00
|
|
|
# Builds a dynamic library for gsm, this package is no longer developed
|
|
|
|
# upstream. Patch taken from Debian and modified to build a dylib.
|
|
|
|
patch do
|
2014-03-17 16:12:54 +00:00
|
|
|
url "https://gist.githubusercontent.com/dholm/5840964/raw/1e2bea34876b3f7583888b2284b0e51d6f0e21f4/gistfile1.txt"
|
2014-03-17 02:35:20 +00:00
|
|
|
sha1 "41fff9bb2dc4958aeb503180ab30ae2e45354e54"
|
2013-06-22 14:58:32 +00:00
|
|
|
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
|