Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
wine: use resources
Browse files Browse the repository at this point in the history
  • Loading branch information
adamv committed Sep 12, 2013
1 parent 4d7222e commit 560dee5
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions Library/Formula/wine.rb
@@ -1,15 +1,5 @@
require 'formula'

class WineGecko < Formula
url 'http://downloads.sourceforge.net/wine/wine_gecko-2.21-x86.msi', :using => :nounzip
sha1 'a514fc4d53783a586c7880a676c415695fe934a3'
end

class WineMono < Formula
url 'http://downloads.sourceforge.net/wine/wine-mono-0.0.8.msi', :using => :nounzip
sha1 'dd349e72249ce5ff981be0e9dae33ac4a46a9f60'
end

# NOTE: When updating Wine, please check Wine-Gecko and Wine-Mono for updates too:
# http://wiki.winehq.org/Gecko
# http://wiki.winehq.org/Mono
Expand Down Expand Up @@ -50,6 +40,16 @@ def build.universal? ; true; end
depends_on 'little-cms2'
end

resource 'gecko' do
url 'http://downloads.sourceforge.net/wine/wine_gecko-2.21-x86.msi', :using => :nounzip
sha1 'a514fc4d53783a586c7880a676c415695fe934a3'
end

resource 'mono do'

This comment has been minimized.

Copy link
@manphiz

manphiz Sep 12, 2013

Contributor

Looks like should be
resource 'mono' do

url 'http://downloads.sourceforge.net/wine/wine-mono-0.0.8.msi', :using => :nounzip
sha1 'dd349e72249ce5ff981be0e9dae33ac4a46a9f60'
end

fails_with :llvm do
build 2336
cause 'llvm-gcc does not respect force_align_arg_pointer'
Expand Down Expand Up @@ -123,18 +123,16 @@ def install
end

system "make install"

# Don't need Gnome desktop support
(share/'applications').rmtree

# Download Gecko and Mono once so we don't need to redownload for each prefix
WineGecko.new('winegecko').brew { (share+'wine/gecko').install Dir["*"] }
WineMono.new('winemono').brew { (share+'wine/mono').install Dir["*"] }
(share/'wine/gecko').install resource('gecko')
(share/'wine/mono').install resource('mono')

# 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)

# Don't need Gnome desktop support
(share/'applications').rmtree
end

def caveats
Expand Down

2 comments on commit 560dee5

@kevinxucs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error: /usr/local/Library/Formula/wine.rb:163: syntax error, unexpected kEND, expecting $end
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/formulary.rb:40:in `require'
/usr/local/Library/Homebrew/formulary.rb:40:in `klass'
/usr/local/Library/Homebrew/formulary.rb:90:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:175:in `factory'
/usr/local/Library/Homebrew/formula.rb:432:in `factory'
/usr/local/Library/Homebrew/formula.rb:384:in `installed'
/usr/local/Library/Homebrew/formula.rb:382:in `map'
/usr/local/Library/Homebrew/formula.rb:382:in `installed'
/usr/local/Library/Homebrew/cmd/outdated.rb:16:in `outdated_brews'
/usr/local/Library/Homebrew/cmd/upgrade.rb:15:in `upgrade'
/usr/local/Library/brew.rb:95:in `send'
/usr/local/Library/brew.rb:95

@manphiz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed by e76ae4e.

Please sign in to comment.