|
1 | 1 | class OrTools < Formula
|
2 | 2 | desc "Google's Operations Research tools"
|
3 | 3 | 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" |
6 | 6 | license "Apache-2.0"
|
7 |
| - revision 7 |
8 | 7 | head "https://github.com/google/or-tools.git", branch: "stable"
|
9 | 8 |
|
10 | 9 | livecheck do
|
@@ -37,20 +36,15 @@ class OrTools < Formula
|
37 | 36 | depends_on "scip"
|
38 | 37 | uses_from_macos "zlib"
|
39 | 38 |
|
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 |
| - |
47 | 39 | def install
|
48 | 40 | # 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." |
49 | 42 | args = %w[
|
50 | 43 | -DUSE_HIGHS=OFF
|
51 | 44 | -DBUILD_DEPS=OFF
|
52 | 45 | -DBUILD_SAMPLES=OFF
|
53 | 46 | -DBUILD_EXAMPLES=OFF
|
| 47 | + -DUSE_SCIP=OFF |
54 | 48 | ]
|
55 | 49 | system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
|
56 | 50 | system "cmake", "--build", "build"
|
@@ -86,14 +80,22 @@ def install
|
86 | 80 | # Routing Solver
|
87 | 81 | system ENV.cxx, "-std=c++17", pkgshare/"simple_routing_program.cc",
|
88 | 82 | "-I#{include}", "-L#{lib}", "-lortools",
|
| 83 | + "-DOR_PROTO_DLL=", "-DPROTOBUF_USE_DLLS", |
89 | 84 | *shell_output("pkg-config --cflags --libs absl_check absl_log").chomp.split,
|
90 | 85 | "-o", "simple_routing_program"
|
91 | 86 | system "./simple_routing_program"
|
92 | 87 |
|
93 | 88 | # Sat Solver
|
| 89 | + absl_libs = %w[ |
| 90 | + absl_check |
| 91 | + absl_log_initialize |
| 92 | + absl_flags |
| 93 | + absl_flags_parse |
| 94 | + ] |
94 | 95 | system ENV.cxx, "-std=c++17", pkgshare/"simple_sat_program.cc",
|
95 | 96 | "-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, |
97 | 99 | "-o", "simple_sat_program"
|
98 | 100 | system "./simple_sat_program"
|
99 | 101 | end
|
|
0 commit comments