Skip to content

Commit 0924a30

Browse files
BrewTestBotMoisan
authored andcommitted
or-tools 9.14
1 parent 9b22968 commit 0924a30

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

Formula/o/or-tools.rb

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
class OrTools < Formula
22
desc "Google's Operations Research tools"
33
homepage "https://developers.google.com/optimization/"
4-
url "https://github.com/google/or-tools/archive/refs/tags/v9.11.tar.gz"
5-
sha256 "f6a0bd5b9f3058aa1a814b798db5d393c31ec9cbb6103486728997b49ab127bc"
4+
url "https://github.com/google/or-tools/archive/refs/tags/v9.14.tar.gz"
5+
sha256 "9019facf316b54ee72bb58827efc875df4cfbb328fbf2b367615bf2226dd94ca"
66
license "Apache-2.0"
7-
revision 7
87
head "https://github.com/google/or-tools.git", branch: "stable"
98

109
livecheck do
@@ -37,20 +36,15 @@ class OrTools < Formula
3736
depends_on "scip"
3837
uses_from_macos "zlib"
3938

40-
# Add missing `#include`s to fix incompatibility with `abseil` 20240722.0.
41-
# https://github.com/google/or-tools/pull/4339
42-
patch do
43-
url "https://raw.githubusercontent.com/Homebrew/formula-patches/bb1af4bcb2ac8b2af4de4411d1ce8a6876ed9c15/or-tools/abseil-vlog-is-on.patch"
44-
sha256 "0f8f28e7363a36c6bafb9b60dc6da880b39d5b56d8ead350f27c8cb1e275f6b6"
45-
end
46-
4739
def install
4840
# FIXME: Upstream enabled Highs support in their binary distribution, but our build fails with it.
41+
# FIXME: turned off SCIP, otherwise or-tools fails to build with "Target SCIP::libscip not available."
4942
args = %w[
5043
-DUSE_HIGHS=OFF
5144
-DBUILD_DEPS=OFF
5245
-DBUILD_SAMPLES=OFF
5346
-DBUILD_EXAMPLES=OFF
47+
-DUSE_SCIP=OFF
5448
]
5549
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
5650
system "cmake", "--build", "build"
@@ -86,14 +80,22 @@ def install
8680
# Routing Solver
8781
system ENV.cxx, "-std=c++17", pkgshare/"simple_routing_program.cc",
8882
"-I#{include}", "-L#{lib}", "-lortools",
83+
"-DOR_PROTO_DLL=", "-DPROTOBUF_USE_DLLS",
8984
*shell_output("pkg-config --cflags --libs absl_check absl_log").chomp.split,
9085
"-o", "simple_routing_program"
9186
system "./simple_routing_program"
9287

9388
# Sat Solver
89+
absl_libs = %w[
90+
absl_check
91+
absl_log_initialize
92+
absl_flags
93+
absl_flags_parse
94+
]
9495
system ENV.cxx, "-std=c++17", pkgshare/"simple_sat_program.cc",
9596
"-I#{include}", "-L#{lib}", "-lortools",
96-
*shell_output("pkg-config --cflags --libs absl_check absl_log absl_raw_hash_set").chomp.split,
97+
"-DOR_PROTO_DLL=", "-DPROTOBUF_USE_DLLS",
98+
*shell_output("pkg-config --cflags --libs #{absl_libs.join(" ")}").chomp.split,
9799
"-o", "simple_sat_program"
98100
system "./simple_sat_program"
99101
end

0 commit comments

Comments
 (0)