poco 1.6.1

poco: 1.6.1, use CMake, allow universal build

This patch bumps version to 1.6.1 and switches build system to CMake. The
latter also allows to build fat binaries and thus close pull request Homebrew/homebrew#35839.

Closes Homebrew/homebrew#44148.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
Mike Gelfand 2015-09-19 23:18:24 +03:00 committed by Dominyk Tiller
parent cb3cee417e
commit a402a904b4

View file

@ -1,8 +1,10 @@
class Poco < Formula
desc "POCO C++ Libraries"
homepage "http://pocoproject.org/"
url "http://pocoproject.org/releases/poco-1.6.0/poco-1.6.0-all.tar.gz"
sha256 "ed1be29ee413141269e7ccee861b11a2992a9f70072dbb28bec31ad432d71cab"
url "http://pocoproject.org/releases/poco-1.6.1/poco-1.6.1-all.tar.gz"
sha256 "88c88ff0916228d3a011b86c486033dab75e62a27429b5d35736d43527cf5b44"
head "https://github.com/pocoproject/poco.git", :branch => "develop"
bottle do
cellar :any
@ -12,18 +14,30 @@ class Poco < Formula
end
option :cxx11
option :universal
depends_on "openssl"
depends_on "cmake" => :build
def install
ENV.cxx11 if build.cxx11?
arch = Hardware.is_64_bit? ? "Darwin64": "Darwin32"
system "./configure", "--prefix=#{prefix}",
"--config=#{arch}",
"--omit=Data/MySQL,Data/ODBC",
"--no-samples",
"--no-tests"
system "make", "install", "CC=#{ENV.cc}", "CXX=#{ENV.cxx}"
args = std_cmake_args
args << "-DENABLE_DATA_MYSQL=OFF" << "-DENABLE_DATA_ODBC=OFF"
if build.universal?
ENV.universal_binary
args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}"
end
if build.stable?
# Fix Foundation library version (already fixed upstream).
inreplace "Foundation/CMakeLists.txt", "VERSION ${PROJECT_VERSION}", "VERSION ${SHARED_LIBRARY_VERSION}"
end
mkdir "macbuild" do
system "cmake", buildpath, *args
system "make", "install"
end
end
end