aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMax Howell2009-10-23 19:02:02 +0100
committerMax Howell2009-10-23 19:22:51 +0100
commitd37ab41604b3c212cd0d6ce59f3a000977498892 (patch)
tree34d7e44eaac4a67d4e3c398030eccdd73fa6a22f /Library/Formula
parenta49c87d4b73d10c92a6ee7485c8190ae9694c1fc (diff)
downloadhomebrew-d37ab41604b3c212cd0d6ce59f3a000977498892.tar.bz2
Fix SDL pc files and sdl-config
So many tools expect all SDL modules to be installed in the same place. So we have to change the prefix path to HOMEBREW_PREFIX. This is probably the correct thing to do in general in fact.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/sdl.rb11
-rw-r--r--Library/Formula/sdl_image.rb2
-rw-r--r--Library/Formula/sdl_mixer.rb3
3 files changed, 15 insertions, 1 deletions
diff --git a/Library/Formula/sdl.rb b/Library/Formula/sdl.rb
index ac1ea92f3..275d28dae 100644
--- a/Library/Formula/sdl.rb
+++ b/Library/Formula/sdl.rb
@@ -5,13 +5,22 @@ class Sdl <Formula
homepage 'http://www.libsdl.org/'
md5 'e52086d1b508fa0b76c52ee30b55bec4'
+ # we have to do this because most build scripts assume that all sdl modules
+ # are installed to the same prefix. Consequently SDL stuff cannot be
+ # keg-only but I doubt that will be needed.
+ def self.use_homebrew_prefix files
+ files.each {|f| inreplace f, '@prefix@', HOMEBREW_PREFIX}
+ end
+
def install
ENV.gcc_4_2
+ Sdl.use_homebrew_prefix %w[sdl.pc.in sdl-config.in]
+
system "./configure", "--prefix=#{prefix}", "--disable-debug",
"--disable-dependency-tracking",
"--disable-nasm"
system "make install"
-
+
# Copy source files needed for Ojective-C support.
libexec.install Dir["src/main/macosx/*"]
end
diff --git a/Library/Formula/sdl_image.rb b/Library/Formula/sdl_image.rb
index 3192b7a2c..88124c870 100644
--- a/Library/Formula/sdl_image.rb
+++ b/Library/Formula/sdl_image.rb
@@ -1,4 +1,5 @@
require 'formula'
+require Formula.path('sdl')
class SdlImage <Formula
url 'http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.8.tar.gz'
@@ -10,6 +11,7 @@ class SdlImage <Formula
def install
ENV.x11 # For Freetype
+ Sdl.use_homebrew_prefix 'SDL_image.pc.in'
system "./configure", "--prefix=#{prefix}",
"--disable-debug",
diff --git a/Library/Formula/sdl_mixer.rb b/Library/Formula/sdl_mixer.rb
index 231baea63..c77f37b41 100644
--- a/Library/Formula/sdl_mixer.rb
+++ b/Library/Formula/sdl_mixer.rb
@@ -1,4 +1,5 @@
require 'formula'
+require Formula.path('sdl')
class SdlMixer <Formula
url 'http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.9.tar.gz'
@@ -11,6 +12,8 @@ class SdlMixer <Formula
#depends_on 'smpeg' => :optional # http://icculus.org/smpeg/
def install
+ Sdl.use_homebrew_prefix 'SDL_mixer.pc.in'
+
system "./configure", "--prefix=#{prefix}",
"--disable-debug",
"--disable-dependency-tracking"