aboutsummaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2003-08-23 15:17:29 +0000
committerGreg Lewis <glewis@FreeBSD.org>2003-08-23 15:17:29 +0000
commitd73e9f7a293ae53831be4069774df6fa14407eea (patch)
tree15392ed0ccf6ef27482130c1949836d4a64c0cac /java
parentea0720403fe0bd5cc27e505f5a776e6ce5131f34 (diff)
downloadports-d73e9f7a293ae53831be4069774df6fa14407eea.tar.gz
ports-d73e9f7a293ae53831be4069774df6fa14407eea.zip
Notes
Diffstat (limited to 'java')
-rw-r--r--java/jdk12/Makefile6
-rw-r--r--java/jdk12/scripts/check_wrkdir_links.sh29
2 files changed, 31 insertions, 4 deletions
diff --git a/java/jdk12/Makefile b/java/jdk12/Makefile
index c7995a9f5fd9..9bda99e92da2 100644
--- a/java/jdk12/Makefile
+++ b/java/jdk12/Makefile
@@ -118,12 +118,10 @@ pre-patch:
.if defined(WITH_LINUX_BOOTSTRAP) || !exists(${PREFIX}/jdk${JDK_VERSION}/bin/javac)
# Some checks for bootstrapping with a Linux JDK
pre-build:
- @if [ "$${WRKDIRPREFIX}" -a \
- -L "/compat/linux/$${WRKDIRPREFIX}" -a \
- x`ls -ld "/compat/linux/$${WRKDIRPREFIX}" 2>/dev/null | ${AWK} '/->/{print $$NF;exit 0}END{exit 1}'` = x"$${WRKDIRPREFIX}" ]; \
+ @if [ `${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/check_wrkdir_links.sh "${WRKDIRPREFIX}" "${LINUXBASE}" 2>/dev/null` ]; \
then \
${ECHO_MSG} "Please set WRKDIRPREFIX to something which doesn't"; \
- ${ECHO_MSG} "have a matching symbolic link in /compat/linux."; \
+ ${ECHO_MSG} "have a matching symbolic link in ${LINUXBASE}."; \
${ECHO_MSG} "This is known to cause problems during bootstrapping."; \
exit 1; \
fi
diff --git a/java/jdk12/scripts/check_wrkdir_links.sh b/java/jdk12/scripts/check_wrkdir_links.sh
new file mode 100644
index 000000000000..a2f911204780
--- /dev/null
+++ b/java/jdk12/scripts/check_wrkdir_links.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+# $FreeBSD: /tmp/pcvs/ports/java/jdk12/scripts/Attic/check_wrkdir_links.sh,v 1.1 2003-08-23 15:17:29 glewis Exp $
+
+WRKDIRPREFIX=$1
+LINUXBASE=$2
+
+if [ "x${WRKDIRPREFIX}" = "x" -o "x${LINUXBASE}" = "x" ]; then
+ exit 0
+fi
+
+LINUXWRKDIRPREFIX="${LINUXBASE}/${WRKDIRPREFIX}"
+
+while [ "x${LINUXWRKDIRPREFIX}" != "x" ]; do
+ if [ -L "${LINUXWRKDIRPREFIX}" -a \
+ x`ls -ld "${LINUXWRKDIRPREFIX}" 2>/dev/null | \
+ awk '/->/{print $NF;exit 0}END{exit 1}'` = \
+ x"${WRKDIRPREFIX}" ]; then
+ echo "link"
+ exit 1
+ fi
+ if [ -L "${LINUXWRKDIRPREFIX}" ]; then
+ LINUXWRKDIRPREFIX=`ls -ld "${LINUXWRKDIRPREFIX}" 2>/dev/null | \
+ awk '/->/{print $NF;exit 0}END{exit 1}'`
+ else
+ break
+ fi
+done
+
+exit 0