aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/sdl_image.rb
blob: 6e412c7cfcc6ccefc6070c40fa3538a029518517 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'formula'

class SdlImage < Formula
  url 'http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.10.tar.gz'
  homepage 'http://www.libsdl.org/projects/SDL_image'
  md5 '6c06584b31559e2b59f2b982d0d1f628'

  depends_on 'sdl'

  def options
    [['--universal', 'Build universal binaries.']]
  end

  def install
    ENV.universal_binary if ARGV.build_universal?
    ENV.x11 # For Freetype
    inreplace 'SDL_image.pc.in', '@prefix@', HOMEBREW_PREFIX

    system "./configure", "--prefix=#{prefix}",
                          "--disable-dependency-tracking",
                          "--disable-sdltest",
                          "--with-freetype-exec-prefix=/usr/X11"
    system "make install"
  end
end