diff options
| author | Dominyk Tiller | 2014-12-05 23:48:58 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-17 09:14:54 +0000 |
| commit | 928d087f3b26c0d8e4233c4fdf6f856104d202a0 (patch) | |
| tree | d26f36b4b42142c37e20d064cde9052384b4bdbf /Library | |
| parent | 6d31f2de0acee7125f107981cabc0d1ea482602b (diff) | |
| download | homebrew-928d087f3b26c0d8e4233c4fdf6f856104d202a0.tar.bz2 | |
sdl: fix sdl_config prefix detection.
Deals with the issue flagged up in this commit:
https://github.com/Homebrew/homebrew/commit/0d6d0213dc4cc406cdfdcb5ba742b361a0ab2210
Closes #34721.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/sdl.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Library/Formula/sdl.rb b/Library/Formula/sdl.rb index 3b212d1e6..b831add2a 100644 --- a/Library/Formula/sdl.rb +++ b/Library/Formula/sdl.rb @@ -77,13 +77,13 @@ class Sdl < Formula # 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 @@ -94,6 +94,8 @@ class Sdl < Formula (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 |
