Skip to content

Commit

Permalink
fix(build): Add grep as build-time dependency
Browse files Browse the repository at this point in the history
I found that on my system, I had a different incompatible version of grep from a
plan9 installation on my PATH that was superseding the builtin grep on one of my
Macs. This explains why the `with-native-comp` build was failing on one of my
Macs but not the other - the Mac with the successful emacs-plus@28
`with-native-comp` build only had the built-in version of grep on its PATH.

Adding GNU grep as a build-time dependency will include it in the `gnubin`
directory, which is prepended to the PATH in each formula. I've also added an
explicit PATH prepending step for each of the GNU build-time dependencies. This
indicates the coupling of those dependencies with the `gnubin` PATH prepending.

Related to d12frosted#555 and d12frosted#556
  • Loading branch information
jidicula committed May 3, 2023
1 parent d327ef7 commit 4a190d9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class EmacsPlusAT28 < EmacsBase
depends_on "autoconf" => :build
depends_on "gnu-sed" => :build
depends_on "gnu-tar" => :build
depends_on "grep" => :build
depends_on "awk" => :build
depends_on "coreutils" => :build
depends_on "pkg-config" => :build
Expand Down
3 changes: 3 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class EmacsPlusAT29 < EmacsBase
depends_on "autoconf" => :build
depends_on "gnu-sed" => :build
depends_on "gnu-tar" => :build
depends_on "grep" => :build
depends_on "awk" => :build
depends_on "coreutils" => :build
depends_on "pkg-config" => :build
Expand Down Expand Up @@ -156,6 +157,8 @@ def install
args << "--with-xwidgets" if build.with? "xwidgets"

ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin"
ENV.prepend_path "PATH", Formula["gnu-tar"].opt_libexec/"gnubin"
ENV.prepend_path "PATH", Formula["grep"].opt_libexec/"gnubin"
system "./autogen.sh"

if (build.with? "cocoa") && (build.without? "x11")
Expand Down
1 change: 1 addition & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class EmacsPlusAT30 < EmacsBase
depends_on "autoconf" => :build
depends_on "gnu-sed" => :build
depends_on "gnu-tar" => :build
depends_on "grep" => :build
depends_on "awk" => :build
depends_on "coreutils" => :build
depends_on "pkg-config" => :build
Expand Down
1 change: 1 addition & 0 deletions Library/EmacsBase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def expand_path
}
system "which", "tar"
system "which", "ls"
system "which", "grep"
end
end

Expand Down

0 comments on commit 4a190d9

Please sign in to comment.