git: fa1853a31021 - main - lang/nim: remove ELFv1 support

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Fri, 05 Jan 2024 21:05:04 UTC
The branch main has been updated by pkubaj:

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

commit fa1853a31021d6f924dfe1952027e1cdb68977a2
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2024-01-05 19:08:49 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2024-01-05 21:04:11 +0000

    lang/nim: remove ELFv1 support
---
 lang/nim/Makefile                                  | 13 -----------
 lang/nim/files/elfv1-patch-build.sh                | 25 ----------------------
 .../files/{clang-patch-build.sh => patch-build.sh} |  0
 3 files changed, 38 deletions(-)

diff --git a/lang/nim/Makefile b/lang/nim/Makefile
index bf2ca8375e75..c4bb97383e8c 100644
--- a/lang/nim/Makefile
+++ b/lang/nim/Makefile
@@ -31,21 +31,8 @@ TEST_BINARY_ALIAS=	node=nodejs
 
 TLIST=		nimgrep nimpretty nimsuggest testament
 
-.if ${CHOSEN_COMPILER_TYPE} == "gcc"
-EXTRA_PATCHES=	${PATCHDIR}/elfv1-patch-build.sh
-.else
-EXTRA_PATCHES=	${PATCHDIR}/clang-patch-build.sh
-.endif
-
 NIMDIR=	${STAGEDIR}${PREFIX}/nim
 
-post-patch:
-.if defined(PPC_ABI) && ${PPC_ABI} == ELFv1
-	@${REINPLACE_CMD} -e '/cc =/s/clang/gcc/' ${WRKSRC}/config/nim.cfg
-	@${REINPLACE_CMD} -e s/%%GCC_DEFAULT%%/${GCC_DEFAULT}/ \
-		${WRKSRC}/build.sh ${WRKSRC}/config/nim.cfg
-.endif
-
 do-build:
 	cd ${WRKSRC} && ${SETENV} CC="${CC}" LINKER="${CC}" \
 		COMP_FLAGS="${CPPFLAGS} ${CFLAGS}" LINK_FLAGS="${LDFLAGS}" \
diff --git a/lang/nim/files/elfv1-patch-build.sh b/lang/nim/files/elfv1-patch-build.sh
deleted file mode 100644
index 556eedaca8e1..000000000000
--- a/lang/nim/files/elfv1-patch-build.sh
+++ /dev/null
@@ -1,25 +0,0 @@
---- build.sh.orig	2019-10-24 12:53:39 UTC
-+++ build.sh
-@@ -84,7 +84,11 @@
-     ;;
-   *freebsd* )
-     myos="freebsd"
--    CC="clang"
-+    if [ "$ucpu" = "powerpc" ] ; then
-+      CC="gcc%%GCC_DEFAULT%%"
-+	else
-+      CC="clang"
-+    fi
-     LINK_FLAGS="$LINK_FLAGS -lm"
-     ;;
-   *openbsd* )
---- config/nim.cfg.orig	2020-09-15 13:59:31 UTC
-+++ config/nim.cfg
-@@ -9,6 +9,7 @@
- #  gcc.path %= "$CC_PATH"
- 
- cc = gcc
-+gcc.exe = "gcc%%GCC_DEFAULT%%"
- 
- # additional options always passed to the compiler:
- --parallel_build: "0" # 0 to auto-detect number of processors
diff --git a/lang/nim/files/clang-patch-build.sh b/lang/nim/files/patch-build.sh
similarity index 100%
rename from lang/nim/files/clang-patch-build.sh
rename to lang/nim/files/patch-build.sh