Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix grep build breakage #571

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 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
Copy link
Contributor Author

@jidicula jidicula May 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@d12frosted I wonder if it may be worth explicitly adding all the autoconf GNU dependencies (perhaps in a future PR?) to cover this scenario better, where users may have different incompatible versions of these tools in their PATH before usr/bin/.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think yes. Ideally I would love to find a way to use homebrew superenv (e.g. default environment) which has everything properly configured. But path injection requires custom environment and hence all these issues 😢

depends_on "awk" => :build
depends_on "coreutils" => :build
depends_on "pkg-config" => :build
Expand Down Expand Up @@ -128,8 +129,9 @@ def install
ENV.append "CFLAGS", "-DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT"

# Necessary for libgccjit library discovery
ENV.append "CPATH", "#{HOMEBREW_PREFIX}/include" if build.with? "native-comp"
ENV.append "LIBRARY_PATH", "#{HOMEBREW_PREFIX}/lib/gcc/current" if build.with? "native-comp"
ENV.append "CPATH", "#{HOMEBREW_PREFIX}/include", ":" if build.with? "native-comp"
ENV.append "LIBRARY_PATH", "#{HOMEBREW_PREFIX}/lib/gcc/current", ":" if build.with? "native-comp"
ENV.append "LDFLAGS", "#{HOMEBREW_PREFIX}/lib/gcc/current", ":" if build.with? "native-comp"

args <<
if build.with? "dbus"
Expand Down
8 changes: 6 additions & 2 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 @@ -124,8 +125,9 @@ def install
ENV.append "CFLAGS", "-DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT"

# Necessary for libgccjit library discovery
ENV.append "CPATH", "#{HOMEBREW_PREFIX}/include" if build.with? "native-comp"
ENV.append "LIBRARY_PATH", "#{HOMEBREW_PREFIX}/lib/gcc/current" if build.with? "native-comp"
ENV.append "CPATH", "#{HOMEBREW_PREFIX}/include", ":" if build.with? "native-comp"
ENV.append "LIBRARY_PATH", "#{HOMEBREW_PREFIX}/lib/gcc/current", ":" if build.with? "native-comp"
ENV.append "LDFLAGS", "#{HOMEBREW_PREFIX}/lib/gcc/current", ":" if build.with? "native-comp"

args <<
if build.with? "dbus"
Expand Down Expand Up @@ -156,6 +158,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"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment from #573 regarding this line.

system "./autogen.sh"

if (build.with? "cocoa") && (build.without? "x11")
Expand Down
6 changes: 4 additions & 2 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 Expand Up @@ -124,8 +125,9 @@ def install
ENV.append "CFLAGS", "-DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT"

# Necessary for libgccjit library discovery
ENV.append "CPATH", "#{HOMEBREW_PREFIX}/include" if build.with? "native-comp"
ENV.append "LIBRARY_PATH", "#{HOMEBREW_PREFIX}/lib/gcc/current" if build.with? "native-comp"
ENV.append "CPATH", "#{HOMEBREW_PREFIX}/include", ":" if build.with? "native-comp"
ENV.append "LIBRARY_PATH", "#{HOMEBREW_PREFIX}/lib/gcc/current", ":" if build.with? "native-comp"
ENV.append "LDFLAGS", "#{HOMEBREW_PREFIX}/lib/gcc/current", ":" if build.with? "native-comp"

args <<
if build.with? "dbus"
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