Created
August 4, 2012 16:19
-
-
Save yyolk/3258648 to your computer and use it in GitHub Desktop.
RubyCocoa homebrew formula
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Rubycocoa <Formula | |
url 'http://downloads.sourceforge.net/project/rubycocoa/RubyCocoa/1.0.2/RubyCocoa-1.0.2.tar.gz' | |
homepage 'http://rubycocoa.sourceforge.net/' | |
md5 'eb6127054b808c2700c6253c8a4793c3' | |
def keg_only? | |
:provided_by_osx | |
end | |
def install | |
# Preinstall hook installs Xcode docs and templates | |
rm "pre-install.rb" | |
system "ruby", "install.rb", "config", | |
"--prefix=#{prefix}", | |
"--frameworks=#{prefix}/Frameworks" | |
system "ruby", "install.rb", "setup" | |
system "ruby", "install.rb", "install" | |
ln_sf "#{prefix}/Frameworks/RubyCocoa.framework", "/Library/Frameworks" | |
ruby_prefix = `ruby -rrbconfig -e "puts Config::CONFIG['prefix']"`.chomp | |
Dir["#{prefix}/lib/**/*"].each do |src| | |
dest = src.sub(/^#{prefix}/, ruby_prefix) | |
if File.file?(src) | |
mkdir_p File.dirname(dest) | |
ln_sf src, dest | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment