Files
macports-ports/java/openjdk8-powerpc/files/1012-toolchain.m4-hack-around-a-broken-Xcode-version-dete.patch
b34034dca7 openjdk8-powerpc: new port to support modern Java on PowerPC (#25186)
* openjdk8-powerpc: new port to support modern Java on PowerPC

* openjdk8-powerpc: non-functional: use .xz source

* openjdk8-powerpc: use a version-specific URL

Co-authored-by: Nils Breunese <nils@breun.nl>

* openjdk8-powerpc: install into MacPorts prefix

* openjdk8-powerpc: non-functional: change way to set datamodel

* openjdk8-powerpc: use openjdk-sources.osci.io for livecheck

---------

Co-authored-by: Nils Breunese <nils@breun.nl>
2024-08-17 22:46:29 +02:00

78 lines
3.1 KiB
Diff

From 5e6c5c476700f9bd27b6a4fb217859edcb466a28 Mon Sep 17 00:00:00 2001
From: barracuda156 <vital.had@gmail.com>
Date: Mon, 6 May 2024 21:18:03 +0800
Subject: [PATCH] toolchain.m4: hack around a broken Xcode version detect
Xcode version detection may or may not work. When it does not, it breaks configure.
Thankfully, we do not need it at all on Darwin PowerPC.
---
common/autoconf/generated-configure.sh | 19 ++-----------------
common/autoconf/toolchain.m4 | 16 +---------------
2 files changed, 3 insertions(+), 32 deletions(-)
diff --git common/autoconf/generated-configure.sh common/autoconf/generated-configure.sh
index 6f17436eff..fcef8fb4e2 100644
--- common/autoconf/generated-configure.sh
+++ common/autoconf/generated-configure.sh
@@ -26102,22 +26102,7 @@ fi
VALID_TOOLCHAINS=${!toolchain_var_name}
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- # On Mac OS X, default toolchain to clang after Xcode 5
- XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
- $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
- if test $? -ne 0; then
- as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
- fi
- XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
- $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
- $CUT -f 1 -d .`
- { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
-$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
- if test $XCODE_MAJOR_VERSION -ge 5; then
- DEFAULT_TOOLCHAIN="clang"
- else
- DEFAULT_TOOLCHAIN="gcc"
- fi
+ DEFAULT_TOOLCHAIN="gcc"
else
# First toolchain type in the list is the default
DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
@@ -27518,7 +27503,7 @@ $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run c
SET_DEVELOPER_DIR=
if test -n "$XCODE_PATH"; then
- DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
+ DEVELOPER_DIR="$XCODE_PATH"/Developer
fi
# DEVELOPER_DIR could also be provided directly
diff --git common/autoconf/toolchain.m4 common/autoconf/toolchain.m4
index ba4798e795..353ce121e4 100644
--- common/autoconf/toolchain.m4
+++ common/autoconf/toolchain.m4
@@ -151,21 +151,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
VALID_TOOLCHAINS=${!toolchain_var_name}
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- # On Mac OS X, default toolchain to clang after Xcode 5
- XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
- $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
- if test $? -ne 0; then
- AC_MSG_ERROR([Failed to determine Xcode version.])
- fi
- XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
- $SED -e 's/^Xcode \(@<:@1-9@:>@@<:@0-9.@:>@*\)/\1/' | \
- $CUT -f 1 -d .`
- AC_MSG_NOTICE([Xcode major version: $XCODE_MAJOR_VERSION])
- if test $XCODE_MAJOR_VERSION -ge 5; then
- DEFAULT_TOOLCHAIN="clang"
- else
- DEFAULT_TOOLCHAIN="gcc"
- fi
+ DEFAULT_TOOLCHAIN="gcc"
else
# First toolchain type in the list is the default
DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}