commit:     24aaadc3ec4d213875b8739a4c1fbcc7652b8953
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Sat Jul 22 14:44:14 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Mon Sep 25 13:18:19 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24aaadc3

dev-lang/moarvm: Fix incompatible function pointer types

Closes: https://bugs.gentoo.org/881335
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32000
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 .../files/moarvm-2023.02-fix-build-clang16.patch   | 22 ++++++++
 dev-lang/moarvm/moarvm-2023.02-r1.ebuild           | 62 ++++++++++++++++++++++
 2 files changed, 84 insertions(+)

diff --git a/dev-lang/moarvm/files/moarvm-2023.02-fix-build-clang16.patch 
b/dev-lang/moarvm/files/moarvm-2023.02-fix-build-clang16.patch
new file mode 100644
index 000000000000..9f8a60672ee2
--- /dev/null
+++ b/dev-lang/moarvm/files/moarvm-2023.02-fix-build-clang16.patch
@@ -0,0 +1,22 @@
+Bug: https://bugs.gentoo.org/881335
+Upstream PR: https://github.com/MoarVM/MoarVM/pull/1764
+--- a/src/6model/containers.c
++++ b/src/6model/containers.c
+@@ -114,7 +114,7 @@ static const MVMContainerSpec code_pair_spec = {
+     code_pair_fetch_s,
+     code_pair_store,
+     code_pair_store_i,
+-    code_pair_store_i, /* FIXME need a code_pair_store_u but lacking tests 
showing this need */
++    (void *)code_pair_store_i, /* FIXME need a code_pair_store_u but lacking 
tests showing this need */
+     code_pair_store_n,
+     code_pair_store_s,
+     code_pair_store,
+@@ -371,7 +371,7 @@ static const MVMContainerSpec value_desc_cont_spec = {
+     value_desc_cont_fetch_s,
+     value_desc_cont_store,
+     value_desc_cont_store_i,
+-    value_desc_cont_store_i, /* FIXME need a value_desc_cont_store_u but 
lacking tests showing this need */
++    (void *)value_desc_cont_store_i, /* FIXME need a value_desc_cont_store_u 
but lacking tests showing this need */
+     value_desc_cont_store_n,
+     value_desc_cont_store_s,
+     value_desc_cont_store_unchecked,

diff --git a/dev-lang/moarvm/moarvm-2023.02-r1.ebuild 
b/dev-lang/moarvm/moarvm-2023.02-r1.ebuild
new file mode 100644
index 000000000000..be97199807ca
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2023.02-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PN="MoarVM"
+if [[ ${PV} == "9999" ]]; then
+       EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git";
+       inherit git-r3
+       S="${WORKDIR}/${P}"
+else
+       SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz";
+       KEYWORDS="~amd64 ~x86"
+       S="${WORKDIR}/${MY_PN}-${PV}"
+fi
+
+DESCRIPTION="A 6model-based VM for NQP and Raku"
+HOMEPAGE="http://moarvm.org";
+LICENSE="Artistic-2"
+SLOT="0"
+
+IUSE="asan clang debug doc +jit optimize static-libs ubsan"
+
+RDEPEND="dev-libs/libatomic_ops
+               >=dev-libs/libuv-1.26:=
+               dev-libs/libffi:="
+DEPEND="${RDEPEND}
+       clang? ( >=sys-devel/clang-3.1 )
+       dev-lang/perl"
+
+DOCS=( CREDITS README.markdown )
+
+# Tests are conducted via nqp
+RESTRICT=test
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-2023.02-fix-build-clang16.patch
+)
+
+src_configure() {
+       MAKEOPTS+=" NOISY=1"
+       use doc && DOCS+=( docs/* )
+       local prefix="${EPREFIX}/usr"
+       local libdir="${EPREFIX}/usr/$(get_libdir)"
+       einfo "--prefix '${prefix}'"
+       einfo "--libdir '${libdir}'"
+       local myconfigargs=(
+               "--prefix" "${prefix}"
+               "--has-libuv"
+               "--has-libatomic_ops"
+               "--has-libffi"
+               "--libdir" "${libdir}"
+               "--compiler" "$(usex clang clang gcc)"
+               "$(usex asan        --asan)"
+               "$(usex debug       --debug            --no-debug)"
+               "$(usex optimize    --optimize=        --no-optimize)"
+               "$(usex static-libs --static)"
+               "$(usex ubsan       --ubsan)"
+       )
+
+       perl Configure.pl "${myconfigargs[@]}" moarshared || die
+}

Reply via email to