aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2002-07-15 15:17:24 +0800
committerglewis <glewis@FreeBSD.org>2002-07-15 15:17:24 +0800
commit11b872f2cc7ec73c10c063c94d62e936d46517b2 (patch)
tree1f350c5853e4a10eacfb5ad8e39198bb16da1266
parente8bbdb831080183bcb9d0a8e9494db0531e1058f (diff)
downloadfreebsd-ports-gnome-11b872f2cc7ec73c10c063c94d62e936d46517b2.tar.gz
freebsd-ports-gnome-11b872f2cc7ec73c10c063c94d62e936d46517b2.tar.zst
freebsd-ports-gnome-11b872f2cc7ec73c10c063c94d62e936d46517b2.zip
Remove unintentional dependency on readlink by replacing the call to it
with a piece of sh+awk based on a recent post to freebsd-arch by Cyrille Lefevre <cyrille.lefevre@laposte.net>.
-rw-r--r--java/jdk13/Makefile2
-rw-r--r--java/jdk14/Makefile2
-rw-r--r--java/jdk15/Makefile2
-rw-r--r--java/jdk16/Makefile2
4 files changed, 4 insertions, 4 deletions
diff --git a/java/jdk13/Makefile b/java/jdk13/Makefile
index a6c683ac8c20..1c74eb0f8619 100644
--- a/java/jdk13/Makefile
+++ b/java/jdk13/Makefile
@@ -123,7 +123,7 @@ pre-patch:
pre-build:
@if [ "$${WRKDIRPREFIX}" -a \
-L "/compat/linux/$${WRKDIRPREFIX}" -a \
- x`readlink "/compat/linux/$${WRKDIRPREFIX}"` = x"$${WRKDIRPREFIX}" ]; \
+ x`ls -ld "/compat/linux/$${WRKDIRPREFIX}" 2>/dev/null | awk '/->/{print $$NF;exit 0}END{exit 1}'` = x"$${WRKDIRPREFIX}" ]; \
then \
echo "Please set WRKDIRPREFIX to something which doesn't"; \
echo "have a matching symbolic link in /compat/linux."; \
diff --git a/java/jdk14/Makefile b/java/jdk14/Makefile
index a6c683ac8c20..1c74eb0f8619 100644
--- a/java/jdk14/Makefile
+++ b/java/jdk14/Makefile
@@ -123,7 +123,7 @@ pre-patch:
pre-build:
@if [ "$${WRKDIRPREFIX}" -a \
-L "/compat/linux/$${WRKDIRPREFIX}" -a \
- x`readlink "/compat/linux/$${WRKDIRPREFIX}"` = x"$${WRKDIRPREFIX}" ]; \
+ x`ls -ld "/compat/linux/$${WRKDIRPREFIX}" 2>/dev/null | awk '/->/{print $$NF;exit 0}END{exit 1}'` = x"$${WRKDIRPREFIX}" ]; \
then \
echo "Please set WRKDIRPREFIX to something which doesn't"; \
echo "have a matching symbolic link in /compat/linux."; \
diff --git a/java/jdk15/Makefile b/java/jdk15/Makefile
index a6c683ac8c20..1c74eb0f8619 100644
--- a/java/jdk15/Makefile
+++ b/java/jdk15/Makefile
@@ -123,7 +123,7 @@ pre-patch:
pre-build:
@if [ "$${WRKDIRPREFIX}" -a \
-L "/compat/linux/$${WRKDIRPREFIX}" -a \
- x`readlink "/compat/linux/$${WRKDIRPREFIX}"` = x"$${WRKDIRPREFIX}" ]; \
+ x`ls -ld "/compat/linux/$${WRKDIRPREFIX}" 2>/dev/null | awk '/->/{print $$NF;exit 0}END{exit 1}'` = x"$${WRKDIRPREFIX}" ]; \
then \
echo "Please set WRKDIRPREFIX to something which doesn't"; \
echo "have a matching symbolic link in /compat/linux."; \
diff --git a/java/jdk16/Makefile b/java/jdk16/Makefile
index a6c683ac8c20..1c74eb0f8619 100644
--- a/java/jdk16/Makefile
+++ b/java/jdk16/Makefile
@@ -123,7 +123,7 @@ pre-patch:
pre-build:
@if [ "$${WRKDIRPREFIX}" -a \
-L "/compat/linux/$${WRKDIRPREFIX}" -a \
- x`readlink "/compat/linux/$${WRKDIRPREFIX}"` = x"$${WRKDIRPREFIX}" ]; \
+ x`ls -ld "/compat/linux/$${WRKDIRPREFIX}" 2>/dev/null | awk '/->/{print $$NF;exit 0}END{exit 1}'` = x"$${WRKDIRPREFIX}" ]; \
then \
echo "Please set WRKDIRPREFIX to something which doesn't"; \
echo "have a matching symbolic link in /compat/linux."; \