2012-09-10 10:36:29 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Henplus < Formula
|
|
|
|
homepage 'https://github.com/neurolabs/henplus'
|
|
|
|
url 'https://github.com/downloads/neurolabs/henplus/henplus-0.9.8.tar.gz'
|
|
|
|
sha1 'ab1fc3a2ec5a6c8f434d2965d9bbe2121030ffd1'
|
|
|
|
|
2014-05-30 19:58:04 +00:00
|
|
|
depends_on :ant => :build
|
2012-09-10 10:36:29 +00:00
|
|
|
depends_on 'libreadline-java'
|
|
|
|
|
|
|
|
def install
|
2014-05-20 22:10:29 +00:00
|
|
|
ENV['JAVA_HOME'] = `/usr/libexec/java_home`.chomp
|
2012-09-10 10:36:29 +00:00
|
|
|
|
|
|
|
inreplace 'bin/henplus' do |s|
|
|
|
|
s.gsub! "LD_LIBRARY_PATH", "DYLD_LIBRARY_PATH"
|
2014-11-19 21:31:08 +00:00
|
|
|
s.change_make_var! "DYLD_LIBRARY_PATH", Formula["libreadline-java"].opt_lib
|
2012-09-10 10:36:29 +00:00
|
|
|
s.gsub! "$THISDIR/..", HOMEBREW_PREFIX
|
|
|
|
s.gsub! "share/java/libreadline-java.jar",
|
|
|
|
"share/libreadline-java/libreadline-java.jar"
|
|
|
|
end
|
|
|
|
|
2013-03-07 10:09:53 +00:00
|
|
|
system 'ant', 'install', "-Dprefix=#{prefix}"
|
2012-09-10 10:36:29 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
You may need to set JAVA_HOME:
|
|
|
|
export JAVA_HOME="$(/usr/libexec/java_home)"
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2014-05-21 20:37:23 +00:00
|
|
|
system bin/"henplus", "--help"
|
2012-09-10 10:36:29 +00:00
|
|
|
end
|
|
|
|
end
|