diff options
| author | Jonathan Jacobs | 2011-09-27 12:10:13 +0200 |
|---|---|---|
| committer | Adam Vandenberg | 2012-02-04 09:02:06 -0800 |
| commit | 22825f59d22b10fb34116b9bbc1ed30ba2f4f76e (patch) | |
| tree | 2dd651be02086d61f8b83237064e9573719661d5 /Library/Formula | |
| parent | 64397ad99fbe604419a8559d0f01923b47effcf5 (diff) | |
| download | homebrew-22825f59d22b10fb34116b9bbc1ed30ba2f4f76e.tar.bz2 | |
fop: run in headless mode
Run apache FOP in headless mode to avoid creating a dock icon and stealing UI focus.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/fop.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Library/Formula/fop.rb b/Library/Formula/fop.rb index dc082a8b1..9fcdadb26 100644 --- a/Library/Formula/fop.rb +++ b/Library/Formula/fop.rb @@ -5,6 +5,11 @@ class Fop < Formula url "http://www.apache.org/dyn/closer.cgi?path=/xmlgraphics/fop/binaries/fop-1.0-bin.tar.gz" md5 "3186f93a314bdcb710bd7cb02d80404c" + # Run in headless mode to avoid having it appear on the Dock and stealing UI focus. + def patches + DATA + end + def shim_script target <<-EOS.undent #!/bin/bash @@ -17,3 +22,28 @@ class Fop < Formula (bin+'fop').write shim_script('fop') end end + + +__END__ +diff --git a/fop b/fop +index 3f2ac6f..c9167bb 100755 +--- a/fop ++++ b/fop +@@ -19,6 +19,7 @@ + + rpm_mode=true + fop_exec_args= ++java_exec_args="-Djava.awt.headless=true" + no_config=false + fop_exec_debug=false + show_help=false +@@ -247,7 +248,7 @@ fi + + # Execute FOP using eval/exec to preserve spaces in paths, + # java options, and FOP args +-fop_exec_command="exec \"$JAVACMD\" $LOGCHOICE $LOGLEVEL -classpath \"$LOCALCLASSPATH\" $FOP_OPTS org.apache.fop.cli.Main $fop_exec_args" ++fop_exec_command="exec \"$JAVACMD\" $java_exec_args $LOGCHOICE $LOGLEVEL -classpath \"$LOCALCLASSPATH\" $FOP_OPTS org.apache.fop.cli.Main $fop_exec_args" + if $fop_exec_debug ; then + echo $fop_exec_command + fi + |
