Skip to content

Commit b0a6707

Browse files
iMichkacarlocab
authored andcommitted
libsbol: Fix build and linkage
- fix build on newer macOS - try to fix ARM build too
1 parent 0226934 commit b0a6707

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

Formula/libsbol.rb

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,27 @@ class Libsbol < Formula
1616
depends_on "pkg-config" => :build
1717
depends_on "jsoncpp"
1818
depends_on "raptor"
19+
depends_on "rasqal"
20+
21+
uses_from_macos "curl"
22+
uses_from_macos "libxslt"
1923

2024
def install
2125
# upstream issue: https://github.com/SynBioDex/libSBOL/issues/215
2226
inreplace "source/CMakeLists.txt", "measure.h", "measurement.h"
2327

24-
system "cmake", ".", "-DCMAKE_CXX_FLAGS=-I/System/Library/Frameworks/Python.framework/Headers",
25-
"-DSBOL_BUILD_SHARED=TRUE",
26-
"-DSBOL_BUILD_STATIC=FALSE",
27-
*std_cmake_args
28+
args = std_cmake_args
29+
args << "-DSBOL_BUILD_SHARED=TRUE"
30+
args << "-DRAPTOR_INCLUDE_DIR=#{Formula["raptor"].opt_include}/raptor2"
31+
args << "-DRASQAL_INCLUDE_DIR=#{Formula["rasqal"].opt_include}"
32+
33+
if OS.mac? && (sdk = MacOS.sdk_path_if_needed)
34+
args << "-DCURL_LIBRARY=#{sdk}/usr/lib/libcurl.tbd"
35+
args << "-DLIBXSLT_INCLUDE_DIR=#{sdk}/usr/include/"
36+
args << "-DLIBXSLT_LIBRARIES=#{sdk}/usr/lib/libxslt.tbd"
37+
end
38+
39+
system "cmake", ".", *args
2840
system "make", "install"
2941
end
3042

0 commit comments

Comments
 (0)