diff --git a/Formula/freecad@1.0.0_py312.rb b/Formula/freecad@1.0.0_py312.rb index e7cf7be..8a10148 100644 --- a/Formula/freecad@1.0.0_py312.rb +++ b/Formula/freecad@1.0.0_py312.rb @@ -10,6 +10,12 @@ class FreecadAT100Py312 < Formula 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" @@ -76,12 +82,11 @@ class FreecadAT100Py312 < Formula depends_on "cmake" => :build depends_on "freecad/freecad/swig@4.2.1" => :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 "python@3.12" => :build depends_on "boost" depends_on "cython" depends_on "doxygen" @@ -93,14 +98,18 @@ class FreecadAT100Py312 < Formula depends_on "freecad/freecad/numpy@2.1.1_py312" depends_on "freecad/freecad/pybind11_py312" depends_on "freecad/freecad/pyside2@5.15.15_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 "python@3.12" depends_on "qt@5" depends_on "tbb" depends_on "vtk" @@ -175,6 +184,7 @@ def install 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 @@ -184,6 +194,7 @@ def install cmake_prefix_paths << Formula["libtiff"].prefix cmake_prefix_paths << Formula["lz4"].prefix cmake_prefix_paths << Formula["med-file@4.1.1_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 @@ -265,7 +276,7 @@ def install 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 @@ -274,6 +285,9 @@ def install 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} @@ -283,6 +297,7 @@ def install -DCMAKE_LINKER=#{clang_ld} -DCMAKE_AR=#{clang_ar} -DOPENGL_GLU_INCLUDE_DIR=#{openglu_inc_dir} + -DCMAKE_EXE_LINKER_FLAGS=#{linux_linker_flags} ] end