2011-03-10 05:11:03 +00:00
|
|
|
class Gflags < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Library for processing command-line flags"
|
2015-03-31 22:31:21 +00:00
|
|
|
homepage "https://gflags.github.io/gflags/"
|
|
|
|
url "https://github.com/gflags/gflags/archive/v2.1.2.tar.gz"
|
|
|
|
sha256 "d8331bd0f7367c8afd5fcb5f5e85e96868a00fd24b7276fa5fcee1e5575c2662"
|
|
|
|
|
2015-03-31 23:53:28 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-06-29 19:23:05 +00:00
|
|
|
revision 2
|
|
|
|
sha256 "8e648b5824007745eb546beffe4d94a3c25a29556f89eaa4a156dec6984335dd" => :yosemite
|
|
|
|
sha256 "8f4093596ce2b359821d9a3398b82d7d327288d24ca9f0218a9ade1ace2bdbfa" => :mavericks
|
|
|
|
sha256 "19d46507297d14c4ff50d99c9279ddd513df439a5d87e5325ef8fb52c37f7e6d" => :mountain_lion
|
2015-03-31 23:53:28 +00:00
|
|
|
end
|
|
|
|
|
2015-06-08 19:12:57 +00:00
|
|
|
option "with-debug", "Build debug version"
|
2015-06-28 12:42:15 +00:00
|
|
|
option "with-static", "Build gflags as a static (instead of shared) library."
|
2015-06-08 19:12:57 +00:00
|
|
|
|
2015-03-31 22:31:21 +00:00
|
|
|
depends_on "cmake" => :build
|
2010-04-29 14:31:30 +00:00
|
|
|
|
|
|
|
def install
|
2015-06-08 19:12:57 +00:00
|
|
|
ENV.append_to_cflags "-DNDEBUG" if build.without? "debug"
|
2015-06-28 12:42:15 +00:00
|
|
|
args = std_cmake_args
|
|
|
|
if build.with? "static"
|
|
|
|
args << "-DBUILD_SHARED_LIBS=OFF"
|
|
|
|
else
|
|
|
|
args << "-DBUILD_SHARED_LIBS=ON"
|
|
|
|
end
|
2015-03-31 22:31:21 +00:00
|
|
|
mkdir "buildroot" do
|
2015-06-28 12:42:15 +00:00
|
|
|
system "cmake", "..", *args
|
2015-03-31 22:31:21 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
2010-04-29 14:31:30 +00:00
|
|
|
end
|
|
|
|
end
|