From 0aeb4b2f6c34621521b36fc8852bb815323fdbc4 Mon Sep 17 00:00:00 2001 From: Boris Buliga Date: Sun, 25 Aug 2024 13:31:48 +0300 Subject: [PATCH] feat: rename {expand,print}_path to {expand,print}_env --- Formula/emacs-plus@28.rb | 4 ++-- Formula/emacs-plus@29.rb | 4 ++-- Formula/emacs-plus@30.rb | 10 +++++----- Formula/emacs-plus@31.rb | 12 +++++++----- Library/EmacsBase.rb | 6 +++--- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/Formula/emacs-plus@28.rb b/Formula/emacs-plus@28.rb index d2ebd517..8e23c7fd 100644 --- a/Formula/emacs-plus@28.rb +++ b/Formula/emacs-plus@28.rb @@ -107,7 +107,7 @@ class EmacsPlusAT28 < EmacsBase # def initialize(*args, **kwargs, &block) a = super - expand_path + expand_env a end @@ -116,7 +116,7 @@ def initialize(*args, **kwargs, &block) # def install - expand_path + expand_env args = %W[ --disable-dependency-tracking diff --git a/Formula/emacs-plus@29.rb b/Formula/emacs-plus@29.rb index 869cbf99..ca5a6ba0 100644 --- a/Formula/emacs-plus@29.rb +++ b/Formula/emacs-plus@29.rb @@ -102,7 +102,7 @@ class EmacsPlusAT29 < EmacsBase # def initialize(*args, **kwargs, &block) a = super - expand_path + expand_env a end @@ -111,7 +111,7 @@ def initialize(*args, **kwargs, &block) # def install - expand_path + expand_env args = %W[ --disable-dependency-tracking diff --git a/Formula/emacs-plus@30.rb b/Formula/emacs-plus@30.rb index dc6b4dfc..f92c4152 100644 --- a/Formula/emacs-plus@30.rb +++ b/Formula/emacs-plus@30.rb @@ -112,9 +112,9 @@ class EmacsPlusAT30 < EmacsBase # def initialize(*args, **kwargs, &block) a = super - print_path if verbose? - expand_path if build.with? "path-injection" - print_path if verbose? + print_env if verbose? + expand_env if build.with? "path-injection" + print_env if verbose? a end @@ -123,8 +123,8 @@ def initialize(*args, **kwargs, &block) # def install - expand_path if build.with? "path-injection" - print_path if verbose? + expand_env if build.with? "path-injection" + print_env if verbose? args = %W[ --disable-dependency-tracking diff --git a/Formula/emacs-plus@31.rb b/Formula/emacs-plus@31.rb index 0476fa86..4d074f23 100644 --- a/Formula/emacs-plus@31.rb +++ b/Formula/emacs-plus@31.rb @@ -112,9 +112,9 @@ class EmacsPlusAT31 < EmacsBase # def initialize(*args, **kwargs, &block) a = super - print_path if verbose? - expand_path if build.with? "path-injection" - print_path if verbose? + print_env if verbose? + expand_env if build.with? "path-injection" + print_env if verbose? a end @@ -123,8 +123,8 @@ def initialize(*args, **kwargs, &block) # def install - expand_path if build.with? "path-injection" - print_path if verbose? + expand_env if build.with? "path-injection" + print_env if verbose? args = %W[ --disable-dependency-tracking @@ -157,6 +157,8 @@ def install ENV.append "LDFLAGS", "-I#{Formula["libgccjit"].include}" end + print_env if verbose? + args << if build.with? "dbus" "--with-dbus" diff --git a/Library/EmacsBase.rb b/Library/EmacsBase.rb index 214b381c..5b6715c9 100644 --- a/Library/EmacsBase.rb +++ b/Library/EmacsBase.rb @@ -68,7 +68,7 @@ def inject_path system "touch '#{app}'" end - def expand_path + def expand_env # Expand PATH to include all dependencies and Superenv.bin as # dependencies can override standard tools. path = PATH.new() @@ -81,14 +81,14 @@ def expand_path ENV['PATH'] = path.existing if verbose? - print_path + print_env system "which", "tar" system "which", "ls" system "which", "grep" end end - def print_path + def print_env path = PATH.new() path.append(ENV['PATH']) puts "PATH value is"