aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libssh.rb
blob: ce5143443e4ce118f9b917979b818444131a2e78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
class Libssh < Formula
  homepage "https://www.libssh.org/"
  url "https://red.libssh.org/attachments/download/107/libssh-0.6.4.tar.gz"
  sha1 "073bf53d9e02f7cfbcc5d8738ca1c9ffb2edd247"

  head "git://git.libssh.org/projects/libssh.git"

  bottle do
    sha1 "de5ef207ed3ae4d79f180a5835fe491409a0804d" => :yosemite
    sha1 "3de5d0a02be7bda59dabe91cd7db4ece978d25bb" => :mavericks
    sha1 "983355b795316434c54dd61e85495a808a147845" => :mountain_lion
  end

  depends_on "cmake" => :build
  depends_on "openssl"

  # Fix compilation on 10.10
  # https://red.libssh.org/issues/164
  # https://red.libssh.org/issues/174
  patch :DATA

  def install
    mkdir "build" do
      system "cmake", "..", *std_cmake_args
      system "make", "install"
    end
  end
end

__END__
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 8f76af8..0ce7a31 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -101,8 +101,8 @@ check_function_exists(snprintf HAVE_SNPRINTF)
 check_function_exists(poll HAVE_POLL)
 check_function_exists(select HAVE_SELECT)
 check_function_exists(getaddrinfo HAVE_GETADDRINFO)
-check_function_exists(ntohll HAVE_NTOHLL)
-check_function_exists(htonll HAVE_HTONLL)
+check_symbol_exists(ntohll arpa/inet.h HAVE_NTOHLL)
+check_symbol_exists(htonll arpa/inet.h HAVE_HTONLL)
 
 if (WIN32)
     check_function_exists(_strtoui64 HAVE__STRTOUI64)