From c4cfe2eb19ffd8a3510a0736a6f3d0bb445d8160 Mon Sep 17 00:00:00 2001 From: Tiago Peixoto Date: Sun, 1 Dec 2024 15:57:39 +0100 Subject: [PATCH] graph-tool 2.80 This also adds support for openmp. Fix style errors Remove outdated macos version requirement Co-authored-by: Rui Chen graph-tool: update build Signed-off-by: Rui Chen --- Formula/g/graph-tool.rb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Formula/g/graph-tool.rb b/Formula/g/graph-tool.rb index 82c05a65a3e98..8bdae608edb1c 100644 --- a/Formula/g/graph-tool.rb +++ b/Formula/g/graph-tool.rb @@ -3,8 +3,8 @@ class GraphTool < Formula desc "Efficient network analysis for Python 3" homepage "https://graph-tool.skewed.de/" - url "https://downloads.skewed.de/graph-tool/graph-tool-2.79.tar.bz2" - sha256 "52a254942e75ed3070dea70e692ae101877bbef1009e43ec62fe1806a8de0154" + url "https://downloads.skewed.de/graph-tool/graph-tool-2.80.tar.bz2" + sha256 "c1a70e075dbe728fad25dc3f5a9a9597880a6d6ff68435b91d21f0b44ef8dbe6" license "LGPL-3.0-or-later" livecheck do @@ -24,15 +24,15 @@ class GraphTool < Formula depends_on "ninja" => :build depends_on "pkgconf" => :build + depends_on "google-sparsehash" => :build + depends_on "boost" depends_on "boost-python3" depends_on "cairomm@1.14" depends_on "cgal" depends_on "freetype" depends_on "gmp" - depends_on "google-sparsehash" depends_on "gtk+3" - depends_on macos: :mojave # for C++17 depends_on "numpy" depends_on "pillow" depends_on "py3cairo" @@ -46,6 +46,7 @@ class GraphTool < Formula on_macos do depends_on "cairo" + depends_on "libomp" depends_on "libsigc++@2" end @@ -134,6 +135,13 @@ def install # Linux build is not thread-safe. ENV.deparallelize unless OS.mac? + # Enable openmp + if OS.mac? + ENV.append_to_cflags "-Xpreprocessor -fopenmp" + ENV.append "LDFLAGS", "-L#{Formula["libomp"].opt_lib} -lomp" + ENV.append "CPPFLAGS", "-I#{Formula["libomp"].opt_include}" + end + args = %W[ PYTHON=#{python} --with-python-module-path=#{prefix/site_packages}