public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/nim/, dev-lang/nim/files/
@ 2024-06-17 20:43 Maciej Barć
  0 siblings, 0 replies; 8+ messages in thread
From: Maciej Barć @ 2024-06-17 20:43 UTC (permalink / raw
  To: gentoo-commits

commit:     97623a9f6c11a8fe3136c3995653e172939a761a
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 17 13:42:59 2024 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Mon Jun 17 20:42:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97623a9f

dev-lang/nim: drop old 1.6.14-r1

Closes: https://bugs.gentoo.org/900881
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 dev-lang/nim/Manifest                              |   2 -
 dev-lang/nim/files/nim-0.20.0-paths.patch          |  36 ----
 .../nim/files/nim-1.6.14-clang16-musl-fix.patch    |  13 --
 .../nim/files/nim-1.6.14-testament-skipfile.txt    |  61 ------
 dev-lang/nim/files/nim-1.6.6-csources-flags.patch  |  11 --
 dev-lang/nim/metadata.xml                          |   1 -
 dev-lang/nim/nim-1.6.14-r1.ebuild                  | 211 ---------------------
 7 files changed, 335 deletions(-)

diff --git a/dev-lang/nim/Manifest b/dev-lang/nim/Manifest
index 62f7ed856e14..68a08b1bb1b5 100644
--- a/dev-lang/nim/Manifest
+++ b/dev-lang/nim/Manifest
@@ -1,4 +1,2 @@
-DIST nim-1.6.14.tar.xz 5266632 BLAKE2B f6eadf44365a099f45d1b734dea494e5d098b0427791c19a5e0b7ee6fa8069fee606005920cbcbfd7c88a36ace870949ff797d1e37fc1f84e14d5dd1aeb4bd1d SHA512 6923ea98627ea48b5c939438618caa8e6860f248086e43bc101b543aa78e7c475bc8e56b8acb90dc4a3771ca0d2e27fbdda6a0b477dbb906acda8a7b39c272d3
 DIST nim-2.0.4.tar.xz 7620508 BLAKE2B cf7c737d734c5a468ac9229fb021bcd252c5c4f20ab091ec0ce27eb36ba44be8b438536aa39aa8c583483a7ce15dfbb91b1deb1c19794b3d77506d23096a4460 SHA512 1918b3d4a4fc02714677b2ca5051dc69e1d1daead2cf4dcc9b997076540d07d58ee4fe3049de86a37faa3143de1d3b95bedfa31f31d8463987bb267107459793
 DIST nim-atlas-0.8.0.tar.gz 59097 BLAKE2B 231b238ac3b15cc2c2d9ad927f80ae72d8ae4c649277515f32df6cc04275ccd38db5307d627572af547501e6522c06c86dc279dc3e13b5385f14e24032f6fe69 SHA512 747c13e2c5bd45a1dc6c1426f8c7637f638ada9dd4c9aa3edf4ef8367060e73226dc4bcde6380fac25ed47ebf4097fd223c72fadc3cceba8c71dd0f0571e47eb
-DIST nim-patches-1.6.6_p1.tar.gz 2632 BLAKE2B 64980d9510dc48e3c566473dc618d00cafba04783882d62b12015e8435c9c0515d7726da30f0b74dca6a41aa88a9c9aed2189a65b3325c28839d0051de8a3365 SHA512 7ba251675cd564452669bf5ec3748565db818324f58506f20a5036e4b54df10f4d7c149cece8cb97c853222cfa7d4d8d26856d92aaa25e613e31c6f5c2a8243d

diff --git a/dev-lang/nim/files/nim-0.20.0-paths.patch b/dev-lang/nim/files/nim-0.20.0-paths.patch
deleted file mode 100644
index a314eae2299b..000000000000
--- a/dev-lang/nim/files/nim-0.20.0-paths.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Default to <prefix>/usr/bin install.
-
-https://bugs.gentoo.org/635032
---- a/tools/niminst/install.nimf
-+++ b/tools/niminst/install.nimf
-@@ -28,13 +28,13 @@ if [ $# -eq 1 ] ; then
-       echo "sh deinstall.sh DIR"
-       exit 1
-       ;;
--    "/usr/bin")
--      bindir=/usr/bin
--      configdir=/etc/?proj
--      libdir=/usr/lib/?proj
--      docdir=/usr/share/?proj/doc
--      datadir=/usr/share/?proj/data
--      nimbleDir="/opt/nimble/pkgs/?c.nimblePkgName-?c.version"
-+    *)
-+      bindir=$1/usr/bin
-+      configdir=$1/etc/?proj
-+      libdir=$1/usr/lib/?proj
-+      docdir=$1/usr/share/?proj/doc
-+      datadir=$1/usr/share/?proj/data
-+      nimbleDir=$1"/opt/nimble/pkgs/?c.nimblePkgName-?c.version"
-       ;;
-     "/usr/local/bin")
-       bindir=/usr/local/bin
-@@ -68,6 +68,9 @@ if [ $# -eq 1 ] ; then
-       ;;
-   esac
- 
-+  mkdir -p $bindir
-+  mkdir -p $datadir
-+
-   mkdir -p $libdir
-   mkdir -p $docdir
-   mkdir -p $configdir

diff --git a/dev-lang/nim/files/nim-1.6.14-clang16-musl-fix.patch b/dev-lang/nim/files/nim-1.6.14-clang16-musl-fix.patch
deleted file mode 100644
index 1bc4f8f25d55..000000000000
--- a/dev-lang/nim/files/nim-1.6.14-clang16-musl-fix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Bug: https://bugs.gentoo.org/894410
-Refer: https://github.com/nim-lang/Nim/issues/20886#issuecomment-1511708198
---- a/lib/system/threadlocalstorage.nim
-+++ b/lib/system/threadlocalstorage.nim
-@@ -129,7 +129,7 @@ else:
-   when (defined(linux) or defined(nintendoswitch)) and defined(amd64):
-     type
-       SysThread* {.importc: "pthread_t",
--                  header: "<sys/types.h>" .} = distinct culong
-+                  header: "<sys/types.h>" .} = distinct pointer
-       Pthread_attr {.importc: "pthread_attr_t",
-                     header: "<sys/types.h>".} = object
-         abi: array[56 div sizeof(clong), clong]

diff --git a/dev-lang/nim/files/nim-1.6.14-testament-skipfile.txt b/dev-lang/nim/files/nim-1.6.14-testament-skipfile.txt
deleted file mode 100644
index 2e7e0b48f9fc..000000000000
--- a/dev-lang/nim/files/nim-1.6.14-testament-skipfile.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-# broken
-tests/assert/tassert_c.nim
-tests/async/tasync_traceback.nim
-tests/coroutines/twait.nim
-tests/errmsgs/t14444.nim
-tests/errmsgs/tcall_with_default_arg.nim
-tests/errmsgs/tproper_stacktrace.nim
-tests/errmsgs/tproper_stacktrace2.nim
-tests/errmsgs/tproper_stacktrace3.nim
-tests/exception/t13115.nim
-tests/js/tmangle.nim
-tests/js/twritestacktrace.nim
-tests/lent/tbasic_lent_check.nim
-tests/misc/trunner.nim
-tests/misc/tstrace.nim
-tests/misc/twarningaserror.nim
-tests/parser/t20922.nim
-tests/pragmas/thintprocessing.nim
-tests/pragmas/tused.nim
-tests/pragmas/twarning_off.nim
-tests/stdlib/tos.nim
-tests/stdlib/tstackframes.nim
-tests/stdlib/tstats.nim
-tests/system/talloc.nim
-tests/testament/tshould_not_work.nim
-# broken on musl + llvm
-tests/coroutines/tgc.nim
-tests/coroutines/twait.nim
-tests/misc/t18077.nim
-tests/misc/temit.nim
-tests/nimdoc/t15916.nim
-tests/nimdoc/trunnableexamples.nim
-tests/nimdoc/trunnableexamples2.nim
-tests/objects/tobjcov.nim
-tests/objects/toop1.nim
-tests/stdlib/tencodings.nim
-tests/stdlib/tgetaddrinfo.nim
-tests/stdlib/tstdlib_various.nim
-tests/stdlib/tstreams.nim
-tests/stdlib/ttimes.nim
-tests/vm/tvmmisc.nim
-# require network
-tests/stdlib/thttpclient.nim
-tests/stdlib/tnetconnect.nim
-tests/stdlib/tssl.nim
-# don't work without megatest
-tests/misc/tjoinable.nim
-tests/testament/tjoinable.nim
-# don't work with "--hint:all:off" hack
-tests/concepts/t3330.nim
-tests/stylecheck/t20397_2.nim
-tests/stylecheck/treject.nim
-tests/stylecheck/tusages.nim
-# need external dependencies
-tests/manyloc/keineschweine/keineschweine.nim
-tests/manyloc/nake/nakefile.nim
-tests/niminaction/Chapter7/Tweeter/src/tweeter.nim
-# need functional valgrind
-tests/destructor/tnewruntime_strutils.nim
-tests/destructor/tv2_raise.nim
-tests/views/tsplit_into_openarray.nim

diff --git a/dev-lang/nim/files/nim-1.6.6-csources-flags.patch b/dev-lang/nim/files/nim-1.6.6-csources-flags.patch
deleted file mode 100644
index 9a39a900e82a..000000000000
--- a/dev-lang/nim/files/nim-1.6.6-csources-flags.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/build.sh
-+++ b/build.sh
-@@ -60,7 +60,7 @@
-   fi
-   CC="sem -j $parallel --id $$ ${CC}"
- fi
--COMP_FLAGS="${CPPFLAGS:-} ${CFLAGS:-} -w -fmax-errors=3 -O3 -fno-strict-aliasing -fno-ident $extraBuildArgs"
-+COMP_FLAGS="${CPPFLAGS:-} ${CFLAGS:-} -w -fmax-errors=3 -fno-strict-aliasing -fno-ident $extraBuildArgs"
- LINK_FLAGS="${LDFLAGS:-} "
- PS4=""
- # platform detection

diff --git a/dev-lang/nim/metadata.xml b/dev-lang/nim/metadata.xml
index 43513b90b646..b2fef7a3d52d 100644
--- a/dev-lang/nim/metadata.xml
+++ b/dev-lang/nim/metadata.xml
@@ -41,7 +41,6 @@
     <remote-id type="github">nim-lang/Nim</remote-id>
   </upstream>
   <use>
-    <flag name="experimental">Apply experimental patches</flag>
     <flag name="test-js">Enable tests that require Node.js</flag>
   </use>
 </pkgmetadata>

diff --git a/dev-lang/nim/nim-1.6.14-r1.ebuild b/dev-lang/nim/nim-1.6.14-r1.ebuild
deleted file mode 100644
index 07e043cf4ffb..000000000000
--- a/dev-lang/nim/nim-1.6.14-r1.ebuild
+++ /dev/null
@@ -1,211 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PATCH_PV="1.6.6_p1"
-
-inherit bash-completion-r1 edo multiprocessing toolchain-funcs xdg-utils
-
-DESCRIPTION="Compiled, garbage-collected systems programming language"
-HOMEPAGE="https://nim-lang.org/"
-SRC_URI="
-	https://nim-lang.org/download/${P}.tar.xz
-	experimental? (
-		https://git.sr.ht/~cyber/${PN}-patches/archive/${PATCH_PV}.tar.gz
-			-> nim-patches-${PATCH_PV}.tar.gz
-	)
-"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~x86"
-IUSE="doc experimental test-js test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
-	test? (
-		dev-db/sqlite:3
-		dev-libs/boehm-gc
-		dev-libs/libffi
-		dev-libs/libpcre:3
-		dev-libs/openssl
-		media-libs/libsdl
-		media-libs/libsfml
-	)
-"
-BDEPEND="
-	sys-process/parallel
-	test? (
-		test-js? (
-			net-libs/nodejs
-		)
-	)
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-0.20.0-paths.patch
-	"${FILESDIR}"/${PN}-1.6.6-csources-flags.patch
-)
-
-# Borrowed from nim-utils.eclass (guru overlay).
-nim_gen_config() {
-	cat > nim.cfg <<- EOF || die "Failed to create Nim config"
-		cc:"gcc"
-		gcc.exe:"$(tc-getCC)"
-		gcc.linkerexe:"$(tc-getCC)"
-		gcc.cpp.exe:"$(tc-getCXX)"
-		gcc.cpp.linkerexe:"$(tc-getCXX)"
-		gcc.options.speed:"${CFLAGS}"
-		gcc.options.size:"${CFLAGS}"
-		gcc.options.debug:"${CFLAGS}"
-		gcc.options.always:"${CPPFLAGS}"
-		gcc.options.linker:"${LDFLAGS}"
-		gcc.cpp.options.speed:"${CXXFLAGS}"
-		gcc.cpp.options.size:"${CXXFLAGS}"
-		gcc.cpp.options.debug:"${CXXFLAGS}"
-		gcc.cpp.options.always:"${CPPFLAGS}"
-		gcc.cpp.options.linker:"${LDFLAGS}"
-
-		$([[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]] && echo '--colors:"off"')
-		-d:"release"
-		--parallelBuild:"$(makeopts_jobs)"
-
-		# some tests don't work with processing hints
-		--processing:"off"
-	EOF
-}
-
-src_prepare() {
-	default
-
-	# note: there are consumers in the ::guru overlay
-	use experimental && eapply "${WORKDIR}"/nim-patches-${PATCH_PV}
-
-	# refer: https://github.com/nim-lang/Nim/issues/20886#issuecomment-1511708198
-	# bug: https://bugs.gentoo.org/894410
-	use elibc_musl && eapply "${FILESDIR}"/${PN}-1.6.14-clang16-musl-fix.patch
-}
-
-src_configure() {
-	xdg_environment_reset  # bug 667182
-
-	unset NIMBLE_DIR
-	tc-export CC CXX LD
-
-	nim_gen_config
-
-	mkdir "${HOME}"/.parallel || die
-	touch "${HOME}"/.parallel/will-cite || die "parallel setup failed"
-}
-
-src_compile() {
-	local -x PATH="${S}/bin:${PATH}"
-
-	edo ./build.sh --parallel "$(makeopts_jobs)"
-
-	ebegin "Waiting for unfinished parallel jobs"
-	while [[ ! -f "bin/nim" ]] ; do
-		sleep 3
-	done
-	sleep 10
-	eend 0
-
-	edo chmod +x ./bin/nim
-	edo ./bin/nim compile koch
-	edo ./koch boot -d:nimUseLinenoise --skipParentCfg:off
-	edo ./koch tools
-
-	if use doc; then
-		local -a docargs=(
-			# set git tag
-			--git.commit:v${PV}
-			# skip runnableExamples as some of them need net
-			--docCmd:skip
-			# make logs less verbose
-			--hints:off
-			--warnings:off
-		)
-		edo ./koch doc "${docargs[@]}"
-		HTML_DOCS=( web/upload/${PV}/. )
-	fi
-}
-
-src_test() {
-	local -x PATH="${S}/bin:${PATH}"
-	local -a nimflags=(
-		# Leave only the safe hints enabled.
-		--hint:all:off
-		--hint:User:on
-		--hint:UserRaw:on
-	)
-	local -a testament_args=(
-		--skipFrom:"${FILESDIR}/${PN}-1.6.14-testament-skipfile.txt"
-		--nim:"bin/nim"
-		--targets:"$(usex test-js 'c js' 'c')"
-	)
-
-	[[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]] && \
-		testament_args+=( --colors:off )
-
-	local -a categories
-	readarray -t categories < <(find tests -mindepth 1 -maxdepth 1 -type d -printf "%P\n" | sort)
-
-	# AdditionalCategories from "testament/categories.nim".
-	categories+=( debugger examples lib )
-
-	local test_return=0
-
-	local tcat
-	local checkpoint
-	for tcat in "${categories[@]}"; do
-		# Use checkpoints for less painful testing.
-		checkpoint="${T}/.testament-${tcat}"
-
-		[[ -f "${checkpoint}" ]] && continue
-
-		case ${tcat} in
-			testdata )
-				:
-				;;
-			arc | ic | valgrind )
-				einfo "Skipped category '${tcat}'"
-				;;
-			* )
-				einfo "Running tests in category '${tcat}'"
-				nonfatal edo ./bin/testament "${testament_args[@]}" \
-						 category "${tcat}" "${nimflags[@]}" || test_return=1
-				;;
-		esac
-
-		touch "${checkpoint}" || die
-	done
-
-	[[ "${test_return}" -eq 1 ]] &&
-		die "tests failed, please inspect the failed test categories above"
-}
-
-src_install() {
-	local -x PATH="${S}/bin:${PATH}"
-
-	edo ./koch install "${ED}"
-	einstalldocs
-
-	# "./koch install" installs only "nim" binary but not the rest.
-	local exe
-	for exe in bin/* ; do
-		[[ "${exe}" == bin/nim ]] && continue
-		dobin "${exe}"
-	done
-
-	newbashcomp tools/nim.bash-completion nim
-	newbashcomp dist/nimble/nimble.bash-completion nimble
-
-	insinto /usr/share/zsh/site-functions
-	newins tools/nim.zsh-completion _nim
-	newins dist/nimble/nimble.zsh-completion _nimble
-
-	# Install the @nim-rebuild set for Portage.
-	insinto /usr/share/portage/config/sets
-	newins "${FILESDIR}"/nim-sets.conf nim.conf
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/nim/, dev-lang/nim/files/
@ 2024-04-24 17:10 Maciej Barć
  0 siblings, 0 replies; 8+ messages in thread
From: Maciej Barć @ 2024-04-24 17:10 UTC (permalink / raw
  To: gentoo-commits

commit:     4dfbeec29ef4a3f9cd41c91510affdb332ecb432
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 24 17:06:59 2024 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Wed Apr 24 17:10:50 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4dfbeec2

dev-lang/nim: skip tests broken on CI

Closes: https://bugs.gentoo.org/930542
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 .../nim/files/nim-2.0.4-testament-skipfile.txt     | 80 ++++++++++++++++++++++
 dev-lang/nim/nim-2.0.4.ebuild                      |  2 +-
 2 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/dev-lang/nim/files/nim-2.0.4-testament-skipfile.txt b/dev-lang/nim/files/nim-2.0.4-testament-skipfile.txt
new file mode 100644
index 000000000000..0e209464c4fb
--- /dev/null
+++ b/dev-lang/nim/files/nim-2.0.4-testament-skipfile.txt
@@ -0,0 +1,80 @@
+# -*- conf -*-
+# broken, bug https://bugs.gentoo.org/930542
+tests/c/temit.nim
+tests/ccgbugs/t10964.nim
+tests/niminaction/Chapter3/ChatApp/src/client.nim
+tests/niminaction/Chapter3/various3.nim
+tests/niminaction/Chapter6/WikipediaStats/concurrency.nim
+tests/niminaction/Chapter6/WikipediaStats/concurrency_regex.nim
+tests/niminaction/Chapter6/WikipediaStats/parallel_counts.nim
+tests/niminaction/Chapter8/sdl/sdl_test.nim
+tests/parallel/tdeepcopy.nim
+tests/parallel/tdeepcopy2.nim
+tests/parallel/tflowvar.nim
+tests/parallel/tlet_spawn.nim
+tests/parallel/tpi.nim
+tests/parallel/tsysspawn.nim
+tests/parallel/twaitany.nim
+tests/stdlib/thttpclient_ssl.nim
+tests/stdlib/tthreadpool.nim
+# broken
+tests/assert/tassert_c.nim
+tests/async/tasync_traceback.nim
+tests/coroutines/twait.nim
+tests/errmsgs/t14444.nim
+tests/errmsgs/tcall_with_default_arg.nim
+tests/errmsgs/tproper_stacktrace.nim
+tests/errmsgs/tproper_stacktrace2.nim
+tests/errmsgs/tproper_stacktrace3.nim
+tests/exception/t13115.nim
+tests/js/tmangle.nim
+tests/js/twritestacktrace.nim
+tests/lent/tbasic_lent_check.nim
+tests/misc/trunner.nim
+tests/misc/tstrace.nim
+tests/misc/twarningaserror.nim
+tests/parser/t20922.nim
+tests/pragmas/thintprocessing.nim
+tests/pragmas/tused.nim
+tests/pragmas/twarning_off.nim
+tests/stdlib/tos.nim
+tests/stdlib/tstackframes.nim
+tests/stdlib/tstats.nim
+tests/system/talloc.nim
+tests/testament/tshould_not_work.nim
+# broken on musl + llvm
+tests/coroutines/tgc.nim
+tests/coroutines/twait.nim
+tests/misc/t18077.nim
+tests/misc/temit.nim
+tests/nimdoc/t15916.nim
+tests/nimdoc/trunnableexamples.nim
+tests/nimdoc/trunnableexamples2.nim
+tests/objects/tobjcov.nim
+tests/objects/toop1.nim
+tests/stdlib/tencodings.nim
+tests/stdlib/tgetaddrinfo.nim
+tests/stdlib/tstdlib_various.nim
+tests/stdlib/tstreams.nim
+tests/stdlib/ttimes.nim
+tests/vm/tvmmisc.nim
+# require network
+tests/stdlib/thttpclient.nim
+tests/stdlib/tnetconnect.nim
+tests/stdlib/tssl.nim
+# don't work without megatest
+tests/misc/tjoinable.nim
+tests/testament/tjoinable.nim
+# don't work with "--hint:all:off" hack
+tests/concepts/t3330.nim
+tests/stylecheck/t20397_2.nim
+tests/stylecheck/treject.nim
+tests/stylecheck/tusages.nim
+# need external dependencies
+tests/manyloc/keineschweine/keineschweine.nim
+tests/manyloc/nake/nakefile.nim
+tests/niminaction/Chapter7/Tweeter/src/tweeter.nim
+# need functional valgrind
+tests/destructor/tnewruntime_strutils.nim
+tests/destructor/tv2_raise.nim
+tests/views/tsplit_into_openarray.nim

diff --git a/dev-lang/nim/nim-2.0.4.ebuild b/dev-lang/nim/nim-2.0.4.ebuild
index 192bb90437ae..d91d6fed17c5 100644
--- a/dev-lang/nim/nim-2.0.4.ebuild
+++ b/dev-lang/nim/nim-2.0.4.ebuild
@@ -107,7 +107,7 @@ src_test() {
 		--hint:UserRaw:on
 	)
 	local -a testament_args=(
-		--skipFrom:"${FILESDIR}/${PN}-1.6.14-testament-skipfile.txt"
+		--skipFrom:"${FILESDIR}/${PN}-2.0.4-testament-skipfile.txt"
 		--nim:"bin/nim"
 		--targets:"$(usex test-js 'c js' 'c')"
 	)


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/nim/, dev-lang/nim/files/
@ 2023-08-01 18:53 Maciej Barć
  0 siblings, 0 replies; 8+ messages in thread
From: Maciej Barć @ 2023-08-01 18:53 UTC (permalink / raw
  To: gentoo-commits

commit:     dc782311e3321039894e8fa8f7a5188c5bdabf7b
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Mon Jul 31 13:49:20 2023 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Tue Aug  1 18:53:24 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc782311

dev-lang/nim: Fix incompatible integer to pointer conversion

Closes: https://bugs.gentoo.org/894410
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32120
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 .../nim/files/nim-1.6.14-clang16-musl-fix.patch    |  13 ++
 dev-lang/nim/nim-1.6.14-r1.ebuild                  | 202 +++++++++++++++++++++
 2 files changed, 215 insertions(+)

diff --git a/dev-lang/nim/files/nim-1.6.14-clang16-musl-fix.patch b/dev-lang/nim/files/nim-1.6.14-clang16-musl-fix.patch
new file mode 100644
index 000000000000..1bc4f8f25d55
--- /dev/null
+++ b/dev-lang/nim/files/nim-1.6.14-clang16-musl-fix.patch
@@ -0,0 +1,13 @@
+Bug: https://bugs.gentoo.org/894410
+Refer: https://github.com/nim-lang/Nim/issues/20886#issuecomment-1511708198
+--- a/lib/system/threadlocalstorage.nim
++++ b/lib/system/threadlocalstorage.nim
+@@ -129,7 +129,7 @@ else:
+   when (defined(linux) or defined(nintendoswitch)) and defined(amd64):
+     type
+       SysThread* {.importc: "pthread_t",
+-                  header: "<sys/types.h>" .} = distinct culong
++                  header: "<sys/types.h>" .} = distinct pointer
+       Pthread_attr {.importc: "pthread_attr_t",
+                     header: "<sys/types.h>".} = object
+         abi: array[56 div sizeof(clong), clong]

diff --git a/dev-lang/nim/nim-1.6.14-r1.ebuild b/dev-lang/nim/nim-1.6.14-r1.ebuild
new file mode 100644
index 000000000000..bf22ccb6ecfe
--- /dev/null
+++ b/dev-lang/nim/nim-1.6.14-r1.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PATCH_PV="1.6.6_p1"
+
+inherit bash-completion-r1 edo multiprocessing toolchain-funcs xdg-utils
+
+DESCRIPTION="Compiled, garbage-collected systems programming language"
+HOMEPAGE="https://nim-lang.org/"
+SRC_URI="
+	https://nim-lang.org/download/${P}.tar.xz
+	experimental? (
+		https://git.sr.ht/~cyber/${PN}-patches/archive/${PATCH_PV}.tar.gz
+			-> nim-patches-${PATCH_PV}.tar.gz
+	)
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc experimental test-js test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	test? (
+		dev-db/sqlite:3
+		dev-libs/boehm-gc
+		dev-libs/libffi
+		dev-libs/libpcre:3
+		dev-libs/openssl
+		media-libs/libsdl
+		media-libs/libsfml
+	)
+"
+BDEPEND="
+	sys-process/parallel
+	test? (
+		test-js? (
+			net-libs/nodejs
+		)
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.20.0-paths.patch
+	"${FILESDIR}"/${PN}-1.6.6-csources-flags.patch
+)
+
+# Borrowed from nim-utils.eclass (guru overlay).
+nim_gen_config() {
+	cat > nim.cfg <<- EOF || die "Failed to create Nim config"
+		cc:"gcc"
+		gcc.exe:"$(tc-getCC)"
+		gcc.linkerexe:"$(tc-getCC)"
+		gcc.cpp.exe:"$(tc-getCXX)"
+		gcc.cpp.linkerexe:"$(tc-getCXX)"
+		gcc.options.speed:"${CFLAGS}"
+		gcc.options.size:"${CFLAGS}"
+		gcc.options.debug:"${CFLAGS}"
+		gcc.options.always:"${CPPFLAGS}"
+		gcc.options.linker:"${LDFLAGS}"
+		gcc.cpp.options.speed:"${CXXFLAGS}"
+		gcc.cpp.options.size:"${CXXFLAGS}"
+		gcc.cpp.options.debug:"${CXXFLAGS}"
+		gcc.cpp.options.always:"${CPPFLAGS}"
+		gcc.cpp.options.linker:"${LDFLAGS}"
+
+		$([[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]] && echo '--colors:"off"')
+		-d:"release"
+		--parallelBuild:"$(makeopts_jobs)"
+
+		# some tests don't work with processing hints
+		--processing:"off"
+	EOF
+}
+
+src_prepare() {
+	default
+
+	# note: there are consumers in the ::guru overlay
+	use experimental && eapply "${WORKDIR}"/nim-patches-${PATCH_PV}
+
+	# refer: https://github.com/nim-lang/Nim/issues/20886#issuecomment-1511708198
+	# bug: https://bugs.gentoo.org/894410
+	use elibc_musl && eapply "${FILESDIR}"/${PN}-1.6.14-clang16-musl-fix.patch
+}
+
+src_configure() {
+	xdg_environment_reset  # bug 667182
+
+	unset NIMBLE_DIR
+	tc-export CC CXX LD
+
+	nim_gen_config
+
+	mkdir "${HOME}"/.parallel || die
+	touch "${HOME}"/.parallel/will-cite || die "parallel setup failed"
+}
+
+src_compile() {
+	local -x PATH="${S}/bin:${PATH}"
+
+	edo ./build.sh --parallel "$(makeopts_jobs)"
+
+	ebegin "Waiting for unfinished jobs"
+	while [[ ! -f "bin/nim" ]]; do
+		sleep 1
+	done
+	eend 0
+
+	edo ./bin/nim compile koch
+	edo ./koch boot -d:nimUseLinenoise --skipParentCfg:off
+	edo ./koch tools
+
+	if use doc; then
+		local -a docargs=(
+			# set git tag
+			--git.commit:v${PV}
+			# skip runnableExamples as some of them need net
+			--docCmd:skip
+			# make logs less verbose
+			--hints:off
+			--warnings:off
+		)
+		edo ./koch doc "${docargs[@]}"
+		HTML_DOCS=( web/upload/${PV}/. )
+	fi
+}
+
+src_test() {
+	local -x PATH="${S}/bin:${PATH}"
+	local -a nimflags=(
+		# Leave only the safe hints enabled.
+		--hint:all:off
+		--hint:User:on
+		--hint:UserRaw:on
+	)
+	local -a testament_args=(
+		--skipFrom:"${FILESDIR}/${PN}-1.6.14-testament-skipfile.txt"
+		--nim:"bin/nim"
+		--targets:"$(usex test-js 'c js' 'c')"
+	)
+
+	[[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]] && \
+		testament_args+=( --colors:off )
+
+	local -a categories
+	readarray -t categories < <(find tests -mindepth 1 -maxdepth 1 -type d -printf "%P\n" | sort)
+
+	# AdditionalCategories from "testament/categories.nim".
+	categories+=( debugger examples lib )
+
+	local tcat checkpoint
+	for tcat in "${categories[@]}"; do
+		# Use checkpoints for less painful testing.
+		checkpoint="${T}/.testament-${tcat}"
+		[[ -f "${checkpoint}" ]] && continue
+
+		case ${tcat} in
+			testdata )
+				:
+			;;
+			arc | ic | valgrind )
+				einfo "Skipped category '${tcat}'"
+				;;
+			* )
+				einfo "Running tests in category '${tcat}'"
+				edo ./bin/testament "${testament_args[@]}" \
+					category "${tcat}" "${nimflags[@]}"
+				;;
+		esac
+
+		touch "${checkpoint}" || die
+	done
+}
+
+src_install() {
+	local -x PATH="${S}/bin:${PATH}"
+
+	edo ./koch install "${ED}"
+	einstalldocs
+
+	# "./koch install" installs only "nim" binary but not the rest.
+	local exe
+	for exe in bin/* ; do
+		[[ "${exe}" == bin/nim ]] && continue
+		dobin "${exe}"
+	done
+
+	newbashcomp tools/nim.bash-completion nim
+	newbashcomp dist/nimble/nimble.bash-completion nimble
+
+	insinto /usr/share/zsh/site-functions
+	newins tools/nim.zsh-completion _nim
+	newins dist/nimble/nimble.zsh-completion _nimble
+
+	# Install the @nim-rebuild set for Portage.
+	insinto /usr/share/portage/config/sets
+	newins "${FILESDIR}"/nim-sets.conf nim.conf
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/nim/, dev-lang/nim/files/
@ 2023-06-28 18:24 Maciej Barć
  0 siblings, 0 replies; 8+ messages in thread
From: Maciej Barć @ 2023-06-28 18:24 UTC (permalink / raw
  To: gentoo-commits

commit:     3cfb5570f4916a5ed6dc022c5a62aeda8ff5d4fb
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 28 06:58:30 2023 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Wed Jun 28 18:24:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3cfb5570

dev-lang/nim: bump to 1.6.14

Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 dev-lang/nim/Manifest                              |   1 +
 .../nim/files/nim-1.6.14-testament-skipfile.txt    |  43 +++++
 dev-lang/nim/nim-1.6.14.ebuild                     | 198 +++++++++++++++++++++
 3 files changed, 242 insertions(+)

diff --git a/dev-lang/nim/Manifest b/dev-lang/nim/Manifest
index 8efa204f6be8..b0da17491cca 100644
--- a/dev-lang/nim/Manifest
+++ b/dev-lang/nim/Manifest
@@ -1,3 +1,4 @@
 DIST nim-1.6.10.tar.xz 5216284 BLAKE2B d5b7bdc488086260b84700e3022ff7fc45b98d78574a3d2e288c95968a580fa644e47612dc60d6e63f5e85687f5b59a28128be746abc55bd6d4527344dc3ab14 SHA512 2ba6c4db68030ace2b4dd9b7f85d2b7c882c62e8f7f68bd0b82f548c91c300ab0e03c66f56c678127058f56b75a5550dec48d68eb6d666a179994cd1a6e2cc47
 DIST nim-1.6.12.tar.xz 5180496 BLAKE2B d7c04ffdde273336770d9397dd255b7cfc442f6be9592afbfa5ceb1ac7836a8213d5cea673477ab55bd56c004cc477a6023b6a2799715f46689f3e328302e433 SHA512 17c31024ee19dfa36f25bf8a5091992b24a4adb1a817246119a2fc552075999f698a92e66243ddd5ee69d966deead37535c9aac00ebece3854c930f905eeb030
+DIST nim-1.6.14.tar.xz 5266632 BLAKE2B f6eadf44365a099f45d1b734dea494e5d098b0427791c19a5e0b7ee6fa8069fee606005920cbcbfd7c88a36ace870949ff797d1e37fc1f84e14d5dd1aeb4bd1d SHA512 6923ea98627ea48b5c939438618caa8e6860f248086e43bc101b543aa78e7c475bc8e56b8acb90dc4a3771ca0d2e27fbdda6a0b477dbb906acda8a7b39c272d3
 DIST nim-patches-1.6.6_p1.tar.gz 2632 BLAKE2B 64980d9510dc48e3c566473dc618d00cafba04783882d62b12015e8435c9c0515d7726da30f0b74dca6a41aa88a9c9aed2189a65b3325c28839d0051de8a3365 SHA512 7ba251675cd564452669bf5ec3748565db818324f58506f20a5036e4b54df10f4d7c149cece8cb97c853222cfa7d4d8d26856d92aaa25e613e31c6f5c2a8243d

diff --git a/dev-lang/nim/files/nim-1.6.14-testament-skipfile.txt b/dev-lang/nim/files/nim-1.6.14-testament-skipfile.txt
new file mode 100644
index 000000000000..b0317176ac0d
--- /dev/null
+++ b/dev-lang/nim/files/nim-1.6.14-testament-skipfile.txt
@@ -0,0 +1,43 @@
+# broken
+tests/assert/tassert_c.nim
+tests/async/tasync_traceback.nim
+tests/errmsgs/t14444.nim
+tests/errmsgs/tcall_with_default_arg.nim
+tests/errmsgs/tproper_stacktrace.nim
+tests/errmsgs/tproper_stacktrace2.nim
+tests/errmsgs/tproper_stacktrace3.nim
+tests/js/tmangle.nim
+tests/js/twritestacktrace.nim
+tests/lent/tbasic_lent_check.nim
+tests/misc/trunner.nim
+tests/misc/tstrace.nim
+tests/misc/twarningaserror.nim
+tests/parser/t20922.nim
+tests/pragmas/thintprocessing.nim
+tests/pragmas/tused.nim
+tests/pragmas/twarning_off.nim
+tests/stdlib/tos.nim
+tests/stdlib/tstackframes.nim
+tests/stdlib/tstats.nim
+tests/system/talloc.nim
+tests/testament/tshould_not_work.nim
+# require network
+tests/stdlib/thttpclient.nim
+tests/stdlib/tnetconnect.nim
+tests/stdlib/tssl.nim
+# don't work without megatest
+tests/misc/tjoinable.nim
+tests/testament/tjoinable.nim
+# don't work with "--hint:all:off" hack
+tests/concepts/t3330.nim
+tests/stylecheck/t20397_2.nim
+tests/stylecheck/treject.nim
+tests/stylecheck/tusages.nim
+# need external dependencies
+tests/manyloc/keineschweine/keineschweine.nim
+tests/manyloc/nake/nakefile.nim
+tests/niminaction/Chapter7/Tweeter/src/tweeter.nim
+# need functional valgrind
+tests/destructor/tnewruntime_strutils.nim
+tests/destructor/tv2_raise.nim
+tests/views/tsplit_into_openarray.nim

diff --git a/dev-lang/nim/nim-1.6.14.ebuild b/dev-lang/nim/nim-1.6.14.ebuild
new file mode 100644
index 000000000000..c6bf55d99f89
--- /dev/null
+++ b/dev-lang/nim/nim-1.6.14.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PATCH_PV="1.6.6_p1"
+
+inherit bash-completion-r1 edo multiprocessing toolchain-funcs xdg-utils
+
+DESCRIPTION="Compiled, garbage-collected systems programming language"
+HOMEPAGE="https://nim-lang.org/"
+SRC_URI="
+	https://nim-lang.org/download/${P}.tar.xz
+	experimental? (
+		https://git.sr.ht/~cyber/${PN}-patches/archive/${PATCH_PV}.tar.gz
+			-> nim-patches-${PATCH_PV}.tar.gz
+	)
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc experimental test-js test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	test? (
+		dev-db/sqlite:3
+		dev-libs/boehm-gc
+		dev-libs/libffi
+		dev-libs/libpcre:3
+		dev-libs/openssl
+		media-libs/libsdl
+		media-libs/libsfml
+	)
+"
+BDEPEND="
+	sys-process/parallel
+	test? (
+		test-js? (
+			net-libs/nodejs
+		)
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.20.0-paths.patch
+	"${FILESDIR}"/${PN}-1.6.6-csources-flags.patch
+)
+
+# Borrowed from nim-utils.eclass (guru overlay).
+nim_gen_config() {
+	cat > nim.cfg <<- EOF || die "Failed to create Nim config"
+		cc:"gcc"
+		gcc.exe:"$(tc-getCC)"
+		gcc.linkerexe:"$(tc-getCC)"
+		gcc.cpp.exe:"$(tc-getCXX)"
+		gcc.cpp.linkerexe:"$(tc-getCXX)"
+		gcc.options.speed:"${CFLAGS}"
+		gcc.options.size:"${CFLAGS}"
+		gcc.options.debug:"${CFLAGS}"
+		gcc.options.always:"${CPPFLAGS}"
+		gcc.options.linker:"${LDFLAGS}"
+		gcc.cpp.options.speed:"${CXXFLAGS}"
+		gcc.cpp.options.size:"${CXXFLAGS}"
+		gcc.cpp.options.debug:"${CXXFLAGS}"
+		gcc.cpp.options.always:"${CPPFLAGS}"
+		gcc.cpp.options.linker:"${LDFLAGS}"
+
+		$([[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]] && echo '--colors:"off"')
+		-d:"release"
+		--parallelBuild:"$(makeopts_jobs)"
+
+		# some tests don't work with processing hints
+		--processing:"off"
+	EOF
+}
+
+src_prepare() {
+	default
+
+	# note: there are consumers in the ::guru overlay
+	use experimental && eapply "${WORKDIR}"/nim-patches-${PATCH_PV}
+}
+
+src_configure() {
+	xdg_environment_reset  # bug 667182
+
+	unset NIMBLE_DIR
+	tc-export CC CXX LD
+
+	nim_gen_config
+
+	mkdir "${HOME}"/.parallel || die
+	touch "${HOME}"/.parallel/will-cite || die "parallel setup failed"
+}
+
+src_compile() {
+	local -x PATH="${S}/bin:${PATH}"
+
+	edo ./build.sh --parallel "$(makeopts_jobs)"
+
+	ebegin "Waiting for unfinished jobs"
+	while [[ ! -f "bin/nim" ]]; do
+		sleep 1
+	done
+	eend 0
+
+	edo ./bin/nim compile koch
+	edo ./koch boot -d:nimUseLinenoise --skipParentCfg:off
+	edo ./koch tools
+
+	if use doc; then
+		local -a docargs=(
+			# set git tag
+			--git.commit:v${PV}
+			# skip runnableExamples as some of them need net
+			--docCmd:skip
+			# make logs less verbose
+			--hints:off
+			--warnings:off
+		)
+		edo ./koch doc "${docargs[@]}"
+		HTML_DOCS=( web/upload/${PV}/. )
+	fi
+}
+
+src_test() {
+	local -x PATH="${S}/bin:${PATH}"
+	local -a nimflags=(
+		# Leave only the safe hints enabled.
+		--hint:all:off
+		--hint:User:on
+		--hint:UserRaw:on
+	)
+	local -a testament_args=(
+		--skipFrom:"${FILESDIR}/${PN}-1.6.14-testament-skipfile.txt"
+		--nim:"bin/nim"
+		--targets:"$(usex test-js 'c js' 'c')"
+	)
+
+	[[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]] && \
+		testament_args+=( --colors:off )
+
+	local -a categories
+	readarray -t categories < <(find tests -mindepth 1 -maxdepth 1 -type d -printf "%P\n" | sort)
+
+	# AdditionalCategories from "testament/categories.nim".
+	categories+=( debugger examples lib )
+
+	local tcat checkpoint
+	for tcat in "${categories[@]}"; do
+		# Use checkpoints for less painful testing.
+		checkpoint="${T}/.testament-${tcat}"
+		[[ -f "${checkpoint}" ]] && continue
+
+		case ${tcat} in
+			testdata )
+				:
+			;;
+			arc | ic | valgrind )
+				einfo "Skipped category '${tcat}'"
+				;;
+			* )
+				einfo "Running tests in category '${tcat}'"
+				edo ./bin/testament "${testament_args[@]}" \
+					category "${tcat}" "${nimflags[@]}"
+				;;
+		esac
+
+		touch "${checkpoint}" || die
+	done
+}
+
+src_install() {
+	local -x PATH="${S}/bin:${PATH}"
+
+	edo ./koch install "${ED}"
+	einstalldocs
+
+	# "./koch install" installs only "nim" binary but not the rest.
+	local exe
+	for exe in bin/* ; do
+		[[ "${exe}" == bin/nim ]] && continue
+		dobin "${exe}"
+	done
+
+	newbashcomp tools/nim.bash-completion nim
+	newbashcomp dist/nimble/nimble.bash-completion nimble
+
+	insinto /usr/share/zsh/site-functions
+	newins tools/nim.zsh-completion _nim
+	newins dist/nimble/nimble.zsh-completion _nimble
+
+	# Install the @nim-rebuild set for Portage.
+	insinto /usr/share/portage/config/sets
+	newins "${FILESDIR}"/nim-sets.conf nim.conf
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/nim/, dev-lang/nim/files/
@ 2022-07-14 14:19 Maciej Barć
  0 siblings, 0 replies; 8+ messages in thread
From: Maciej Barć @ 2022-07-14 14:19 UTC (permalink / raw
  To: gentoo-commits

commit:     09843a875f741d97a28a528d04dee47d0aa0347b
Author:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Thu Jul 14 09:29:58 2022 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Thu Jul 14 14:19:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09843a87

dev-lang/nim: several imrovements (with a revbump)

* mention sys-process/parallel integration

* build with linenoise unconditionally

* fix "calls cc directly" in stage1

* remove -O3 from default flags

* use edo instead of custom _run

Signed-off-by: Anna Vyalkova <cyber+gentoo <AT> sysrq.in>
Closes: https://github.com/gentoo/gentoo/pull/26399
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 dev-lang/nim/files/nim-1.6.6-csources-flags.patch  | 11 ++++++
 .../{nim-1.6.6-r1.ebuild => nim-1.6.6-r2.ebuild}   | 43 +++++++++++-----------
 2 files changed, 33 insertions(+), 21 deletions(-)

diff --git a/dev-lang/nim/files/nim-1.6.6-csources-flags.patch b/dev-lang/nim/files/nim-1.6.6-csources-flags.patch
new file mode 100644
index 000000000000..9a39a900e82a
--- /dev/null
+++ b/dev-lang/nim/files/nim-1.6.6-csources-flags.patch
@@ -0,0 +1,11 @@
+--- a/build.sh
++++ b/build.sh
+@@ -60,7 +60,7 @@
+   fi
+   CC="sem -j $parallel --id $$ ${CC}"
+ fi
+-COMP_FLAGS="${CPPFLAGS:-} ${CFLAGS:-} -w -fmax-errors=3 -O3 -fno-strict-aliasing -fno-ident $extraBuildArgs"
++COMP_FLAGS="${CPPFLAGS:-} ${CFLAGS:-} -w -fmax-errors=3 -fno-strict-aliasing -fno-ident $extraBuildArgs"
+ LINK_FLAGS="${LDFLAGS:-} "
+ PS4=""
+ # platform detection

diff --git a/dev-lang/nim/nim-1.6.6-r1.ebuild b/dev-lang/nim/nim-1.6.6-r2.ebuild
similarity index 73%
rename from dev-lang/nim/nim-1.6.6-r1.ebuild
rename to dev-lang/nim/nim-1.6.6-r2.ebuild
index 9d4da4f7a23b..79f9edc5c376 100644
--- a/dev-lang/nim/nim-1.6.6-r1.ebuild
+++ b/dev-lang/nim/nim-1.6.6-r2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit bash-completion-r1 multiprocessing toolchain-funcs xdg-utils
+inherit bash-completion-r1 edo multiprocessing toolchain-funcs xdg-utils
 
 DESCRIPTION="compiled, garbage-collected systems programming language"
 HOMEPAGE="https://nim-lang.org/"
@@ -15,24 +15,16 @@ SRC_URI="
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~x86"
-IUSE="debug experimental +readline"
+IUSE="debug experimental"
 RESTRICT="test"  # need to sort out depends and numerous failures
 
-RDEPEND="readline? ( sys-libs/readline:0= )"
-DEPEND="${RDEPEND}"
+# BDEPEND="sys-process/parallel"
 # BDEPEND="test? ( net-libs/nodejs )"
 
-PATCHES=( "${FILESDIR}"/${PN}-0.20.0-paths.patch )
-
-_run() {
-	einfo "Running: ${@}"
-	PATH="${S}/bin:${PATH}" "${@}" || die "Failed: \"${*}\""
-}
-
-nim_use_enable() {
-	[[ -z "${2}" ]] && die "usage: nim_use_enable <USE flag> <compiler flag>"
-	use "${1}" && echo "-d:${2}"
-}
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.20.0-paths.patch
+	"${FILESDIR}"/${PN}-1.6.6-csources-flags.patch
+)
 
 # Borrowed from nim-utils.eclass (guru overlay).
 nim_gen_config() {
@@ -77,19 +69,28 @@ src_configure() {
 }
 
 src_compile() {
-	_run bash ./build.sh
+	local -x PATH="${S}/bin:${PATH}"
 
-	_run ./bin/nim compile koch
-	_run ./koch boot $(nim_use_enable readline useGnuReadline)
-	_run ./koch tools
+	# Build from C sources
+	# Compiling with sys-process/parallel fails for some reason but hopefully
+	# we'll be able to enable it later...
+	edo bash build.sh  # --parallel "$(makeopts_jobs)"
+
+	edo ./bin/nim compile koch
+	edo ./koch boot -d:nimUseLinenoise --skipParentCfg:off
+	edo ./koch tools
 }
 
 src_test() {
-	_run ./koch test
+	local -x PATH="${S}/bin:${PATH}"
+
+	edo ./koch test
 }
 
 src_install() {
-	_run ./koch install "${ED}"
+	local -x PATH="${S}/bin:${PATH}"
+
+	edo ./koch install "${ED}"
 
 	# "./koch install" installs only "nim" binary
 	# but not the rest


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/nim/, dev-lang/nim/files/
@ 2018-09-26 23:32 Sergei Trofimovich
  0 siblings, 0 replies; 8+ messages in thread
From: Sergei Trofimovich @ 2018-09-26 23:32 UTC (permalink / raw
  To: gentoo-commits

commit:     7617f03216587b94eec6c655202d27efdef238f4
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 26 23:31:48 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Sep 26 23:32:22 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7617f032

dev-lang/nim: bump up to 0.19.0, bug #635032

While at it move installation to /usr/ prefix.

Reported-by: Jonas Stein
Closes: https://bugs.gentoo.org/635032
Package-Manager: Portage-2.3.50, Repoman-2.3.11

 dev-lang/nim/Manifest                     |  1 +
 dev-lang/nim/files/nim-0.19.0-paths.patch | 36 ++++++++++++++
 dev-lang/nim/nim-0.19.0.ebuild            | 79 +++++++++++++++++++++++++++++++
 3 files changed, 116 insertions(+)

diff --git a/dev-lang/nim/Manifest b/dev-lang/nim/Manifest
index dfd023bda12..60b6c77f4b8 100644
--- a/dev-lang/nim/Manifest
+++ b/dev-lang/nim/Manifest
@@ -2,3 +2,4 @@ DIST nim-0.16.0.tar.xz 2907076 BLAKE2B 5f14bb2634da32deb810381edf817e3885382ffce
 DIST nim-0.17.0.tar.xz 25079320 BLAKE2B d01ade93ff299962aeea3dc9c90f0a8fe87acef8c2ee6d7d521d936c680aded0d8383221b7c11c3b2a8d6c28311c939456f271bbc90c1115acaae2c1987fa908 SHA512 90d709b39746fac5582b9df69d3eb9e3b7a39563a98f7a3002f00716b936e4e0d2be47d8b877878318692e6e2b85c08077dfcc20d9059573a1967402c244894b
 DIST nim-0.17.2.tar.xz 4083084 BLAKE2B c1a4134592bb6a57bfaf6174becb409e40075c77042964c639b39fe7b30f094bfc8d404d6e1e4e527a95333a8ee4597477f1052da1af58c3216042bb2f85c826 SHA512 7b4ed1eb1e9067ce72b76b95c43ec74eb38f04611776c174ba6a697254a9253fed61258712fb938f15e662bb3b0d36138194fc8fa89bbcb4d22888263e5e2880
 DIST nim-0.18.0.tar.xz 4412632 BLAKE2B f7286542daa4c3502f4edeb9d93e6a69169228a50248f1c5c02421cb8e70c0ab99bc84cc91b35a6227a4974345423eeb3b5ffecdb18e321b0a82eb8fd0879a16 SHA512 8f59cb4a8d44949cdd1154fb44df548005329da8255becf2f54083ce58323ff8d6cf7b2fdd86d4b1f446bd9f977e8eaf4b13c7ca6723da8a10c7b671954de772
+DIST nim-0.19.0.tar.xz 3321644 BLAKE2B e1de3b8a4c756315bcd110ddc62c03eb1a379403d8c102eb4d6d131cccabe3dccdfdac33d46037fd8b3b241d727acb42f5cb0b616a4079830ea3abf63089f90a SHA512 f7f3c8e0e9a6509b6404e21da4693ceb279112dd7a7c39edc7e717f21554442914c9cf7d811bb4034ff244e34d77dabf6e09b5e3e77c37314adf99cc0c3b2311

diff --git a/dev-lang/nim/files/nim-0.19.0-paths.patch b/dev-lang/nim/files/nim-0.19.0-paths.patch
new file mode 100644
index 00000000000..71ccb140d54
--- /dev/null
+++ b/dev-lang/nim/files/nim-0.19.0-paths.patch
@@ -0,0 +1,36 @@
+Default to <prefix>/usr/bin install.
+
+https://bugs.gentoo.org/635032
+--- a/tools/niminst/install.tmpl
++++ b/tools/niminst/install.tmpl
+@@ -28,13 +28,13 @@ if [ $# -eq 1 ] ; then
+       echo "sh deinstall.sh DIR"
+       exit 1
+       ;;
+-    "/usr/bin")
+-      bindir=/usr/bin
+-      configdir=/etc/?proj
+-      libdir=/usr/lib/?proj
+-      docdir=/usr/share/?proj/doc
+-      datadir=/usr/share/?proj/data
+-      nimbleDir="/opt/nimble/pkgs/?c.nimblePkgName-?c.version"
++    *)
++      bindir=$1/usr/bin
++      configdir=$1/etc/?proj
++      libdir=$1/usr/lib/?proj
++      docdir=$1/usr/share/?proj/doc
++      datadir=$1/usr/share/?proj/data
++      nimbleDir=$1"/opt/nimble/pkgs/?c.nimblePkgName-?c.version"
+       ;;
+     "/usr/local/bin")
+       bindir=/usr/local/bin
+@@ -68,6 +68,9 @@ if [ $# -eq 1 ] ; then
+       ;;
+   esac
+ 
++  mkdir -p $bindir
++  mkdir -p $datadir
++
+   mkdir -p $libdir
+   mkdir -p $docdir
+   mkdir -p $configdir

diff --git a/dev-lang/nim/nim-0.19.0.ebuild b/dev-lang/nim/nim-0.19.0.ebuild
new file mode 100644
index 00000000000..c86fab3680e
--- /dev/null
+++ b/dev-lang/nim/nim-0.19.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 multiprocessing
+
+DESCRIPTION="compiled, garbage-collected systems programming language"
+HOMEPAGE="https://nim-lang.org/"
+SRC_URI="https://nim-lang.org/download/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc +readline test"
+
+RESTRICT=test # need to sort out depends and numerous failures
+
+RDEPEND="
+	readline? ( sys-libs/readline:0= )
+"
+DEPEND="
+	${DEPEND}
+	test? ( net-libs/nodejs )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-paths.patch
+)
+
+_run() {
+	echo "$@"
+	"$@" || die "'$*' failed"
+}
+
+nim_use_enable() {
+	[[ -z $2 ]] && die "usage: nim_use_enable <USE flag> <compiler flag>"
+	use $1 && echo "-d:$2"
+}
+
+src_compile() {
+	_run ./build.sh
+
+	_run ./bin/nim --parallelBuild:$(makeopts_jobs) c koch
+	_run ./koch boot --parallelBuild:$(makeopts_jobs) -d:release $(nim_use_enable readline useGnuReadline)
+	# build nimble and friends
+	# --stable to avoid pulling HEAD nimble
+	PATH="./bin:$PATH" _run ./koch --stable tools
+
+	if use doc; then
+		PATH="./bin:$PATH" _run ./koch web
+	fi
+}
+
+src_test() {
+	PATH="./bin:$PATH" _run ./koch test
+}
+
+src_install() {
+	PATH="./bin:$PATH" _run ./koch install "${ED%/}"
+	rm -r "${ED%/}/usr/share/nim/doc" || die "failed to remove 'doc'"
+
+	exeinto /usr/bin
+
+	local bin_exe
+	for bin_exe in bin/*; do
+		# './koch install' installs only 'nim' binary
+		# but not the rest
+		[[ ${bin_exe} == bin/nim ]] && continue
+		doexe "${bin_exe}"
+	done
+
+	if use doc; then
+		insinto /usr/share/doc/${PF}
+		dodoc doc/*.html
+	fi
+
+	newbashcomp tools/nim.bash-completion ${PN}
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/nim/, dev-lang/nim/files/
@ 2017-07-04 21:56 Sergei Trofimovich
  0 siblings, 0 replies; 8+ messages in thread
From: Sergei Trofimovich @ 2017-07-04 21:56 UTC (permalink / raw
  To: gentoo-commits

commit:     5ac717c211f8335f00b96313638e55034da205d7
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  4 21:46:16 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Jul  4 21:56:12 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ac717c2

dev-lang/nim: drop old

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-lang/nim/Manifest                              |  3 --
 dev-lang/nim/files/nim-0.15.0-fix-mips-build.patch | 26 ----------
 dev-lang/nim/nim-0.14.2.ebuild                     | 54 ---------------------
 dev-lang/nim/nim-0.15.0-r1.ebuild                  | 56 ----------------------
 dev-lang/nim/nim-0.15.2.ebuild                     | 54 ---------------------
 5 files changed, 193 deletions(-)

diff --git a/dev-lang/nim/Manifest b/dev-lang/nim/Manifest
index fc9f2cf7a4b..2dbcb31fa7f 100644
--- a/dev-lang/nim/Manifest
+++ b/dev-lang/nim/Manifest
@@ -1,5 +1,2 @@
-DIST nim-0.14.2.tar.xz 4778444 SHA256 8f8d38d70ed57164795fc55e19de4c11488fcd31dbe42094e44a92a23e3f5e92 SHA512 34afd07fafd066f6b4acc423c21e1cc275dce00f575d01f0d1edc147946930cf13c772abe0c4a081e2e0091ad41f6ae5cead20cc4d9a7cb3bc628ad7469f6459 WHIRLPOOL 7109f28fd8e0e83a386e9a26b46a3fbb2ad9cc0c8736107fe7eb573c301768d0c3d149407657478431f8107a539cb18bb6db5ce0e0de6e96e25769dfec43a2df
-DIST nim-0.15.0.tar.xz 3786260 SHA256 c514535050b2b2156147bbe6e23aafe07cd996b2afa2c81fa9a09e1cd8c669fb SHA512 b115ed08e888a1a92fca601ca5580815ed7c1e8baf158a4bc6d351933f99a06fb4725983feae2fded50ce46c46c5b3ca6485671e66eb71962dc2a2956bc83fd8 WHIRLPOOL 15312851dbeda771dfa6f9a061d6a8358e847668efba2a31f8506c4b9398bd96d02d587c55bab0955714d6894877c3cbf7be9625e4802ca17a150c678b5b245a
-DIST nim-0.15.2.tar.xz 3251764 SHA256 905df2316262aa2cbacae067acf45fc05c2a71c8c6fde1f2a70c927ebafcfe8a SHA512 708bcb5e4defed46982eff6434e9a54505d744e65336129f0fadc187ec3e6d538974b67ad1d0305e7d55e33582bfaa87c52224335d169517714a9f07b533eda6 WHIRLPOOL fae86470d350aca4c65fcdc73a02a3f94eb288642a7294374581eb0e3bc3cc5e92d0bc48a2daec16fee54a1376722289886f7438fbf13b8645305f38d26ab902
 DIST nim-0.16.0.tar.xz 2907076 SHA256 9e199823be47cba55e62dd6982f02cf0aad732f369799fec42a4d8c2265c5167 SHA512 6be1c00328b7e5bdaa9070e1cd0e3c6e1883c5bc1e44e9c574785f9bce93697f05753f598cf6fdaa6c5a66f08c2ad6f7afb8f6650fc3b1c8e461eb0cf80baabd WHIRLPOOL 425454faab87c0144712c50a114f9fc05dd2676b8d85b1de1cb7569403d60a557c41990ca03bfa04156289e49f1d2e6906a5b798341f642cea9c325546b38e41
 DIST nim-0.17.0.tar.xz 25079320 SHA256 36e18dd9384f6c67e6d0199b871b43e774a0af30532698184d6f5a9cc9ac7a9b SHA512 90d709b39746fac5582b9df69d3eb9e3b7a39563a98f7a3002f00716b936e4e0d2be47d8b877878318692e6e2b85c08077dfcc20d9059573a1967402c244894b WHIRLPOOL 5c934a10e7c67a11964436ba3fe332320a6cc9fff15f93ce71e844024e48f77e6a809212882338ac6b3024bb15d2b0314068b643c251c65dfa258bb6daa52599

diff --git a/dev-lang/nim/files/nim-0.15.0-fix-mips-build.patch b/dev-lang/nim/files/nim-0.15.0-fix-mips-build.patch
deleted file mode 100644
index 467b55ecdfd..00000000000
--- a/dev-lang/nim/files/nim-0.15.0-fix-mips-build.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From fe362543de00806a3d69ddd0de33caf0cae2e57e Mon Sep 17 00:00:00 2001
-From: GaveUp <gaveup@gaveup.net>
-Date: Tue, 4 Oct 2016 10:56:07 -0500
-Subject: [PATCH] Revert change to osalloc.nim from commit 8d7a45f.
-
-Change caused MAP_ANONYMOUS to have an incorrect value when compiling
-for mipsel.
-
-Fixes #4852.
----
- lib/system/osalloc.nim | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/lib/system/osalloc.nim b/lib/system/osalloc.nim
-index b07a362..316dd74 100644
---- a/lib/system/osalloc.nim
-+++ b/lib/system/osalloc.nim
-@@ -87,8 +87,6 @@ elif defined(posix):
-     const MAP_ANONYMOUS = 0x1000
-   elif defined(solaris):
-     const MAP_ANONYMOUS = 0x100
--  elif defined(linux):
--    const MAP_ANONYMOUS = 0x20
-   else:
-     var
-       MAP_ANONYMOUS {.importc: "MAP_ANONYMOUS", header: "<sys/mman.h>".}: cint

diff --git a/dev-lang/nim/nim-0.14.2.ebuild b/dev-lang/nim/nim-0.14.2.ebuild
deleted file mode 100644
index 90f62acd6ab..00000000000
--- a/dev-lang/nim/nim-0.14.2.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-MY_PN=Nim
-MY_P=${MY_PN}-${PV}
-
-DESCRIPTION="compiled, garbage-collected systems programming language"
-HOMEPAGE="http://nim-lang.org/"
-SRC_URI="http://nim-lang.org/download/${P}.tar.xz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="doc +readline test"
-
-DEPEND="
-	readline? ( sys-libs/readline:0= )
-"
-RDEPEND="${DEPEND}"
-
-nim_use_enable() {
-	[[ -z $2 ]] && die "usage: nim_use_enable <USE flag> <compiler flag>"
-	use $1 && echo "-d:$2"
-}
-
-src_compile() {
-	./build.sh || die "build.sh failed"
-
-	./bin/nim c koch || die "csources nim failed"
-	./koch boot -d:release $(nim_use_enable readline useGnuReadline) || die "koch boot failed"
-
-	if use doc; then
-		PATH="./bin:$PATH" ./koch web || die "koch web failed"
-	fi
-}
-
-src_test() {
-	PATH="./bin:$PATH" ./koch test || die "test suite failed"
-}
-
-src_install() {
-	./koch install "${D}/usr" || die "koch install failed"
-	rm -r "${D}/usr/nim/doc" || die "failed to remove 'doc'"
-
-	dodir /usr/bin
-	dosym ../nim/bin/nim /usr/bin/nim
-
-	if use doc; then
-		insinto /usr/share/doc/${PF}
-		dodoc doc/*.html
-	fi
-}

diff --git a/dev-lang/nim/nim-0.15.0-r1.ebuild b/dev-lang/nim/nim-0.15.0-r1.ebuild
deleted file mode 100644
index 86b67b49aac..00000000000
--- a/dev-lang/nim/nim-0.15.0-r1.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-MY_PN=Nim
-MY_P=${MY_PN}-${PV}
-
-DESCRIPTION="compiled, garbage-collected systems programming language"
-HOMEPAGE="http://nim-lang.org/"
-SRC_URI="http://nim-lang.org/download/${P}.tar.xz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="doc +readline test"
-
-DEPEND="
-	readline? ( sys-libs/readline:0= )
-"
-RDEPEND="${DEPEND}"
-
-PATCHES=("${FILESDIR}"/${P}-fix-mips-build.patch)
-
-nim_use_enable() {
-	[[ -z $2 ]] && die "usage: nim_use_enable <USE flag> <compiler flag>"
-	use $1 && echo "-d:$2"
-}
-
-src_compile() {
-	./build.sh || die "build.sh failed"
-
-	./bin/nim c koch || die "csources nim failed"
-	./koch boot -d:release $(nim_use_enable readline useGnuReadline) || die "koch boot failed"
-
-	if use doc; then
-		PATH="./bin:$PATH" ./koch web || die "koch web failed"
-	fi
-}
-
-src_test() {
-	PATH="./bin:$PATH" ./koch test || die "test suite failed"
-}
-
-src_install() {
-	./koch install "${D}/usr" || die "koch install failed"
-	rm -r "${D}/usr/nim/doc" || die "failed to remove 'doc'"
-
-	dodir /usr/bin
-	dosym ../nim/bin/nim /usr/bin/nim
-
-	if use doc; then
-		insinto /usr/share/doc/${PF}
-		dodoc doc/*.html
-	fi
-}

diff --git a/dev-lang/nim/nim-0.15.2.ebuild b/dev-lang/nim/nim-0.15.2.ebuild
deleted file mode 100644
index 90f62acd6ab..00000000000
--- a/dev-lang/nim/nim-0.15.2.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-MY_PN=Nim
-MY_P=${MY_PN}-${PV}
-
-DESCRIPTION="compiled, garbage-collected systems programming language"
-HOMEPAGE="http://nim-lang.org/"
-SRC_URI="http://nim-lang.org/download/${P}.tar.xz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="doc +readline test"
-
-DEPEND="
-	readline? ( sys-libs/readline:0= )
-"
-RDEPEND="${DEPEND}"
-
-nim_use_enable() {
-	[[ -z $2 ]] && die "usage: nim_use_enable <USE flag> <compiler flag>"
-	use $1 && echo "-d:$2"
-}
-
-src_compile() {
-	./build.sh || die "build.sh failed"
-
-	./bin/nim c koch || die "csources nim failed"
-	./koch boot -d:release $(nim_use_enable readline useGnuReadline) || die "koch boot failed"
-
-	if use doc; then
-		PATH="./bin:$PATH" ./koch web || die "koch web failed"
-	fi
-}
-
-src_test() {
-	PATH="./bin:$PATH" ./koch test || die "test suite failed"
-}
-
-src_install() {
-	./koch install "${D}/usr" || die "koch install failed"
-	rm -r "${D}/usr/nim/doc" || die "failed to remove 'doc'"
-
-	dodir /usr/bin
-	dosym ../nim/bin/nim /usr/bin/nim
-
-	if use doc; then
-		insinto /usr/share/doc/${PF}
-		dodoc doc/*.html
-	fi
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/nim/, dev-lang/nim/files/
@ 2016-10-06 20:54 Sergei Trofimovich
  0 siblings, 0 replies; 8+ messages in thread
From: Sergei Trofimovich @ 2016-10-06 20:54 UTC (permalink / raw
  To: gentoo-commits

commit:     8cb2adb25a4bed989e161b9bffc74038886bfd43
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  6 20:54:39 2016 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Oct  6 20:54:39 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cb2adb2

dev-lang/nim: drop MAP_ANONYMOUS constant

Fixes build failure on mipsel

Bug: https://github.com/nim-lang/Nim/pull/4853
Reported-by: der <AT> 2-47.ru

Package-Manager: portage-2.3.1

 dev-lang/nim/files/nim-0.15.0-fix-mips-build.patch | 26 ++++++++++++++++++++++
 .../{nim-0.15.0.ebuild => nim-0.15.0-r1.ebuild}    |  2 ++
 2 files changed, 28 insertions(+)

diff --git a/dev-lang/nim/files/nim-0.15.0-fix-mips-build.patch b/dev-lang/nim/files/nim-0.15.0-fix-mips-build.patch
new file mode 100644
index 00000000..467b55e
--- /dev/null
+++ b/dev-lang/nim/files/nim-0.15.0-fix-mips-build.patch
@@ -0,0 +1,26 @@
+From fe362543de00806a3d69ddd0de33caf0cae2e57e Mon Sep 17 00:00:00 2001
+From: GaveUp <gaveup@gaveup.net>
+Date: Tue, 4 Oct 2016 10:56:07 -0500
+Subject: [PATCH] Revert change to osalloc.nim from commit 8d7a45f.
+
+Change caused MAP_ANONYMOUS to have an incorrect value when compiling
+for mipsel.
+
+Fixes #4852.
+---
+ lib/system/osalloc.nim | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/lib/system/osalloc.nim b/lib/system/osalloc.nim
+index b07a362..316dd74 100644
+--- a/lib/system/osalloc.nim
++++ b/lib/system/osalloc.nim
+@@ -87,8 +87,6 @@ elif defined(posix):
+     const MAP_ANONYMOUS = 0x1000
+   elif defined(solaris):
+     const MAP_ANONYMOUS = 0x100
+-  elif defined(linux):
+-    const MAP_ANONYMOUS = 0x20
+   else:
+     var
+       MAP_ANONYMOUS {.importc: "MAP_ANONYMOUS", header: "<sys/mman.h>".}: cint

diff --git a/dev-lang/nim/nim-0.15.0.ebuild b/dev-lang/nim/nim-0.15.0-r1.ebuild
similarity index 95%
rename from dev-lang/nim/nim-0.15.0.ebuild
rename to dev-lang/nim/nim-0.15.0-r1.ebuild
index 1e4b185..092c19f 100644
--- a/dev-lang/nim/nim-0.15.0.ebuild
+++ b/dev-lang/nim/nim-0.15.0-r1.ebuild
@@ -21,6 +21,8 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=("${FILESDIR}"/${P}-fix-mips-build.patch)
+
 nim_use_enable() {
 	[[ -z $2 ]] && die "usage: nim_use_enable <USE flag> <compiler flag>"
 	use $1 && echo "-d:$2"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-06-17 20:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 20:43 [gentoo-commits] repo/gentoo:master commit in: dev-lang/nim/, dev-lang/nim/files/ Maciej Barć
  -- strict thread matches above, loose matches on Subject: below --
2024-04-24 17:10 Maciej Barć
2023-08-01 18:53 Maciej Barć
2023-06-28 18:24 Maciej Barć
2022-07-14 14:19 Maciej Barć
2018-09-26 23:32 Sergei Trofimovich
2017-07-04 21:56 Sergei Trofimovich
2016-10-06 20:54 Sergei Trofimovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox