Skip to content

Commit

Permalink
graph-tool 2.80
Browse files Browse the repository at this point in the history
This also adds support for openmp.

Fix style errors
  • Loading branch information
count0 authored and chenrui333 committed Dec 1, 2024
1 parent 647f421 commit 72cfade
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Formula/g/graph-tool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -32,6 +32,8 @@ class GraphTool < Formula
depends_on "gmp"
depends_on "google-sparsehash"
depends_on "gtk+3"
depends_on "libomp"
depends_on "llvm"
depends_on macos: :mojave # for C++17
depends_on "numpy"
depends_on "pillow"
Expand Down Expand Up @@ -134,6 +136,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/usr/local/opt/libomp/lib -lomp"
ENV.append "CPPFLAGS", "-I/usr/local/opt/libomp/include"
end

args = %W[
PYTHON=#{python}
--with-python-module-path=#{prefix/site_packages}
Expand Down

0 comments on commit 72cfade

Please sign in to comment.