forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
henplus.patch
42 lines (39 loc) · 1.25 KB
/
henplus.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- 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$
##
+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 "$@"