Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[email protected]_py312: add new cmake args for linking on linux #654

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions Formula/[email protected]_py312.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class FreecadAT100Py312 < Formula

Check warning on line 1 in Formula/[email protected]_py312.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-15)

No bottle built for [email protected]_py312!

[email protected]_py312 has unbottled dependencies, so a bottle will not be built.

Check warning on line 1 in Formula/[email protected]_py312.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-14)

`brew linkage --cached --test --strict freecad/freecad/[email protected]_py312` failed on macOS Sonoma (14) on Apple Silicon!

/opt/homebrew/Cellar/[email protected]_py312/1.0.0/lib/libgtest_main.1.15.2.dylib

Check warning on line 1 in Formula/[email protected]_py312.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

`brew linkage --cached --test --strict freecad/freecad/[email protected]_py312` failed on macOS Ventura (13)!

/usr/local/Cellar/[email protected]_py312/1.0.0/lib/libgtest_main.1.15.2.dylib

Check warning on line 1 in Formula/[email protected]_py312.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

`brew linkage --test freecad/freecad/[email protected]_py312` failed on Linux!

libomp.so
desc "Parametric 3D modeler"
homepage "https://www.freecadweb.org"
license "GPL-2.0-only"
Expand All @@ -10,6 +10,12 @@
url "https://github.com/FreeCAD/FreeCAD/archive/refs/tags/1.0.0.tar.gz"
sha256 "51115afd8e3b89f4bac343b986b0800d8e1c68fc1e322c3cd179cfe1033ef937"

# NOTE: ipatch, vtk >= 9.4 will break build of 1.0
patch do
url "https://github.com/wwmayer/FreeCAD/commit/8934af10128f0bd2d0ffada946d1c93bc5d8869f.patch?full_index=1"
sha256 "1c4f0d32f0726a94ac607a44e1efbdc42a32f8fbd97a9ccd20151defda368f76"
end

patch do
url "https://raw.githubusercontent.com/FreeCAD/homebrew-freecad/e78eeda91a16658ce4954114b5fdb85b7e72e774/patches/freecad%400.21.2_py310-hdf5-fix-cmake-reruns.patch"
sha256 "b1becbdc867e96aa1bfe8d8fd1c1b01053b2ce5d1d9483cd0ed19b2d2c6f387f"
Expand Down Expand Up @@ -76,12 +82,11 @@
depends_on "cmake" => :build
depends_on "freecad/freecad/[email protected]" => :build
depends_on "gcc" => :build # gfortran req for FEM WB
depends_on "hdf5" => :build
depends_on "lld" => :build if OS.linux?
depends_on "llvm" => :build if OS.linux?
depends_on "mesa" => :build if OS.linux?
depends_on "ninja" => :build if OS.linux?
depends_on "pkg-config" => :build
depends_on "[email protected]" => :build
depends_on "boost"
depends_on "cython"
depends_on "doxygen"
Expand All @@ -93,14 +98,18 @@
depends_on "freecad/freecad/[email protected]_py312"
depends_on "freecad/freecad/pybind11_py312"
depends_on "freecad/freecad/[email protected]_py312"
depends_on "freeimage"
depends_on "freetype"
depends_on "glew"
depends_on "hdf5"
depends_on "icu4c"
depends_on macos: :high_sierra
depends_on "mesa-glu" if OS.linux?
depends_on "nlohmann-json"
depends_on "openblas"
depends_on "opencascade"
depends_on "orocos-kdl"
depends_on "[email protected]"
depends_on "qt@5"
depends_on "tbb"
depends_on "vtk"
Expand Down Expand Up @@ -175,6 +184,7 @@
cmake_prefix_paths << Formula["eigen"].prefix
cmake_prefix_paths << Formula["expat"].prefix
cmake_prefix_paths << Formula["fmt"].prefix
cmake_prefix_paths << Formula["freeimage"].prefix
cmake_prefix_paths << Formula["freetype"].prefix
cmake_prefix_paths << Formula["glew"].prefix
cmake_prefix_paths << Formula["hdf5"].prefix
Expand All @@ -184,6 +194,7 @@
cmake_prefix_paths << Formula["libtiff"].prefix
cmake_prefix_paths << Formula["lz4"].prefix
cmake_prefix_paths << Formula["[email protected]_py312"].prefix
cmake_prefix_paths << Formula["nlohmann-json"].prefix
cmake_prefix_paths << Formula["opencascade"].prefix
cmake_prefix_paths << Formula["pkg-config"].prefix
cmake_prefix_paths << Formula["pugixml"].prefix
Expand Down Expand Up @@ -265,7 +276,7 @@
ninja_bin = Formula["ninja"].opt_bin/"ninja"
clang_cc = Formula["llvm"].opt_bin/"clang"
clang_cxx = Formula["llvm"].opt_bin/"clang++"
clang_ld = Formula["llvm"].opt_bin/"lld"
clang_ld = Formula["lld"].opt_bin/"lld"
clang_ar = Formula["llvm"].opt_bin/"llvm-ar"

openglu_inc_dir = Formula["mesa-glu"].opt_include
Expand All @@ -274,6 +285,9 @@
puts openglu_inc_dir
puts "----------------------------------------------------"

linux_linker_flags = "-L#{HOMEBREW_PREFIX}/opt/gcc/lib/gcc/current " \
"-Wl,-rpath,#{HOMEBREW_PREFIX}/opt/gcc/lib/gcc/current"

args_linux_only = %W[
-GNinja
-DCMAKE_MAKE_PROGRAM=#{ninja_bin}
Expand All @@ -283,6 +297,7 @@
-DCMAKE_LINKER=#{clang_ld}
-DCMAKE_AR=#{clang_ar}
-DOPENGL_GLU_INCLUDE_DIR=#{openglu_inc_dir}
-DCMAKE_EXE_LINKER_FLAGS=#{linux_linker_flags}
]
end

Expand Down
Loading