osquery 2.3.4
depend on boost since vendoring 1.62.0 is no longer necessary Closes #11325. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
154b773d60
commit
c4e559816c
1 changed files with 6 additions and 57 deletions
|
@ -3,8 +3,8 @@ class Osquery < Formula
|
|||
homepage "https://osquery.io"
|
||||
# pull from git tag to get submodules
|
||||
url "https://github.com/facebook/osquery.git",
|
||||
:tag => "2.3.3",
|
||||
:revision => "d1d21cda78d60c1fe7cc2f86fe206522d0134528"
|
||||
:tag => "2.3.4",
|
||||
:revision => "f5bcc66ee39af1cdd1a9a55455e8e1543ae3f13e"
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
|
@ -22,6 +22,7 @@ class Osquery < Formula
|
|||
depends_on "doxygen" => :build
|
||||
depends_on "asio"
|
||||
depends_on "augeas"
|
||||
depends_on "boost"
|
||||
depends_on "snappy"
|
||||
depends_on "gflags"
|
||||
depends_on "glog"
|
||||
|
@ -53,11 +54,6 @@ class Osquery < Formula
|
|||
sha256 "2e935275c6f7eb25e7d850b354344c92cacb7c193b708ec64ffce10ec6afa7f4"
|
||||
end
|
||||
|
||||
resource "boost" do
|
||||
url "https://downloads.sourceforge.net/project/boost/boost/1.62.0/boost_1_62_0.tar.bz2"
|
||||
sha256 "36c96b0f6155c98404091d8ceb48319a28279ca0333fba1ad8611eb90afb2ca0"
|
||||
end
|
||||
|
||||
resource "cpp-netlib" do
|
||||
url "https://github.com/cpp-netlib/cpp-netlib/archive/cpp-netlib-0.12.0-final.tar.gz"
|
||||
version "0.12.0"
|
||||
|
@ -104,47 +100,7 @@ class Osquery < Formula
|
|||
end
|
||||
end
|
||||
|
||||
resource("boost").stage do
|
||||
# Force boost to compile with the desired compiler
|
||||
open("user-config.jam", "a") do |file|
|
||||
file.write "using darwin : : #{ENV.cxx} ;\n"
|
||||
file.write "using mpi ;\n" if build.with? "mpi"
|
||||
end
|
||||
|
||||
bootstrap_args = %W[
|
||||
--without-icu
|
||||
--prefix=#{vendor}/boost
|
||||
--libdir=#{vendor}/boost/lib
|
||||
--with-libraries=filesystem,regex,system,thread
|
||||
]
|
||||
|
||||
args = %W[
|
||||
--prefix=#{vendor}/boost
|
||||
--libdir=#{vendor}/boost/lib
|
||||
-d2
|
||||
-j#{ENV.make_jobs}
|
||||
--ignore-site-config
|
||||
--layout=tagged
|
||||
--user-config=user-config.jam
|
||||
install
|
||||
threading=multi
|
||||
link=static
|
||||
optimization=space
|
||||
variant=release
|
||||
cxxflags=-std=c++11
|
||||
]
|
||||
|
||||
if ENV.compiler == :clang
|
||||
args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++"
|
||||
end
|
||||
|
||||
system "./bootstrap.sh", *bootstrap_args
|
||||
system "./b2", "headers"
|
||||
system "./b2", *args
|
||||
end
|
||||
|
||||
resource("cpp-netlib").stage do
|
||||
ENV["BOOST_ROOT"] = vendor/"boost"
|
||||
args = std_cmake_args + %W[
|
||||
-DCMAKE_INSTALL_PREFIX=#{vendor}/cpp-netlib
|
||||
-DCPP-NETLIB_BUILD_TESTS=OFF
|
||||
|
@ -198,7 +154,6 @@ class Osquery < Formula
|
|||
system "./configure", "--disable-debug",
|
||||
"--prefix=#{vendor}/thrift",
|
||||
"--libdir=#{vendor}/thrift/lib",
|
||||
"--with-boost=#{vendor}/boost",
|
||||
*exclusions
|
||||
system "make", "-j#{ENV.make_jobs}"
|
||||
system "make", "install"
|
||||
|
@ -211,8 +166,8 @@ class Osquery < Formula
|
|||
ENV.prepend_create_path "PYTHONPATH", buildpath/"third-party/python/lib/python2.7/site-packages"
|
||||
ENV["THRIFT_HOME"] = vendor/"thrift"
|
||||
|
||||
res = resources.map(&:name).to_set - %w[aws-sdk-cpp boost cpp-netlib
|
||||
linenoise thrift thrift-patch]
|
||||
res = resources.map(&:name).to_set - %w[aws-sdk-cpp cpp-netlib linenoise
|
||||
thrift thrift-patch]
|
||||
res.each do |r|
|
||||
resource(r).stage do
|
||||
system "python", "setup.py", "install",
|
||||
|
@ -222,22 +177,16 @@ class Osquery < Formula
|
|||
end
|
||||
end
|
||||
|
||||
ENV["BOOST_ROOT"] = vendor/"boost/include"
|
||||
|
||||
args = std_cmake_args + %W[
|
||||
-Daws-cpp-sdk-core_library:FILEPATH=#{vendor}/aws-sdk-cpp/lib/libaws-cpp-sdk-core.a
|
||||
-Daws-cpp-sdk-firehose_library:FILEPATH=#{vendor}/aws-sdk-cpp/lib/libaws-cpp-sdk-firehose.a
|
||||
-Daws-cpp-sdk-kinesis_library:FILEPATH=#{vendor}/aws-sdk-cpp/lib/libaws-cpp-sdk-kinesis.a
|
||||
-Daws-cpp-sdk-sts_library:FILEPATH=#{vendor}/aws-sdk-cpp/lib/libaws-cpp-sdk-sts.a
|
||||
-Dboost_filesystem-mt_library:FILEPATH=#{vendor}/boost/lib/libboost_filesystem-mt.a
|
||||
-Dboost_regex-mt_library:FILEPATH=#{vendor}/boost/lib/libboost_regex-mt.a
|
||||
-Dboost_system-mt_library:FILEPATH=#{vendor}/boost/lib/libboost_system-mt.a
|
||||
-Dboost_thread-mt_library:FILEPATH=#{vendor}/boost/lib/libboost_thread-mt.a
|
||||
-Dcppnetlib-client-connections_library:FILEPATH=#{vendor}/cpp-netlib/lib/libcppnetlib-client-connections.a
|
||||
-Dcppnetlib-uri_library:FILEPATH=#{vendor}/cpp-netlib/lib/libcppnetlib-uri.a
|
||||
-Dlinenoise_library:FILEPATH=#{vendor}/linenoise/lib/liblinenoise.a
|
||||
-Dthrift_library:FILEPATH=#{vendor}/thrift/lib/libthrift.a
|
||||
-DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG\ -I#{MacOS.sdk_path}/usr/include/libxml2\ -I#{vendor}/aws-sdk-cpp/include\ -I#{vendor}/boost/include\ -I#{vendor}/cpp-netlib/include\ -I#{vendor}/linenoise/include\ -I#{vendor}/thrift/include\ -Wl,-L#{vendor}/linenoise/lib
|
||||
-DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG\ -I#{MacOS.sdk_path}/usr/include/libxml2\ -I#{vendor}/aws-sdk-cpp/include\ -I#{vendor}/cpp-netlib/include\ -I#{vendor}/linenoise/include\ -I#{vendor}/thrift/include\ -Wl,-L#{vendor}/linenoise/lib
|
||||
]
|
||||
|
||||
# Link dynamically against brew-installed libraries.
|
||||
|
|
Loading…
Reference in a new issue