Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
sdl: fix sdl_config prefix detection.
Browse files Browse the repository at this point in the history
Deals with the issue flagged up in this commit:
0d6d021

Closes #34721.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
  • Loading branch information
DomT4 authored and MikeMcQuaid committed Dec 17, 2014
1 parent 6d31f2d commit 928d087
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Library/Formula/sdl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ def install
# Copy source files needed for Ojective-C support.
libexec.install Dir["src/main/macosx/*"] if build.stable?

# The resulting script in bin is hardcoded to /usr/local, which can cause pain.
inreplace "#{bin}/sdl-config", "prefix=/usr/local", "prefix=#{prefix}"

if build.with? "tests"
ENV.prepend_path "PATH", "#{bin}"
# This is stupid but necessary. Blurgh. Otherwise, test building fails, even
# with various flags, prepending & pkg_config_path tinkering.
inreplace "#{bin}/sdl-config", "prefix=#{HOMEBREW_PREFIX}", "prefix=#{prefix}"
cd "test" do
system "./configure", "--prefix=#{libexec}/tests"
system "./configure"
system "make"
# Upstream - Why no make install? Why?
(share+"tests").install %w{ checkkeys graywin loopwave testalpha testbitmap testblitspeed testcdrom
Expand All @@ -94,6 +94,8 @@ def install
(share+"test_extras").install %w{ icon.bmp moose.dat picture.xbm sail.bmp sample.bmp sample.wav }
bin.write_exec_script Dir["#{share}/tests/*"]
end
# And then we undo stupid but necessary so it doesn't break all the other things.
inreplace "#{bin}/sdl-config", "prefix=#{prefix}", "prefix=#{HOMEBREW_PREFIX}"
end
end

Expand Down

0 comments on commit 928d087

Please sign in to comment.