2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-10-04 13:48:56 +00:00
|
|
|
|
|
|
|
class Wine <Formula
|
2010-04-12 21:47:57 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/wine/Source/wine-1.1.42.tar.bz2'
|
|
|
|
sha1 'ea932f19528a22eacc49f16100dbf2251cb4ad5c'
|
2009-10-04 13:48:56 +00:00
|
|
|
homepage 'http://www.winehq.org/'
|
2010-01-10 09:13:49 +00:00
|
|
|
head 'git://source.winehq.org/git/wine.git'
|
2009-10-10 11:36:36 +00:00
|
|
|
|
2009-10-04 13:48:56 +00:00
|
|
|
depends_on 'jpeg'
|
2009-10-10 11:36:36 +00:00
|
|
|
depends_on 'mpg123' => :optional
|
2009-10-04 13:48:56 +00:00
|
|
|
|
2010-03-25 17:45:32 +00:00
|
|
|
def wine_wrapper; <<-EOS
|
|
|
|
#!/bin/sh
|
|
|
|
DYLD_FALLBACK_LIBRARY_PATH="/usr/X11/lib" \
|
|
|
|
"#{bin}/wine.bin" "$@"
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
2009-10-04 13:48:56 +00:00
|
|
|
def install
|
2009-10-10 11:36:36 +00:00
|
|
|
# Wine does not compile with LLVM yet
|
|
|
|
ENV.gcc_4_2
|
2009-10-04 13:48:56 +00:00
|
|
|
ENV.x11
|
|
|
|
|
2009-10-10 11:36:36 +00:00
|
|
|
# Make sure we build 32bit version, because Wine64 is not fully functional yet
|
2009-10-04 13:48:56 +00:00
|
|
|
build32 = "-arch i386 -m32"
|
|
|
|
|
|
|
|
ENV["LIBS"] = "-lGL -lGLU"
|
2009-11-16 18:41:26 +00:00
|
|
|
ENV.append "CFLAGS", build32
|
|
|
|
ENV.append "CXXFLAGS", "-D_DARWIN_NO_64_BIT_INODE"
|
|
|
|
ENV.append "LDFLAGS", [build32, "-framework CoreServices", "-lz", "-lGL -lGLU"].join(' ')
|
|
|
|
ENV.append "DYLD_FALLBACK_LIBRARY_PATH", "/usr/X11/lib"
|
2009-10-04 13:48:56 +00:00
|
|
|
|
2010-04-01 21:08:40 +00:00
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--disable-win16"
|
2009-10-04 13:48:56 +00:00
|
|
|
system "make install"
|
2010-03-25 17:45:32 +00:00
|
|
|
|
|
|
|
# Use a wrapper script, so rename wine to wine.bin
|
|
|
|
# and name our startup script wine
|
|
|
|
mv (bin+'wine'), (bin+'wine.bin')
|
|
|
|
(bin+'wine').write(wine_wrapper)
|
2009-10-04 13:48:56 +00:00
|
|
|
end
|
|
|
|
|
2010-04-01 21:08:40 +00:00
|
|
|
def caveats
|
|
|
|
<<-EOS.undent
|
|
|
|
You may also want to get winetricks:
|
|
|
|
brew install winetricks
|
2009-10-04 13:48:56 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|