Skip to content

Instantly share code, notes, and snippets.

@lammermann
Created October 23, 2011 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lammermann/1307565 to your computer and use it in GitHub Desktop.
Save lammermann/1307565 to your computer and use it in GitHub Desktop.
patch for support to launch fop command on msys

Patch for support to launch fop command on MSYS/Windows

Put MSYS awake PATH translation into command bash script

Requirements

patch Install

wget http://apache.mirror.iphh.net/xmlgraphics/fop/binaries/fop-1.0-bin.zip
wget --no-check-certificate https://raw.github.com/gist/1307565/fop-1.0-bin-msys-support.patch
unzip fop-1.0-bin.zip
cat fop-1.0-bin-msys-support.patch | patch -p1
diff --git a/fop-1.0/fop b/fop-1.0/fop
index 3f2ac6f..7b1c703 100644
--- a/fop-1.0/fop
+++ b/fop-1.0/fop
@@ -75,9 +75,11 @@ fi
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
+msys=false;
darwin=false;
case "`uname`" in
CYGWIN*) cygwin=true ;;
+ MINGW*) msys=true ;;
Darwin*) darwin=true
if [ -z "$JAVA_HOME" ] ; then
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
@@ -114,6 +116,12 @@ if $cygwin ; then
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
+if $msys ; then
+ [ -n "$FOP_HOME" ] &&
+ FOP_HOME=`cd "$FOP_HOME" ; pwd -W`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cd "$JAVA_HOME" ; pwd -W`
+fi
if [ "$OS" = "Windows_NT" ] ; then
pathSepChar=";"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment