2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-28 03:06:02 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Fop < Formula
|
2009-09-28 03:06:02 +00:00
|
|
|
homepage "http://xmlgraphics.apache.org/fop/index.html"
|
2013-05-09 20:06:44 +00:00
|
|
|
url "http://www.apache.org/dyn/closer.cgi?path=/xmlgraphics/fop/binaries/fop-1.1-bin.tar.gz"
|
|
|
|
sha1 '6b96c3f3fd5efe9f2b6b54bfa96161ec3f6a1dbc'
|
2011-09-27 10:10:13 +00:00
|
|
|
|
2013-08-07 03:39:32 +00:00
|
|
|
# http://offo.sourceforge.net/hyphenation/
|
|
|
|
resource 'hyph' do
|
2014-02-27 14:19:55 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/offo/offo-hyphenation-utf8/0.1/offo-hyphenation-fop-stable-utf8.zip'
|
2013-08-07 03:39:32 +00:00
|
|
|
sha1 'c2a3f6e985b21c9702a714942ac747864c8b1759'
|
|
|
|
end
|
|
|
|
|
2014-03-11 08:47:25 +00:00
|
|
|
def patches
|
|
|
|
# fixes broken default java path as in
|
|
|
|
# http://svn.apache.org/viewvc/ant/core/trunk/src/script/ant?r1=1238725&r2=1434680&pathrev=1434680&view=patch
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
2009-09-28 03:06:02 +00:00
|
|
|
def install
|
2010-07-06 14:52:37 +00:00
|
|
|
libexec.install Dir["*"]
|
2012-08-07 18:20:52 +00:00
|
|
|
bin.write_exec_script libexec/'fop'
|
2013-08-07 03:39:32 +00:00
|
|
|
resource('hyph').stage do
|
2013-07-19 14:44:57 +00:00
|
|
|
(libexec/'build').install 'fop-hyph.jar'
|
|
|
|
end
|
2009-09-28 03:06:02 +00:00
|
|
|
end
|
|
|
|
end
|
2014-03-11 08:47:25 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/fop b/fop
|
|
|
|
index aca642b..1cae344 100755
|
|
|
|
--- a/fop
|
|
|
|
+++ b/fop
|
|
|
|
@@ -81,7 +81,11 @@ case "`uname`" in
|
|
|
|
CYGWIN*) cygwin=true ;;
|
|
|
|
Darwin*) darwin=true
|
|
|
|
if [ -z "$JAVA_HOME" ] ; then
|
|
|
|
- JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
|
|
|
|
+ if [ -x '/usr/libexec/java_home' ] ; then
|
|
|
|
+ JAVA_HOME=`/usr/libexec/java_home`
|
|
|
|
+ elif [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" ]; then
|
|
|
|
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
|
|
|
|
+ fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|