From 8ebc8b7e82f91ba79ce95fd4ff099a70ce45299e Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 5 Feb 2014 20:37:36 -0500 Subject: ruby: specify paths to deps explicitly --- Library/Formula/ruby.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Library/Formula') diff --git a/Library/Formula/ruby.rb b/Library/Formula/ruby.rb index 110d8a53d..dbd44e5c2 100644 --- a/Library/Formula/ruby.rb +++ b/Library/Formula/ruby.rb @@ -37,7 +37,18 @@ class Ruby < Formula args << "--with-out-ext=tk" unless build.with? "tcltk" args << "--disable-install-doc" unless build.with? "doc" args << "--disable-dtrace" unless MacOS::CLT.installed? - args << "--with-opt-dir=#{Formula.factory('openssl').opt_prefix}" + + paths = [] + + paths.concat %w[readline gdbm gmp libffi].map { |dep| + Formula.factory(dep).opt_prefix if build.with? dep + }.compact + + paths.concat %w[libyaml openssl].map { |dep| + Formula.factory(dep).opt_prefix + } + + args << "--with-opt-dir=#{paths.join(":")}" # Put gem, site and vendor folders in the HOMEBREW_PREFIX ruby_lib = HOMEBREW_PREFIX/"lib/ruby" -- cgit v1.2.3