diff options
| author | Adam Vandenberg | 2014-05-08 08:03:25 -0700 | 
|---|---|---|
| committer | Adam Vandenberg | 2014-05-08 08:04:57 -0700 | 
| commit | 8a2945ecdbeaa6ded1eaacede16c0f0e5b79e026 (patch) | |
| tree | 4704a1558f05b32b778bf77955c6abed6c2ba9a9 /Library/Formula/io.rb | |
| parent | c91d4d5baf9a81b1ee97940f46676018900669bd (diff) | |
| download | homebrew-8a2945ecdbeaa6ded1eaacede16c0f0e5b79e026.tar.bz2 | |
Io: fix dependencies
Add some missing dependencies that can be found when building with
add-ons. Specifically disable add-ons that are known not to work.
Closes #29051.
Closes #26317.
Diffstat (limited to 'Library/Formula/io.rb')
| -rw-r--r-- | Library/Formula/io.rb | 74 | 
1 files changed, 45 insertions, 29 deletions
diff --git a/Library/Formula/io.rb b/Library/Formula/io.rb index 78e5b6343..38aa88f80 100644 --- a/Library/Formula/io.rb +++ b/Library/Formula/io.rb @@ -1,28 +1,34 @@ -require 'formula' +require "formula"  class Io < Formula -  homepage 'http://iolanguage.com/' -  url 'https://github.com/stevedekorte/io/archive/2013.12.04.tar.gz' -  sha1 '47d9a3e7a8e14c9fbe3b376e4967bb55f6c68aed' +  homepage "http://iolanguage.com/" +  url "https://github.com/stevedekorte/io/archive/2013.12.04.tar.gz" +  sha1 "47d9a3e7a8e14c9fbe3b376e4967bb55f6c68aed" -  head 'https://github.com/stevedekorte/io.git' +  head "https://github.com/stevedekorte/io.git" -  option 'without-addons', 'Build without addons' +  option "without-addons", "Build without addons" -  depends_on 'cmake' => :build +  depends_on "cmake" => :build    depends_on :python => :recommended -  depends_on 'libevent' -  depends_on 'libffi' -  depends_on 'ossp-uuid' -  depends_on 'pcre' -  depends_on 'yajl' -  depends_on 'xz' -  # Used by Bignum add-on -  depends_on 'gmp' if build.with? "addons" - -  # Used by Fonts add-on -  depends_on :freetype if build.with? "addons" +  if build.with? "addons" +    depends_on "glib" +    depends_on "cairo" +    depends_on "gmp" +    depends_on "jpeg" +    depends_on "libevent" +    depends_on "libffi" +    depends_on "libogg" +    depends_on "libpng" +    depends_on "libsndfile" +    depends_on "libtiff" +    depends_on "libvorbis" +    depends_on "ossp-uuid" +    depends_on "pcre" +    depends_on "yajl" +    depends_on "xz" +  end    fails_with :clang do      build 421 @@ -34,26 +40,36 @@ class Io < Formula    def install      ENV.j1 -    if build.without? 'addons' -      inreplace  "CMakeLists.txt", -        'add_subdirectory(addons)', -        '#add_subdirectory(addons)' +    if build.without? "addons" +      # Turn off all add-ons in main cmake file +      inreplace "CMakeLists.txt", +        "add_subdirectory(addons)", '#add_subdirectory(addons)' +    else +      # Turn off specific add-ons that are not currently working +      inreplace "addons/CMakeLists.txt" do |addons| +        # Looks for deprecated Freetype header +        addons.gsub! /(add_subdirectory\(Font\))/, '#\1' +        # Builds against older version of memcached library +        addons.gsub! /(add_subdirectory\(Memcached\))/, '#\1' +      end      end -    if build.without? 'python' -      inreplace  "addons/CMakeLists.txt", -        'add_subdirectory(Python)', -        '#add_subdirectory(Python)' + +    # Note, Python requires addons to be built +    if build.without? "python" +      inreplace "addons/CMakeLists.txt", +        "add_subdirectory(Python)", '#add_subdirectory(Python)'      end -    mkdir 'buildroot' do + +    mkdir "buildroot" do        system "cmake", "..", *std_cmake_args -      system 'make' +      system "make"        output = %x[./_build/binaries/io ../libs/iovm/tests/correctness/run.io]        if $?.exitstatus != 0          opoo "Test suite not 100% successful:\n#{output}"        else          ohai "Test suite ran successfully:\n#{output}"        end -      system 'make install' +      system "make install"      end    end  end  | 
