You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-db/henplus/files/henplus.patch

43 lines
1.3 KiB

--- a/bin/henplus 2004-02-02 14:53:28.000000000 +0100
+++ b/bin/henplus 2004-07-23 11:21:11.518166136 +0200
@@ -2,6 +2,7 @@
# $Id: henplus.patch,v 1.5 2008/11/17 20:54:11 flameeyes Exp $
##
+echo $(dirname $0)
# additional flags you might want to pass to the java interpreter
# like -Dfile.encoding=ISO-8859-1
JAVA_FLAGS=
@@ -13,20 +14,8 @@
JAVA=$JAVA_HOME/bin/java
fi
-##------------------
-THISDIR=`dirname $0`
-HENPLUSDIR=$THISDIR/../share/henplus
-
-# not yet installed ? Then look in the build directory
-if [ ! -d "$HENPLUSDIR" ] ; then
- HENPLUSDIR=$THISDIR/../build
-fi
-
-# location of the readline lib.
-# Modify this, if you installation stores this at a different
-# position.
-LD_LIBRARY_PATH=$THISDIR/../lib:/usr/lib/jni:$LD_LIBRARY_PATH
-CLASSPATH=$CLASSPATH:$THISDIR/../share/java/libreadline-java.jar
+HENPLUSDIR=$(dirname $(java-config -p henplus))
+CLASSPATH=$CLASSPATH:$(java-config -p libreadline-java)
# you may just throw your own jar files in this dir.
# (like additional JDBC-drivers, that are not in default
@@ -65,7 +54,4 @@
CLASSPATH=$CLASSPATH:$f
fi
done
-
-export CLASSPATH LD_LIBRARY_PATH
-
-exec $JAVA $JAVA_FLAGS henplus.HenPlus "$@"
+LD_LIBRARY_PATH="$(java-config -i libreadline-java):$LD_LIBRARY_PATH" exec $JAVA -cp $CLASSPATH $JAVA_FLAGS henplus.HenPlus "$@"