<commit_before>require 'formula'

class Ogre19 < Formula
  homepage 'http://www.ogre3d.org/'

  stable do
    url 'https://bitbucket.org/sinbad/ogre/get/v1-9-0.tar.gz'
    version '1.9.0'
    sha1 'dd1c0a27ff76a34d3c0daf7534ab9cd16e399f86'

    patch do
      url 'https://gist.githubusercontent.com/NikolausDemmel/2b11d1b49b35cd27a102/raw/3af6b11889a90d7e35bb90cdb34c46ea8334eaf3/fix-1.9.0-release.diff'
      sha1 '9ad217fc33690f76fd857ba49c3840715d4f3527'
    end
  end

  devel do
    url 'https://bitbucket.org/sinbad/ogre/get/v1-9.tar.bz2'
    version '1.9.1-devel'
    sha1 '4036621e8ce2af77f3ed77a61e1976de6d722d3b'

    patch do
      url 'https://gist.github.com/NikolausDemmel/2b11d1b49b35cd27a102/raw/bf4a4d16020821218f73db0d56aa111ab2fde679/fix-1.9-HEAD.diff'
      sha1 '90bef44c2a821bba3254c011b0aa0f5ecedeb788'
    end
  end

  patch do
    url 'https://gist.githubusercontent.com/hgaiser/9ed14de3d776cd34100e/raw/38c7a88cab9067e88a21f1386fbb8ac1aaeed8ac/window.patch'
    sha1 'c520d0641183bb275a0b29ef6188353bc2ba6217'
  end

  #head 'https://bitbucket.org/sinbad/ogre', :using => :hg
  #patch :DATA

  depends_on 'boost'
  depends_on 'cmake' => :build
  depends_on 'doxygen'
  depends_on 'freeimage'
  depends_on 'freetype'
  depends_on 'libzzip'
  depends_on 'tbb'
  depends_on :x11

  option 'with-cg'

  def install
    ENV.m64

    cmake_args = [
      "-DCMAKE_OSX_ARCHITECTURES='x86_64'",
      "-DOGRE_BUILD_LIBS_AS_FRAMEWORKS=OFF",
      "-DOGRE_FULL_RPATH:BOOL=FALSE",
      "-DOGRE_BUILD_DOCS:BOOL=FALSE",
      "-DOGRE_INSTALL_DOCS:BOOL=FALSE",<commit_msg>[ogre1.9] move cocoa window only to "stable" 1.9.0 version<commit_after>require 'formula'

class Ogre19 < Formula
  homepage 'http://www.ogre3d.org/'

  stable do
    url 'https://bitbucket.org/sinbad/ogre/get/v1-9-0.tar.gz'
    version '1.9.0'
    sha1 'dd1c0a27ff76a34d3c0daf7534ab9cd16e399f86'

    patch do
      url 'https://gist.githubusercontent.com/NikolausDemmel/2b11d1b49b35cd27a102/raw/3af6b11889a90d7e35bb90cdb34c46ea8334eaf3/fix-1.9.0-release.diff'
      sha1 '9ad217fc33690f76fd857ba49c3840715d4f3527'
    end

    patch do
      # COMMENT @NikolausDemmel 2015-02-15
      # it seems that in the latest v1-9 branch there is a different fix for this:
      # https://bitbucket.org/sinbad/ogre/src/f40744b1106a0ce3b2cd0eadfd05bcf344f28167/RenderSystems/GL/src/OSX/OgreOSXCocoaWindow.mm?at=v1-9#cl-285
      # i.e. this patch is possibly obsolete
      url 'https://gist.githubusercontent.com/hgaiser/9ed14de3d776cd34100e/raw/38c7a88cab9067e88a21f1386fbb8ac1aaeed8ac/window.patch'
      sha1 'c520d0641183bb275a0b29ef6188353bc2ba6217'
    end
  end

  devel do
    url 'https://bitbucket.org/sinbad/ogre/get/v1-9.tar.bz2'
    version '1.9.1-devel'
    sha1 'aa9b0c6d371802e0535515758e88c4893045cd5f'

    patch do
      url 'https://gist.github.com/NikolausDemmel/2b11d1b49b35cd27a102/raw/bf4a4d16020821218f73db0d56aa111ab2fde679/fix-1.9-HEAD.diff'
      sha1 '90bef44c2a821bba3254c011b0aa0f5ecedeb788'
    end
  end

  #head 'https://bitbucket.org/sinbad/ogre', :using => :hg
  #patch :DATA

  depends_on 'boost'
  depends_on 'cmake' => :build
  depends_on 'doxygen'
  depends_on 'freeimage'
  depends_on 'freetype'
  depends_on 'libzzip'
  depends_on 'tbb'
  depends_on :x11

  option 'with-cg'

  def install
    ENV.m64

    cmake_args = [
      "-DCMAKE_OSX_ARCHITECTURES='x86_64'",
      "-DOGRE_BUILD_LIBS_AS_FRAMEWORKS=OFF",
      "-DOGRE_FULL_RPATH:BOOL=FALSE",
      "-DOGRE_BUILD_DOCS:BOOL=FALSE",
      "-DOGRE_INSTALL_DOCS:BOOL=FALSE",
{'fraction_non_alphanumeric': 0.10973201692524683, 'fraction_numerical': 0.1616361071932299, 'mean_word_length': 3.798376184032476, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 13, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5056346', 'n_tokens_mistral': 1887, 'n_tokens_neox': 1611, 'n_words': 192}