git: 39e8ccaa0654 - 2022Q2 - lang/ghc: Properly dereference a shell variable.

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Mon, 30 May 2022 20:14:08 UTC
The branch 2022Q2 has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=39e8ccaa065430d6e8ee3baa46c6772f0e02f899

commit 39e8ccaa065430d6e8ee3baa46c6772f0e02f899
Author:     Mark Millard <marklmi26-fbsd@yahoo.com>
AuthorDate: 2022-05-30 20:05:34 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2022-05-30 20:13:42 +0000

    lang/ghc: Properly dereference a shell variable.
    
    This makes GHC build system to pick up correct LLVM tools during the build on ARM.
    
    PR:             264192
    (cherry picked from commit afdc95c40d4f1fb2625f945fc70ecc558d56e6ca)
---
 lang/ghc/files/patch-aclocal.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lang/ghc/files/patch-aclocal.m4 b/lang/ghc/files/patch-aclocal.m4
index 2eb04c157343..dc83f27a23d7 100644
--- a/lang/ghc/files/patch-aclocal.m4
+++ b/lang/ghc/files/patch-aclocal.m4
@@ -14,7 +14,7 @@
  AC_DEFUN([FIND_LLVM_PROG],[
      # Test for program with and without version name.
 -    PROG_VERSION_CANDIDATES=$(for llvmVersion in `seq $4 -1 $3`; do echo "$2-$llvmVersion $2-$llvmVersion.0"; done)
-+    PROG_VERSION_CANDIDATES=$(for llvmVersion in `seq $4 -1 $3`; do echo "$2-$llvmVersion $2-$llvmVersion.0 $2$llvmVersion $2$llvmVersion0"; done)
++    PROG_VERSION_CANDIDATES=$(for llvmVersion in `seq $4 -1 $3`; do echo "$2-$llvmVersion $2-$llvmVersion.0 $2$llvmVersion $2${llvmVersion}0"; done)
      AC_CHECK_TOOLS([$1], [$PROG_VERSION_CANDIDATES $2], [])
      AS_IF([test x"$$1" != x],[
          PROG_VERSION=`$$1 --version | awk '/.*version [[0-9\.]]+/{for(i=1;i<=NF;i++){ if(\$i ~ /^[[0-9\.]]+$/){print \$i}}}'`