Skip to content

Commit

Permalink
Yeet.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Sep 3, 2024
1 parent d7a28bc commit 857c85d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@ jobs:
export RUBYLIB="${INSTALL_DIR}/lib/ruby/3.3.0:${INSTALL_DIR}/lib/ruby/3.3.0/${RUBY_PLATFORM_PAIR}"
export GEM_PATH="${INSTALL_DIR}/lib/ruby/gems/3.3.0"
otool -L ${INSTALL_DIR}/bin/python3
otool -L ${INSTALL_DIR}/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Python || true
file -bL --mime-encoding "${INSTALL_DIR}/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Resources/Python.app/Contents/MacOS/Python" || true
otool -L ${INSTALL_DIR}/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Resources/Python.app/Contents/MacOS/Python || true
otool -L ${INSTALL_DIR}/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Python
otool -L ${INSTALL_DIR}/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/Resources/Python.app/Contents/MacOS/Python
otool -L ${INSTALL_DIR}/bin/ruby
${INSTALL_DIR}/bin/python3 -c 'import sys; print(sys.argv)'
${INSTALL_DIR}/bin/ruby -e "require 'date'; puts Date.today"
Expand Down
8 changes: 5 additions & 3 deletions brew-pkg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ def patchelf(root_dir, prefix_path, binary, format='@executable_path')
ohai "install_name_tool -id #{new_lib} #{binary_path}"
system("install_name_tool", "-id", new_lib, binary_path)
else
# Recursively iterate through libraries
patchelf(root_dir, prefix_path, lib.delete_prefix(prefix_path), '@loader_path')

# Obtain the relative path from the executable or library
lib_relative_path = lib_path.delete_prefix(full_prefix_path)
binary_relative_path = File.dirname(binary_path).delete_prefix(full_prefix_path)
Expand All @@ -77,6 +74,11 @@ def patchelf(root_dir, prefix_path, binary, format='@executable_path')
ohai "After patching:"
ohai "#{stdout}"
ohai "patchelf(#{root_dir}, #{prefix_path}, #{lib.delete_prefix(prefix_path)})"

if lib_path != binary_path
# Recursively iterate through libraries
patchelf(root_dir, prefix_path, lib.delete_prefix(prefix_path), '@loader_path')
end
end
end

Expand Down

0 comments on commit 857c85d

Please sign in to comment.