Skip to content

Commit

Permalink
Merge pull request #183780 from Homebrew/manticoresearch-6.3.6
Browse files Browse the repository at this point in the history
manticoresearch 6.3.6
  • Loading branch information
BrewTestBot authored Sep 8, 2024
2 parents 0c7cd58 + 3fb0ac6 commit 67de30e
Showing 1 changed file with 43 additions and 23 deletions.
66 changes: 43 additions & 23 deletions Formula/m/manticoresearch.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
class Manticoresearch < Formula
desc "Open source text search engine"
homepage "https://manticoresearch.com"
url "https://github.com/manticoresoftware/manticoresearch/archive/refs/tags/6.2.12.tar.gz"
sha256 "272d9e3cc162b1fe08e98057c9cf6c2f90df0c3819037e0dafa200e5ff71cef9"
license "GPL-2.0-only" # License changes in the next release and must be removed from formula_license_mismatches
revision 1
url "https://github.com/manticoresoftware/manticoresearch/archive/refs/tags/6.3.6.tar.gz"
sha256 "d0409bde33f4fe89358ad7dbbad775e1499d4e61fed16d4fa84f9b29b89482d2"
license all_of: [
"GPL-3.0-or-later",
"GPL-2.0-only", # wsrep
{ "GPL-2.0-only" => { with: "x11vnc-openssl-exception" } }, # galera
{ any_of: ["Unlicense", "MIT"] }, # uni-algo (our formula is too new)
]
version_scheme 1
head "https://github.com/manticoresoftware/manticoresearch.git", branch: "master"

Expand All @@ -15,47 +19,65 @@ class Manticoresearch < Formula
end

bottle do
sha256 arm64_sonoma: "ebccbe26f5358d4cb0b2e6c077d1cd1676bacdb90704fd74dec1c996b165a0f3"
sha256 arm64_ventura: "3ac03e8f29238d750840e583011a3ab5c8fc02814f989463a0baad97ff8b8607"
sha256 arm64_monterey: "b3ddbd82e0d38c88a2b94658311ec644bbcb293edf77b03ab0fcb3d60995d6f4"
sha256 sonoma: "71b25bfabae553885eccb4b147eef6b3bf99e488ec9de422801fd9850d4adbe1"
sha256 ventura: "48c8b6624b6bfde3e964eaf9fe4d08d9c778d120a4b78feafeea1f9d0e4815ac"
sha256 monterey: "e096ac88ffe59c40e2e2751af85a21a14c49b89c68de4defbfb5bdb54843b5fb"
sha256 x86_64_linux: "63f602892d1341f76aef3bd17a5f8f91e6198ae151993ce8b0a5e3297487e957"
sha256 arm64_sonoma: "e8c8da051f17ed8e3984e7a73b2956fe9dbb15af20f6586f7c639b82871d8b76"
sha256 arm64_ventura: "7af52d4fa6beb2a7fe7a7fab57d7781c50f340e1c4f164668e03ca543ffc36ba"
sha256 arm64_monterey: "f793c0bb62386e8cc63f9657788d587c06dc742b507ac3c28d1d828d7ad00c8e"
sha256 sonoma: "6f42e036fa7fe8fa7b5e3da02e0c4e0c685c862e0a332d7329aa14d75264007a"
sha256 ventura: "ed97b55541841ab96bec286202cbc13bd6e4b3768f82ad18b4a207d2f4d631c9"
sha256 monterey: "be12886881943aa6c44fe6f6506322f08163f129e4c91fcb4d3db9a8045bee9c"
sha256 x86_64_linux: "5ddaec2c620e960e04733e79738758b88ecdafa09284c11283561005c3cb2449"
end

depends_on "boost" => :build
depends_on "cmake" => :build
depends_on "nlohmann-json" => :build
depends_on "snowball" => :build # for libstemmer.a

# NOTE: `libpq`, `mysql-client`, `unixodbc` and `zstd` are dynamically loaded rather than linked
depends_on "cctz"
depends_on "icu4c"
depends_on "libpq"
depends_on "mysql-client@8.0"
depends_on "mysql-client"
depends_on "openssl@3"
depends_on "re2"
depends_on "unixodbc"
depends_on "xxhash"
depends_on "zlib" # due to `mysql-client`
depends_on "zstd"

uses_from_macos "bison" => :build
uses_from_macos "flex" => :build
uses_from_macos "libxml2"
uses_from_macos "zlib"

fails_with gcc: "5"

def install
# ENV["DIAGNOSTIC"] = "1"
# Work around error when building with GCC
# Issue ref: https://github.com/manticoresoftware/manticoresearch/issues/2393
ENV.append_to_cflags "-fpermissive" if OS.linux?

ENV["ICU_ROOT"] = Formula["icu4c"].opt_prefix.to_s
ENV["OPENSSL_ROOT_DIR"] = Formula["openssl"].opt_prefix.to_s
ENV["MYSQL_ROOT_DIR"] = Formula["mysql-client@8.0"].opt_prefix.to_s
ENV["OPENSSL_ROOT_DIR"] = Formula["openssl@3"].opt_prefix.to_s
ENV["MYSQL_ROOT_DIR"] = Formula["mysql-client"].opt_prefix.to_s
ENV["PostgreSQL_ROOT"] = Formula["libpq"].opt_prefix.to_s

args = %W[
-DDISTR_BUILD=homebrew
-DCMAKE_INSTALL_LOCALSTATEDIR=#{var}
-DCMAKE_INSTALL_SYSCONFDIR=#{etc}
-DCMAKE_REQUIRE_FIND_PACKAGE_ICU=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_cctz=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_nlohmann_json=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_re2=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_stemmer=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_xxHash=ON
-DRE2_LIBRARY=#{Formula["re2"].opt_lib/shared_library("libre2")}
-DWITH_ICU_FORCE_STATIC=OFF
-D_LOCALSTATEDIR=#{var}
-D_RUNSTATEDIR=#{var}/run
-D_SYSCONFDIR=#{etc}
-DWITH_RE2_FORCE_STATIC=OFF
-DWITH_STEMMER_FORCE_STATIC=OFF
]

system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
Expand All @@ -82,9 +104,7 @@ def post_install
binlog_path=#
}
EOS
pid = fork do
exec bin/"searchd"
end
pid = spawn(bin/"searchd")
ensure
Process.kill(9, pid)
Process.wait(pid)
Expand Down

0 comments on commit 67de30e

Please sign in to comment.