Skip to content

Instantly share code, notes, and snippets.

@masutaka
Last active September 27, 2015 13:07
Show Gist options
  • Save masutaka/1274072 to your computer and use it in GitHub Desktop.
Save masutaka/1274072 to your computer and use it in GitHub Desktop.
Formula of migemo
require 'formula'
class Migemo < Formula
url 'http://0xcc.net/migemo/migemo-0.40.tar.gz'
homepage 'http://0xcc.net/migemo/'
md5 '7021c45096b6816fccf16f8389324a91'
depends_on 'emacs'
depends_on 'ruby-bsearch'
depends_on 'ruby-romkan'
def install
ENV['RUBYLIB'] = "#{HOMEBREW_PREFIX}/lib/ruby";
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}", "--with-rubydir=#{prefix}/lib/ruby"
system "make"
system "make install"
end
def caveats; <<-EOS.undent
To export the needed variable, add this to your dotfiles.
* On Bash, add this to `~/.bash_profile`.
* On Zsh, add this to `~/.zprofile` instead.
export RUBYLIB=#{HOMEBREW_PREFIX}/lib/ruby
To export the needed expression, add this to your `~/.emacs`.
(require 'migemo)
EOS
end
end
require 'formula'
class RubyBsearch < Formula
url 'http://0xcc.net/ruby-bsearch/ruby-bsearch-1.5.tar.gz'
homepage 'http://0xcc.net/ruby-bsearch/'
md5 'fb3cb15bb3546fb3b5d4ba5a61baeea1'
def install
system "mkdir -p #{prefix}/lib/ruby"
system "install -c -m 644 bsearch.rb #{prefix}/lib/ruby"
end
end
require 'formula'
class RubyRomkan < Formula
url 'http://0xcc.net/ruby-romkan/ruby-romkan-0.4.tar.gz'
homepage 'http://0xcc.net/ruby-romkan/'
md5 'bc48a51bd6cf0e4ff1d73faffef531fb'
def install
system "mkdir -p #{prefix}/lib/ruby"
system "install -c -m 644 romkan.rb #{prefix}/lib/ruby"
end
end
@masutaka
Copy link
Author

masutaka commented Oct 9, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment