Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

cmake: fix for openssl 1.0.2 #36361

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions Library/Formula/cmake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,18 @@ def message; <<-EOS.undent

class Cmake < Formula
homepage "http://www.cmake.org/"
url "http://www.cmake.org/files/v3.1/cmake-3.1.1.tar.gz"
sha1 "e96098e402903e09f56d0c4cfef516e591088d78"
head "http://cmake.org/cmake.git"
revision 1

stable do
url "http://www.cmake.org/files/v3.1/cmake-3.1.1.tar.gz"
sha1 "e96098e402903e09f56d0c4cfef516e591088d78"

# Patching CMake for OpenSSL 1.0.2
# Already commited upstream, should be in next release & the HEAD.
# http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=de4ccee75a89519f95fcbcca75abc46577bfefea
patch :DATA
end

bottle do
cellar :any
Expand All @@ -32,6 +41,7 @@ class Cmake < Formula
end

option "without-docs", "Don't build man pages"

depends_on :python => :build if MacOS.version <= :snow_leopard && build.with?("docs")
depends_on "xz" # For LZMA

Expand Down Expand Up @@ -104,3 +114,19 @@ def install
system "#{bin}/cmake", "."
end
end

__END__

diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 340b417..6b4f985 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -279,7 +279,7 @@ if (OPENSSL_INCLUDE_DIR)
set(OPENSSL_VERSION "${_OPENSSL_VERSION}")
elseif(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
- REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
+ REGEX "^# *define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")

# The version number is encoded as 0xMNNFFPPS: major minor fix patch status
# The status gives if this is a developer or prerelease and is ignored here.