From 7836be7b54a19dbbe54ea7bd1d452e5a85c1399d Mon Sep 17 00:00:00 2001 From: David Holm Date: Sat, 19 Jan 2013 21:16:29 +0100 Subject: [PATCH] Wine --devel upgraded to 1.5.22 This version includes the new experimental Mac driver which means it can be run without X11. As the driver is still incomplete and buggy X11 is still the default and instructions on how to switch are included in caveats. Also, supports building a non-universal binary (i.e. only win64) support and checking for universal dependencies thanks to #14456. Closes #17185. Signed-off-by: Adam Vandenberg --- Library/Formula/wine.rb | 61 +++++++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 11 deletions(-) diff --git a/Library/Formula/wine.rb b/Library/Formula/wine.rb index c4e12784adc5..8b738a3b654b 100644 --- a/Library/Formula/wine.rb +++ b/Library/Formula/wine.rb @@ -5,8 +5,8 @@ class WineGecko < Formula sha1 'c30aa99621e98336eb4b7e2074118b8af8ea2ad5' devel do - url 'http://downloads.sourceforge.net/wine/wine_gecko-1.8-x86.msi', :using => :nounzip - sha1 'a8622ff749cc2a2cb311f902b7e99664ecc2f8d6' + url 'http://downloads.sourceforge.net/wine/wine_gecko-1.9-x86.msi', :using => :nounzip + sha1 'd2553224848a926eacfa8685662ff1d7e8be2428' end end @@ -27,15 +27,19 @@ class Wine < Formula # updating too # * http://wiki.winehq.org/Gecko # * http://wiki.winehq.org/Mono - url 'http://downloads.sourceforge.net/project/wine/Source/wine-1.5.21.tar.bz2' - sha256 'ac77c1dd1a31ccc67f0391b4965959096aeb98745f52c4d91b7bd280e3c8b350' + url 'http://downloads.sourceforge.net/project/wine/Source/wine-1.5.22.tar.bz2' + sha256 'db08a40a5e6fce050b5cca7782d396ed3a9b1dfb23b9915dad93efb886fc6739' end env :std + option :universal + depends_on :x11 depends_on 'jpeg' depends_on 'libicns' + depends_on 'libtiff' + depends_on 'little-cms' fails_with :llvm do build 2336 @@ -62,6 +66,14 @@ def wine_wrapper; <<-EOS.undent EOS end + def winemac_key; <<-EOS.undent + REGEDIT4 + [HKEY_CURRENT_USER\\Software\\Wine\\Drivers] + "Graphics"="mac,x11" + "Ime"="osxime,mac,x11" + EOS + end + def install # Build 32-bit; Wine doesn't support 64-bit host builds on OS X. build32 = "-arch i386 -m32" @@ -78,14 +90,27 @@ def install ENV.append "CXXFLAGS", "-D_DARWIN_NO_64_BIT_INODE" ENV.append "LDFLAGS", "#{build32} -framework CoreServices -lz -lGL -lGLU" - args = ["--prefix=#{prefix}", - "--x-include=#{MacOS::X11.include}", - "--x-lib=#{MacOS::X11.lib}", - "--with-x", - "--with-coreaudio", - "--with-opengl"] + # Workarounds for XCode not including pkg-config files + ENV.libxml2 + ENV.append "LDFLAGS", "-lxslt" + + args = %W[--prefix=#{prefix} + --with-coreaudio + --with-opengl + --with-x + --x-include=#{MacOS::X11.include} + --x-lib=#{MacOS::X11.lib}] args << "--disable-win16" if MacOS.version == :leopard or ENV.compiler == :clang + if not build.universal? + opoo <<-EOS.undent + Not building a universal wine, you will only be able to run + applications built for win64! To get support for win32 build with: + brew install wine --universal + + EOS + args << "--enable-win64" + end # 64-bit builds of mpg123 are incompatible with 32-bit builds of Wine args << "--without-mpg123" if Hardware.is_64_bit? @@ -105,6 +130,8 @@ def install # and name our startup script wine mv bin/'wine', bin/'wine.bin' (bin/'wine').write(wine_wrapper) + + (prefix/'winemac.key').write(winemac_key) unless build.stable? end def caveats @@ -118,8 +145,8 @@ def caveats Or check out: http://code.google.com/p/osxwinebuilder/ EOS - # see http://bugs.winehq.org/show_bug.cgi?id=31374 unless build.stable? + # see http://bugs.winehq.org/show_bug.cgi?id=31374 s += <<-EOS.undent The current version of Wine contains a partial implementation of dwrite.dll @@ -127,6 +154,18 @@ def caveats We recommend that you run winecfg, add an override for dwrite in the Libraries tab, and edit the override mode to "disable". EOS + s += <<-EOS.undent + + Starting with wine 1.5.22 the new experimental Mac driver by CodeWeavers has + been included in the main distribution. This allows wine to run without X11 + on MacOS X. To enable it execute the following command in your wine prefix: + + wine regedit #{prefix/'winemac.key'} + + To disable it execute: + + wine regedit /D 'HKEY_CURRENT_USER\\Software\\Wine\\Drivers' + EOS end return s end