Skip to content

Commit

Permalink
Update SDL for Snow Leopard. Add libmikmod.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamv committed Oct 21, 2009
1 parent 54d8383 commit c21db3b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 38 deletions.
12 changes: 12 additions & 0 deletions Library/Formula/libmikmod.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require 'formula'

class Libmikmod <Formula
url 'http://mikmod.raphnet.net/files/libmikmod-3.2.0-beta2.tar.bz2'
homepage 'http://mikmod.raphnet.net/'
md5 '5b05f3b1167eba7855b8e38bde2b8070'

def install
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
system "make install"
end
end
11 changes: 3 additions & 8 deletions Library/Formula/sdl.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
require 'formula'

class Sdl <Formula
@url='http://www.libsdl.org/release/SDL-1.2.13.tar.gz'
@homepage='http://www.libsdl.org/index.php'
@md5='c6660feea2a6834de10bc71b2f8e4d88'

def patches
{ :p0 => "http://methylblue.com/junk/libsdl-1.2.13-10.6.patch" }
end
url 'http://www.libsdl.org/release/SDL-1.2.14.tar.gz'
homepage 'http://www.libsdl.org/'
md5 'e52086d1b508fa0b76c52ee30b55bec4'

def install
ENV.gcc_4_2
system "./configure", "--prefix=#{prefix}", "--disable-debug",
"--disable-dependency-tracking",
"--disable-video-x11",
"--disable-nasm"
system "make install"

Expand Down
4 changes: 2 additions & 2 deletions Library/Formula/sdl_image.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
require 'formula'

class SdlImage <Formula
url 'http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.7.tar.gz'
url 'http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.8.tar.gz'
homepage 'http://www.libsdl.org/projects/SDL_image'
md5 'a729ff61f74f0a45ec7fe36354cf938e'
md5 '2e7c3efa0ec2acc039c46960e27c0792'

depends_on 'libpng'
depends_on 'sdl'
Expand Down
34 changes: 6 additions & 28 deletions Library/Formula/sdl_mixer.rb
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
require 'formula'

class SdlMixer <Formula
url 'http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.8.tar.gz'
url 'http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.9.tar.gz'
homepage 'http://www.libsdl.org/projects/SDL_mixer/'
md5 '0b5b91015d0f3bd9597e094ba67c4d65'
md5 'a9eb8750e920829ff41dbe7555850156'

depends_on 'sdl'
depends_on 'flac' => :optional
depends_on 'libmikmod' => :optional
#depends_on 'smpeg' => :optional # http://icculus.org/smpeg/

def patches
# http://www.libsdl.org/cgi/viewvc.cgi/trunk/SDL_mixer/configure.in?r1=4868&r2=4867&pathrev=4868
DATA
end

def install
# We use a private include folder, and then
# symlink the header file ourselves.
# See: http://github.com/mxcl/homebrew/issues#issue/62
system "./configure", "--prefix=#{prefix}",
"--includedir=#{prefix}/priv_include",
"--disable-debug",
"--disable-dependency-tracking",
# http://trac.macports.org/changeset/58317
"--disable-music-native-midi"
"--disable-dependency-tracking"
system "make install"

# Hack alert:
Expand All @@ -30,21 +26,3 @@ def install
FileUtils.ln_s "#{prefix}/priv_include/SDL/SDL_mixer.h", "#{HOMEBREW_PREFIX}/include/SDL"
end
end


__END__
--- a/configure.in 2009/09/27 19:23:04 4867
+++ b/configure.in 2009/09/27 19:34:09 4868
@@ -221,8 +221,10 @@
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lwinmm"
;;
*-*-darwin*)
- use_music_native_midi=yes
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuickTime -Wl,-framework,CoreServices"
+ # This doesn't work on Mac OS X 10.5+
+ # Max Horn (the original author) recommends disabling it for now.
+ #use_music_native_midi=yes
+ #EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuickTime -Wl,-framework,CoreServices"
;;
esac
if test x$use_music_native_midi = xyes; then

0 comments on commit c21db3b

Please sign in to comment.