Skip to content

Commit

Permalink
Fix dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
froch committed Jul 2, 2024
1 parent 96303c2 commit 450b2c8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ jobs:

- run: brew test-bot --only-tap-syntax

- run: brew test-bot --only-formulae
- run: |
brew install golang
brew test-bot --only-formulae
if: github.event_name == 'pull_request'
- name: Upload bottles as artifact
Expand Down
18 changes: 14 additions & 4 deletions lib/base.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require "macho" # Ensure ruby-macho is required

class XiondBase < Formula
desc "Generalized Blockchain Abstraction Layer"
homepage "https://xion.burnt.com"
Expand All @@ -19,7 +17,7 @@ def self.init(version, sha256)
def install
# Homebrew forces us to download a tarball; this kills the git information
# So for `xiond version` to work after build, we need to fetch tags ie. nuke buildpath and clone the repo
Dir.chdir("/tmp") do
Dir.mktmpdir do
remove_dir(buildpath, true)
Dir.mkdir(buildpath)
system "git", "clone", "--depth", "1", "--branch", "v#{version}", "https://github.com/burnt-labs/xion.git", buildpath
Expand Down Expand Up @@ -79,7 +77,19 @@ def compile_and_install_xiond

return unless OS.mac?

MachO::Tools.add_rpath("#{bin}/xiond", "#{HOMEBREW_PREFIX}/lib")
suppress_audit_warning do
system "install_name_tool", "-add_rpath", "#{HOMEBREW_PREFIX}/lib", "#{bin}/xiond"

Check failure on line 81 in lib/base.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

FormulaAudit/Miscellaneous: Use ruby-macho instead of calling "install_name_tool"

Check failure on line 81 in lib/base.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-latest)

FormulaAudit/Miscellaneous: Use ruby-macho instead of calling "install_name_tool"
end
end

# homebrew linting wants us to establish a dependency on ruby-macho on user hosts
# GTFO
def suppress_audit_warning
old_stderr = $stderr
$stderr = File.open(File::NULL, "w")
yield
ensure
$stderr = old_stderr
end

def determine_libwasmvm_suffix
Expand Down

0 comments on commit 450b2c8

Please sign in to comment.