Skip to content

Commit

Permalink
manticoresearch 6.3.6
Browse files Browse the repository at this point in the history
Also unbundle various libraries
  • Loading branch information
cho-m committed Sep 7, 2024
1 parent ca61452 commit 9d63288
Showing 1 changed file with 33 additions and 11 deletions.
44 changes: 33 additions & 11 deletions Formula/m/manticoresearch.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
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",
"BSD-2-Clause", # xxhash (our formula lacks cmake so cannot use)
"GPL-2.0-only", # wsrep resource
{ "GPL-2.0-only" => { with: "x11vnc-openssl-exception" } }, # galera resource
{ 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 @@ -26,36 +31,53 @@ class Manticoresearch < Formula

depends_on "boost" => :build
depends_on "cmake" => :build
depends_on "nlohmann-json" => :build
depends_on "snowball" => :build # for stemmer

# 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 "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

Check failure on line 54 in Formula/m/manticoresearch.rb

View workflow job for this annotation

GitHub Actions / Linux

`brew install --verbose --formula --build-bottle manticoresearch` failed on Linux!

* input, size_t len, XXH64_hash_t seed) | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:3505:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH64_createState’ 3505 | XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void) | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:3510:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH64_freeState’ 3510 | XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr) | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:3517:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH64_copyState’ 3517 | XXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dstState, const XXH64_state_t* srcState) | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:3523:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH64_reset’ 3523 | XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH_NOESCAPE XXH64_state_t* statePtr, XXH64_hash_t seed) | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:3535:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH64_update’ 3535 | XXH_PUBLIC_API XXH_errorcode | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:3587:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH64_digest’ 3587 | XXH_PUBLIC_API XXH64_hash_t XXH64_digest(XXH_NOESCAPE const XXH64_state_t* state) | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:3610:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH64_canonicalFromHash’ 3610 | XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH_NOESCAPE XXH64_canonical_t* dst, XXH64_hash_t hash) | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:3618:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH64_hashFromCanonical’ 3618 | XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_canonical_t* src) | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:5974:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH3_64bits’ 5974 | XXH_PUBLIC_API XXH64_hash_t XXH3_64bits(XXH_NOESCAPE const void* input, size_t length) | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:5980:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH3_64bits_withSecret’ 5980 | XXH_PUBLIC_API XXH64_hash_t | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:5987:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH3_64bits_withSeed’ 5987 | XXH_PUBLIC_API XXH64_hash_t | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:5993:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH3_64bits_withSecretandSeed’ 5993 | XXH_PUBLIC_API XXH64_hash_t | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:6080:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH3_createState’ 6080 | XXH_PUBLIC_API XXH3_state_t* XXH3_createState(void) | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:6100:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH3_freeState’ 6100 | XXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr) | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-17001-mnvb0y/cache/linux-x86_64/xxhash/include/xxhash.h:6107:1: error: conflicting specifiers in declaration of ‘XXH_INLINE_XXH3_copyState’ 6107 | XXH_PUBLIC_API void | ^~~~~~~~~~~~~~ /tmp/manticoresearch-20240907-
# 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["DIAGNOSTIC"] = "1"
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["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}
-DRE2_LIBRARY=#{Formula["re2"].opt_lib/shared_library("libre2")}
-DWITH_RE2_FORCE_STATIC=OFF
-DWITH_ICU_FORCE_STATIC=OFF
-D_LOCALSTATEDIR=#{var}
-D_RUNSTATEDIR=#{var}/run
-D_SYSCONFDIR=#{etc}
-DWITH_STEMMER_FORCE_STATIC=OFF
-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
]

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 Down

0 comments on commit 9d63288

Please sign in to comment.