libconfig 1.5
Closes Homebrew/homebrew#41371. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
This commit is contained in:
parent
7b9a1a90a2
commit
a170f74163
1 changed files with 27 additions and 7 deletions
|
@ -1,10 +1,8 @@
|
|||
require 'formula'
|
||||
|
||||
class Libconfig < Formula
|
||||
desc "Configuration file processing library"
|
||||
homepage 'http://www.hyperrealm.com/libconfig/'
|
||||
url 'http://www.hyperrealm.com/libconfig/libconfig-1.4.9.tar.gz'
|
||||
sha1 'b7a3c307dfb388e57d9a35c7f13f6232116930ec'
|
||||
homepage "http://www.hyperrealm.com/libconfig/"
|
||||
url "http://www.hyperrealm.com/libconfig/libconfig-1.5.tar.gz"
|
||||
sha256 "e31daa390d8e4461c8830512fe2e13ba1a3d6a02a2305a02429eec61e68703f6"
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
|
@ -13,12 +11,34 @@ class Libconfig < Formula
|
|||
sha1 "21f6d02c17ab809a63b076dec69d0bc5dbc8f605" => :mavericks
|
||||
end
|
||||
|
||||
head do
|
||||
url "https://github.com/hyperrealm/libconfig.git"
|
||||
depends_on "automake" => :build
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "libtool" => :build
|
||||
end
|
||||
|
||||
option :universal
|
||||
|
||||
def install
|
||||
ENV.universal_binary if build.universal?
|
||||
system "autoreconf", "-i" if build.head?
|
||||
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
|
||||
system "make"
|
||||
system "make install"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<-EOS.undent
|
||||
#include <libconfig.h>
|
||||
int main() {
|
||||
config_t cfg;
|
||||
config_init(&cfg);
|
||||
config_destroy(&cfg);
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
system ENV.cc, "-I#{include}", "-L#{lib}", "-lconfig",
|
||||
testpath/"test.c", "-o", testpath/"test"
|
||||
system "./test"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue