Skip to content

Commit

Permalink
emacs-{28,29}: add deps to build PATH
Browse files Browse the repository at this point in the history
Fixes #466 and #465

This kind of nullifies drawbacks of using standard env as it appends
critical stuff the beginning of PATH (e.g. prepends) and still allows
us to access it later to bake it in Emacs.app/Info.plist file.
  • Loading branch information
d12frosted committed May 17, 2022
1 parent ba31dc9 commit 3a0c8b5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Formula/emacs-plus@28.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ class EmacsPlusAT28 < EmacsBase
depends_on "make" => :build
depends_on "autoconf" => :build
depends_on "gnu-sed" => :build
depends_on "gnu-tar" => :build
depends_on "awk" => :build
depends_on "coreutils" => :build
depends_on "pkg-config" => :build
depends_on "texinfo" => :build
depends_on "gnutls"
Expand Down Expand Up @@ -89,6 +92,13 @@ class EmacsPlusAT28 < EmacsBase
#

def install
# Expand PATH to include all dependencies and Superenv.bin as
# dependencies can override standard tools.
path = PATH.new()
path.append(deps.map { |dep| dep.to_formula.opt_bin })
path.append(ENV['PATH'])
ENV['PATH'] = path.existing

args = %W[
--disable-dependency-tracking
--disable-silent-rules
Expand Down
10 changes: 10 additions & 0 deletions Formula/emacs-plus@29.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class EmacsPlusAT29 < EmacsBase
depends_on "make" => :build
depends_on "autoconf" => :build
depends_on "gnu-sed" => :build
depends_on "gnu-tar" => :build
depends_on "awk" => :build
depends_on "coreutils" => :build
depends_on "pkg-config" => :build
depends_on "texinfo" => :build
depends_on "gnutls"
Expand Down Expand Up @@ -86,6 +89,13 @@ class EmacsPlusAT29 < EmacsBase
#

def install
# Expand PATH to include all dependencies and Superenv.bin as
# dependencies can override standard tools.
path = PATH.new()
path.append(deps.map { |dep| dep.to_formula.opt_bin })
path.append(ENV['PATH'])
ENV['PATH'] = path.existing

args = %W[
--disable-dependency-tracking
--disable-silent-rules
Expand Down

0 comments on commit 3a0c8b5

Please sign in to comment.