Date: Tue, 15 Sep 2020 18:57:19 +0000 (UTC) From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r548743 - in head/lang/nim: . files Message-ID: <202009151857.08FIvJdG041036@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pkubaj Date: Tue Sep 15 18:57:18 2020 New Revision: 548743 URL: https://svnweb.freebsd.org/changeset/ports/548743 Log: lang/nim: fix build on powerpc64 elfv1 Now newer GCC is required. Added: head/lang/nim/files/clang-patch-build.sh (contents, props changed) Modified: head/lang/nim/Makefile head/lang/nim/files/elfv1-patch-build.sh head/lang/nim/files/patch-config-nim.cfg Modified: head/lang/nim/Makefile ============================================================================== --- head/lang/nim/Makefile Tue Sep 15 18:56:21 2020 (r548742) +++ head/lang/nim/Makefile Tue Sep 15 18:57:18 2020 (r548743) @@ -1,4 +1,4 @@ -# Created by: Neal Nelson <ports@nicandneal.net> + Created by: Neal Nelson <ports@nicandneal.net> # $FreeBSD$ PORTNAME= nim @@ -18,7 +18,7 @@ BROKEN_sparc64= fails to build: build.sh: clang: not TEST_DEPENDS= node>=0:www/node -USES= compiler tar:xz +USES= compiler:c11 tar:xz USE_LDCONFIG= yes TOOLS_DESC= Build and install nim tools @@ -36,15 +36,17 @@ MAKE_JOBS_UNSAFE= yes TLIST= nimfind nimgrep nimpretty nimsuggest testament -.if ${ARCH} == "powerpc64" -. if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 +.if ${CHOSEN_COMPILER_TYPE} == "gcc" EXTRA_PATCHES= ${PATCHDIR}/elfv1-patch-build.sh -. endif +.else +EXTRA_PATCHES= ${PATCHDIR}/clang-patch-build.sh .endif 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: Added: head/lang/nim/files/clang-patch-build.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/nim/files/clang-patch-build.sh Tue Sep 15 18:57:18 2020 (r548743) @@ -0,0 +1,11 @@ +--- config/nim.cfg.orig 2020-04-03 17:22:53 UTC ++++ config/nim.cfg +@@ -8,7 +8,7 @@ + # Environment variables can be accessed like so: + # gcc.path %= "$CC_PATH" + +-cc = gcc ++cc = clang + + # additional options always passed to the compiler: + --parallel_build: "0" # 0 to auto-detect number of processors Modified: head/lang/nim/files/elfv1-patch-build.sh ============================================================================== --- head/lang/nim/files/elfv1-patch-build.sh Tue Sep 15 18:56:21 2020 (r548742) +++ head/lang/nim/files/elfv1-patch-build.sh Tue Sep 15 18:57:18 2020 (r548743) @@ -6,10 +6,20 @@ myos="freebsd" - CC="clang" + if [ "$ucpu" = "powerpc" ] ; then -+ CC="gcc" ++ 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 Modified: head/lang/nim/files/patch-config-nim.cfg ============================================================================== --- head/lang/nim/files/patch-config-nim.cfg Tue Sep 15 18:56:21 2020 (r548742) +++ head/lang/nim/files/patch-config-nim.cfg Tue Sep 15 18:57:18 2020 (r548743) @@ -1,15 +1,6 @@ ---- config/nim.cfg.orig 2020-04-03 17:22:53 UTC +--- config/nim.cfg.orig 2020-09-15 13:59:31 UTC +++ config/nim.cfg -@@ -8,7 +8,7 @@ - # Environment variables can be accessed like so: - # gcc.path %= "$CC_PATH" - --cc = gcc -+cc = clang - - # additional options always passed to the compiler: - --parallel_build: "0" # 0 to auto-detect number of processors -@@ -118,12 +118,6 @@ path="$lib/pure" +@@ -118,12 +119,6 @@ path="$lib/pure" clang.options.linker = "-ldl" clang.cpp.options.linker = "-ldl" tcc.options.linker = "-ldl"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009151857.08FIvJdG041036>