<commit_before>require 'formula'

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

class WineGeckoOld < Formula
  url 'http://downloads.sourceforge.net/wine/wine_gecko-1.0.0-x86.cab', :using => :nounzip
  sha1 'afa22c52bca4ca77dcb9edb3c9936eb23793de01'
end

class Wine < Formula
  homepage 'http://winehq.org/'

  if ARGV.flag? '--devel'
    url 'http://downloads.sourceforge.net/project/wine/Source/wine-1.3.29.tar.bz2'
    sha256 '41fa0f7a9d67de65bd5813405a49b3f6b91a1672cde85570b22a567cd7ef24d6'
  else
    url 'http://downloads.sourceforge.net/project/wine/Source/wine-1.2.3.tar.bz2'
    sha256 '3fd8d3f2b466d07eb90b8198cdc9ec3005917a4533db7b8c6c69058a2e57c61f'
  end

  head 'git://source.winehq.org/git/wine.git'

  depends_on 'jpeg'
  depends_on 'libicns'

  # gnutls not needed since 1.3.16
  depends_on 'gnutls' unless ARGV.flag? '--devel' or ARGV.build_head?

  fails_with_llvm :build => 2326

  # the following libraries are currently not specified as dependencies, or not built as 32-bit:
  # configure: libsane, libv4l, libgphoto2, liblcms, gstreamer-0.10, libcapi20, libgsm, libtiff

  # Wine loads many libraries lazily using dlopen calls, so it needs these paths
  # to be searched by dyld.
  # Including /usr/lib because wine, as of 1.3.15, tries to dlopen
  # libncurses.5.4.dylib, and fails to find it without the fallback path.

  def wine_wrapper; <<-EOS
#!/bin/sh
DYLD_FALLBACK_LIBRARY_PATH="/usr/X11/lib:#{HOMEBREW_PREFIX}/lib:/usr/lib" "#{bin}/wine.bin" "$@"
EOS
  end

  def install
    ENV.x11
<commit_msg>Wine: Still fails with LLVM<commit_after>require 'formula'

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

class WineGeckoOld < Formula
  url 'http://downloads.sourceforge.net/wine/wine_gecko-1.0.0-x86.cab', :using => :nounzip
  sha1 'afa22c52bca4ca77dcb9edb3c9936eb23793de01'
end

class Wine < Formula
  homepage 'http://winehq.org/'

  if ARGV.flag? '--devel'
    url 'http://downloads.sourceforge.net/project/wine/Source/wine-1.3.29.tar.bz2'
    sha256 '41fa0f7a9d67de65bd5813405a49b3f6b91a1672cde85570b22a567cd7ef24d6'
  else
    url 'http://downloads.sourceforge.net/project/wine/Source/wine-1.2.3.tar.bz2'
    sha256 '3fd8d3f2b466d07eb90b8198cdc9ec3005917a4533db7b8c6c69058a2e57c61f'
  end

  head 'git://source.winehq.org/git/wine.git'

  depends_on 'jpeg'
  depends_on 'libicns'

  # gnutls not needed since 1.3.16
  depends_on 'gnutls' unless ARGV.flag? '--devel' or ARGV.build_head?

  fails_with_llvm 'Wine dies with an "Unhandled exception code" when built with LLVM'

  # the following libraries are currently not specified as dependencies, or not built as 32-bit:
  # configure: libsane, libv4l, libgphoto2, liblcms, gstreamer-0.10, libcapi20, libgsm, libtiff

  # Wine loads many libraries lazily using dlopen calls, so it needs these paths
  # to be searched by dyld.
  # Including /usr/lib because wine, as of 1.3.15, tries to dlopen
  # libncurses.5.4.dylib, and fails to find it without the fallback path.

  def wine_wrapper; <<-EOS
#!/bin/sh
DYLD_FALLBACK_LIBRARY_PATH="/usr/X11/lib:#{HOMEBREW_PREFIX}/lib:/usr/lib" "#{bin}/wine.bin" "$@"
EOS
  end

  def install
    ENV.x11

{'fraction_non_alphanumeric': 0.11607936037903464, 'fraction_numerical': 0.10541901095647024, 'mean_word_length': 4.221020092735703, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1423451', 'n_tokens_mistral': 1637, 'n_tokens_neox': 1393, 'n_words': 279}