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]_py310: reenable post install #524

Closed
wants to merge 1 commit 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
74 changes: 19 additions & 55 deletions Formula/[email protected]_py310.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class FreecadAT0212Py310 < Formula

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

View workflow job for this annotation

GitHub Actions / test-bot (macos-14)

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

Indirect dependencies with linkage: freecad/freecad/[email protected] freeimage hdf5 [email protected] tbb

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

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

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

Indirect dependencies with linkage: freecad/freecad/[email protected] freeimage hdf5 [email protected] tbb

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

View workflow job for this annotation

GitHub Actions / test-bot (macos-12)

`brew linkage --cached --test --strict freecad/freecad/[email protected]_py310` failed on macOS Monterey (12)!

Indirect dependencies with linkage: freecad/freecad/[email protected] freeimage hdf5 [email protected] tbb
desc "Parametric 3D modeler"
homepage "https://www.freecadweb.org"
url "https://github.com/FreeCAD/FreeCAD/archive/refs/tags/0.21.2.tar.gz"
Expand Down Expand Up @@ -39,13 +39,12 @@
depends_on "freetype"
depends_on "glew"
depends_on "icu4c"
depends_on macos: :high_sierra
depends_on "mesa-glu" if OS.linux? # no access to sierra test box
depends_on macos: :high_sierra # no access to sierra test box
depends_on "mesa-glu" if OS.linux?
depends_on "openblas"
depends_on "opencascade"
depends_on "orocos-kdl"
# epends_on "freecad/freecad/[email protected]"
# TODO: is it possible to point qt@5 to a revision where py310 is being used
depends_on "qt@5"
depends_on "vtk"
depends_on "webp"
Expand Down Expand Up @@ -81,37 +80,6 @@
# sha256 "ce9f4b2afb2c621274e74208a563616eeeee54369f295b6c5f6f4f3112923135"
# end

# patch do
# url "https://raw.githubusercontent.com/FreeCAD/homebrew-freecad/06bd260fc8c8bce1c283f86df3641fd2efea186d/patches/freecad-0.20.2-e57-add-missing-include.patch"
# sha256 "83f033112845fde21c84f18bfa91609b18394dc9adb268c24aa8a1e5ec5aca85"
# end

# # newer versions of occ have removed offending header file
# patch do
# url "https://raw.githubusercontent.com/FreeCAD/homebrew-freecad/06bd260fc8c8bce1c283f86df3641fd2efea186d/patches/freecad-0.20.2-occ-error.patch"
# sha256 "e345d1ced6e46dd6d7cdaa136d32a8fe55eb54ccb01468f22fb425645e5a0585"
# end

# patch do
# url "https://raw.githubusercontent.com/FreeCAD/homebrew-freecad/1fde4f693950d77e8617c08921d50c1aba3f0a56/patches/freecad-0.20.2-cmake-find-xercesc.patch"
# sha256 "adb30f5d723672d1d54db4a236bce8a85e9bc9d0667ef88a7360e4cae1bb27c9"
# end

# patch do
# url "https://raw.githubusercontent.com/FreeCAD/homebrew-freecad/10c1cfe62bc7264498f95091d309ea33dcf9da14/patches/freecad-0.20.2-import-ocaf2cpp.patch"
# sha256 "2732f75d673df770754d838faec7f6cbbb86755cbef049b3b4932fa1e1bdd8d6"
# end

# patch do
# url "https://raw.githubusercontent.com/FreeCAD/homebrew-freecad/06e67d57c90d2f0e969f4a11121c1be68215d40e/patches/freecad-0.20.2-sofcselectioncpp.patch"
# sha256 "6a74db4c5db876ecefd885514111a56c8cde462f95cf7d560c1b1e4baafaf642"
# end

# patch do
# url "https://raw.githubusercontent.com/FreeCAD/homebrew-freecad/92c1e993680710248fc29af05fcadfedcce0f8ad/patches/freecad-0.20.2-boost-v1.85-and-missing-includes.patch"
# sha256 "9bd841ece3781acee3281b23443db47818a2935845163b16bf318e6e1e023209"
# end

def install
hbp = HOMEBREW_PREFIX

Expand Down Expand Up @@ -212,23 +180,25 @@
end

# TODO: stub out the below cmake vars
# -DCMAKE_OSX_DEPLOYMENT_TARGET=
# -DCMAKE_OSX_ARCHITECTURES=
# -DCMAKE_OSX_SYSROOT=#{cmake_osx_sysroot}
# -DCMAKE_CXX_FLAGS="-fuse-ld=lld"
# -DBUILD_ENABLE_CXX_STD=C++17
# -DCMAKE_INSTALL_RPATH=#{prefix}/lib
# -DCMAKE_INSTALL_RPATH=#{rpath}
# -DBUILD_DRAWING=1
# -DBUILD_SMESH=1
# -DBUILD_ENABLE_CXX_STD=C++17
# -DFREECAD_USE_EXTERNAL_KDL=1
# -DBUILD_FEM_NETGEN=0
# -DBUILD_QT5=1
# -DFREECAD_USE_QTWEBMODULE=#{qtwebmodule}
# HDF5_LIBRARIES HDF5_HL_LIBRARIES

if OS.mac?
arch = Hardware::CPU.arch.to_s
fver = OS::Mac.full_version.to_s

args_macos_only = %W[
-DCMAKE_OSX_ARCHITECTURES=#{arch}
-DCMAKE_OSX_DEPLOYMENT_TARGET=#{fver}
-DCMAKE_AR=#{cmake_ar}
-DCMAKE_LINKER=#{cmake_ld}
-DCMAKE_INSTALL_NAME_TOOL:FILEPATH=/usr/bin/install_name_tool
Expand Down Expand Up @@ -299,11 +269,6 @@

ENV.remove "CMAKE_FRAMEWORK_PATH", Formula["qt"].opt_prefix/"Frameworks"

# TODO: ipatch, below cause audit exceptions, ie. `brew style freecad/freecad`
# ENV.remove "PATH", Formula["[email protected]"].opt_prefix/"bin"
# ENV.remove "PATH", Formula["[email protected]"].opt_prefix/"libexec/bin"
# ENV.remove "PKG_CONFIG_PATH", Formula["[email protected]"].opt_prefix/"lib/pkgconfig"

# NOTE: ipatch, do not make build dir a sub dir of the src dir
puts "current working directory: #{Dir.pwd}"
src_dir = Dir.pwd.to_s
Expand All @@ -327,18 +292,17 @@
system "cmake", "--install", build_dir.to_s
end

# NOTE: reenable after successful build
# def post_install
# if OS.mac?
# ohai "the value of prefix = #{prefix}"
# ln "#{prefix}/MacOS/FreeCAD", "#{HOMEBREW_PREFIX}/bin/freecad", force: true
# ln "#{prefix}/MacOS/FreeCADCmd", "#{HOMEBREW_PREFIX}/bin/freecadcmd", force: true
# elsif OS.linux?
# ohai "the value of prefix = #{prefix}"
# ln "#{bin}/FreeCAD", "#{HOMEBREW_PREFIX}/bin/freecad", force: true
# ln "#{bin}/FreeCADCmd", "#{HOMEBREW_PREFIX}/bin/freecadcmd", force: true
# end
# end
def post_install
if OS.mac?
ohai "the value of prefix = #{prefix}"
ln "#{prefix}/MacOS/FreeCAD", "#{HOMEBREW_PREFIX}/bin/freecad", force: true
ln "#{prefix}/MacOS/FreeCADCmd", "#{HOMEBREW_PREFIX}/bin/freecadcmd", force: true
elsif OS.linux?
ohai "the value of prefix = #{prefix}"
ln "#{bin}/FreeCAD", "#{HOMEBREW_PREFIX}/bin/freecad", force: true
ln "#{bin}/FreeCADCmd", "#{HOMEBREW_PREFIX}/bin/freecadcmd", force: true
end
end

def caveats
<<-EOS
Expand Down
Loading