Ignore:
Timestamp:
May 28, 2012 4:56:08 PM (9 years ago)
Author:
kytv <kytv@…>
Branches:
master
Children:
af398632
Parents:
d946fda
Message:

minor updates to jbigi/jcpuid scripts

  • use my find-java-home stub script when building jcupid
  • move find-java-home to core/c
  • add support for ArchLinux? to find-java-home
File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/c/jcpuid/build.sh

    rd946fda re574b5e  
    4242            UNIXTYPE="linux"
    4343        fi
     44        # If JAVA_HOME isn't set, try to figure it out on our own
     45        [ -z $JAVA_HOME ] && . ../find-java-home
     46        # JAVA_HOME being set doesn't guarantee that it's usable
     47        if [ ! -f "$JAVA_HOME/include/jni.h" ]; then
     48            echo "Please ensure you have a Java SDK installed" >&2
     49            echo "and/or set JAVA_HOME then re-run this script." >&2
     50            exit 1
     51        fi
    4452
    45         # If JAVA_HOME is set elsewhere, obey it. Otherwise we'll try to
    46         # deduce its location ourselves.
    47         if [ -z "${JAVA_HOME}" ]; then
    48             if [ ${UNIXTYPE} = "freebsd" ]; then
    49                 if [ -d /usr/local/openjdk6 ]; then
    50                     JAVA_HOME="/usr/local/openjdk6"
    51                 elif [ -d /usr/local/openjdk7 ]; then
    52                     JAVA_HOME="/usr/local/openjdk7"
    53                 fi
    54             elif [ ${UNIXTYPE} = "openbsd" ]; then # The default in 4.9
    55                 if [ -d /usr/local/jdk-1.7.0 ]; then
    56                     JAVA_HOME="/usr/local/jdk-1.7.0"
    57                 fi
    58             elif [ ${UNIXTYPE} = "netbsd" ]; then
    59                 if [ -d /usr/pkg/java/openjdk7 ]; then
    60                     JAVA_HOME="/usr/pkg/java/openjdk7"
    61                 fi
    62             elif [ ${UNIXTYPE} = "linux" -a -e /etc/debian_version ]; then
    63                 if [ -d /usr/lib/jvm/default-java ]; then
    64                     JAVA_HOME="/usr/lib/jvm/default-java"
    65                 fi
    66             fi
    67         fi
     53        # Abort script on uncaught errors
     54        set -e
     55
    6856        case `uname -m` in
    6957            x86_64*|amd64)
     
    7866        esac
    7967
    80         # JAVA_HOME being set doesn't guarantee that it's usable
    81         if [ ! -r ${JAVA_HOME}/include/jni.h ]; then
    82             echo "Please ensure you have a Java SDK installed"
    83             echo "and/or set JAVA_HOME then re-run this script."
    84             exit 1
    85         fi
    8668        LINKFLAGS="-shared -Wl,-soname,libjcpuid-${ARCH}-${UNIXTYPE}.so"
    8769        LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-${ARCH}-${UNIXTYPE}.so"
Note: See TracChangeset for help on using the changeset viewer.