File 5851-gh-Fix-build-otp-tar-to-work-with-pre-24.patch of Package erlang

From 0ce625633e12501976ed34d607d46653e4badb1b Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Mon, 27 Jun 2022 12:21:02 +0200
Subject: [PATCH] gh: Fix build-otp-tar to work with pre 24

The script needs to work with pre 24 as it is used
to package pre-built archives for old releases in the
sync-github-releases script.
---
 scripts/build-otp-tar | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scripts/build-otp-tar b/scripts/build-otp-tar
index fc8344c76a..085fd5b297 100755
--- a/scripts/build-otp-tar
+++ b/scripts/build-otp-tar
@@ -541,7 +541,13 @@ if [ ! -d $src_dir -o ! -f $src_dir/otp_build ]; then
 fi
 
 progress "Checking target directory name"
-target_dirname=`$prebld_dir/erts/autoconf/config.guess`
+if [ -f "$prebld_dir/make/autoconf/config.guess" ]; then
+    target_dirname=`$prebld_dir/make/autoconf/config.guess`
+elif [ -f "$prebld_dir/erts/autoconf/config.guess" ]; then
+    target_dirname=`$prebld_dir/erts/autoconf/config.guess`
+else
+    error "Failed to find config.guess"
+fi
 if [  $? -ne 0 ]; then
     error "Failed to check target directory name"
 fi
-- 
2.35.3

openSUSE Build Service is sponsored by