diff options
| author | Sergey Polovko | 2015-03-18 21:09:22 +0300 |
|---|---|---|
| committer | Mike McQuaid | 2015-03-23 08:43:12 +0000 |
| commit | 932ce76092e4428e728aaebd5e3c2f07c61727c3 (patch) | |
| tree | 86fd0c6b355a69c75c762cc14262380870dc4615 /Library/Formula | |
| parent | 1b8c979aeaee1ec9b70187cc18aa04fc43b1fd69 (diff) | |
| download | homebrew-932ce76092e4428e728aaebd5e3c2f07c61727c3.tar.bz2 | |
double-conversion 1.1.5 (new formula)
Closes #37835.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/double-conversion.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Library/Formula/double-conversion.rb b/Library/Formula/double-conversion.rb new file mode 100644 index 000000000..7495a11ab --- /dev/null +++ b/Library/Formula/double-conversion.rb @@ -0,0 +1,33 @@ +class DoubleConversion < Formula + homepage "https://github.com/floitsch/double-conversion" + url "https://github.com/floitsch/double-conversion/archive/v1.1.5.tar.gz" + sha256 "03b976675171923a726d100f21a9b85c1c33e06578568fbc92b13be96147d932" + + head "https://github.com/floitsch/double-conversion.git" + + depends_on "cmake" => :build + + def install + mkdir "dc-build" do + system "cmake", "..", *std_cmake_args + system "make", "install" + end + end + + test do + (testpath/"test.cc").write <<-EOS.undent + #include <double-conversion/bignum.h> + #include <stdio.h> + int main() { + char buf[20] = {0}; + double_conversion::Bignum bn; + bn.AssignUInt64(0x1234567890abcdef); + bn.ToHexString(buf, sizeof buf); + printf("%s", buf); + return 0; + } + EOS + system ENV.cc, "test.cc", "-L#{lib}", "-ldouble-conversion", "-o", "test" + assert_equal "1234567890ABCDEF", `./test` + end +end |
