freebsd-ports/java/linux-blackdown-jre11/files/patch-ab
Greg Lewis a443c5dcee . Unbreak this port. The binaries call the program "arch" to determine
the architecture.  Unfortunately arch doesn't exist on FreeBSD or in
  linux_base or linux_base-8.  Since "arch" is simply "uname -m" implement
  it as such and make sure its in the path when running any of the
  binaries.
2003-09-29 18:20:06 +00:00

48 lines
1.3 KiB
Plaintext

$FreeBSD$
--- bin/jre.orig Mon Sep 18 18:08:12 2000
+++ bin/jre Mon Sep 29 11:16:16 2003
@@ -6,7 +6,7 @@
export THREADS_TYPE
progname=`basename $0`
-ARCH=`arch`
+ARCH=`uname -m`
case $1 in
-native)
@@ -21,13 +21,13 @@
if [ -z "$JAVA_HOME" ]
then
- PRG=`type -p $0` >/dev/null 2>&1
+ PRG=$0
# If PRG is a symlink, trace it to the real home directory
while [ -L "$PRG" ]
do
- newprg=`expr "\`/bin/ls -l "$PRG"\`" : ".*$PRG -> \(.*\)"`
- expr "$newprg" : / >/dev/null || newprg="`dirname $PRG`/$newprg"
+ newprg=`/compat/linux/usr/bin/expr "\`/bin/ls -l "$PRG"\`" : ".*$PRG -> \(.*\)"`
+ /compat/linux/usr/bin/expr "$newprg" : / >/dev/null || newprg="`dirname $PRG`/$newprg"
PRG="$newprg"
done
@@ -58,8 +58,15 @@
fi
export CLASSPATH
-LD_LIBRARY_PATH="$JAVA_HOME/lib/${ARCH}/$THREADS_TYPE:$LD_LIBRARY_PATH"
+if [ "x${LD_LIBRARY_PATH}" != "x" ]; then
+ LD_LIBRARY_PATH="$JAVA_HOME/lib/${ARCH}/$THREADS_TYPE:$LD_LIBRARY_PATH"
+else
+ LD_LIBRARY_PATH="$JAVA_HOME/lib/${ARCH}/$THREADS_TYPE"
+fi
export LD_LIBRARY_PATH
+
+PATH="$JAVA_HOME/bin:$PATH"
+export PATH
XFILESEARCHPATH="$JAVA_HOME/lib/locale/%L/%T/%N%C%S:$JAVA_HOME/lib/locale/%l/%T/%N%C%S:$JAVA_HOME/lib/locale/%T/%N%C%S:$JAVA_HOME/lib/locale/%L/%T/%N%S:$JAVA_HOME/lib/locale/%l/%T/%N%S:$JAVA_HOME/lib/locale/%T/%N%S:$XFILESEARCHPATH:%D"
export XFILESEARCHPATH