This commit is contained in:
Anton Bolshakov 2025-04-14 10:31:45 +08:00
parent 74696df0e7
commit 690910dfb3
No known key found for this signature in database
GPG key ID: 32BDCED870788F04
3 changed files with 97 additions and 0 deletions

3
dev-util/wabt/Manifest Normal file
View file

@ -0,0 +1,3 @@
DIST WebAssembly-testsuite-c2a67a575ddc815ff2212f68301d333e5e30a923.tar.gz 625713 BLAKE2B 0adffe3b0e60f0decbc9a0207b6a0e7137b5eb3eb405a781d51837689305ad4c41edff6cf37479b897b28545c70040fc64c67665e6529c75b817a417f794656d SHA512 c93506a5d79c36a76c0cc021a279964e47e28e523eb5dba8ce549df318c9b0c7198070b7aa27a8e632f8892349fea94c6260039e95b06d95cff8b952edced566
DIST WebAssembly-wasm-c-api-b6dd1fb658a282c64b029867845bc50ae59e1497.tar.gz 57078 BLAKE2B 393e9ae9d3a641dd9ef0517322bc840b8d45fcf911529b1a7200e7d2baed5af4470ded4d29ca7c2c70f98c4065aee9dae823660bcb4d207b0b6a4bebb29e1f75 SHA512 5d3eec2184f8b66e2358b85f416afaea172f24155a61c9412a9d9374aa50347cf0ebe940f35727bc8c0ffe287033b967cc97a857feab6aa9e5098458e72b4fd0
DIST wabt-1.0.34.tar.gz 1226317 BLAKE2B f6acc1783f704a4b25a063f13be1e57263f11cd76e91e6bf59f111b9ba7bc17999550cc88c69a1b8e586f40656ce000560378767f96b331e115e8c60032e6be5 SHA512 93be77d18b2311276af2abff8a954f3d029b1689ba8c89e1c3f0d199ddc0af505ffaa8489fbe0df4fc8beae1a37c645971d63794ff440e305042ff1b94bd83ef

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>unknown@pentoo.ch</email>
<name>Author Unknown</name>
</maintainer>
<upstream>
<remote-id type="github">WebAssembly/wabt</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1,83 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..13} )
EGIT_COMMIT_TESTSUITE="c2a67a575ddc815ff2212f68301d333e5e30a923"
EGIT_COMMIT_WASM_C_API="b6dd1fb658a282c64b029867845bc50ae59e1497"
inherit cmake python-any-r1
DESCRIPTION="The WebAssembly Binary Toolkit"
HOMEPAGE="https://github.com/WebAssembly/wabt"
SRC_URI="
https://github.com/WebAssembly/wabt/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
https://github.com/WebAssembly/testsuite/archive/${EGIT_COMMIT_TESTSUITE}.tar.gz -> \
WebAssembly-testsuite-${EGIT_COMMIT_TESTSUITE}.tar.gz
https://github.com/WebAssembly/wasm-c-api/archive/${EGIT_COMMIT_WASM_C_API}.tar.gz -> \
WebAssembly-wasm-c-api-${EGIT_COMMIT_WASM_C_API}.tar.gz
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="dev-libs/openssl:="
DEPEND="
${RDEPEND}
test? (
dev-cpp/gtest
dev-libs/simde
)
"
BDEPEND="
${PYTHON_DEPS}
$(python_gen_any_dep 'dev-python/ply[${PYTHON_USEDEP}]')
"
PATCHES=(
# Disable tests depending on third_party/wasm-c-api/example/*.wasm
#"${FILESDIR}/wabt-1.0.30-wasm-blob-tests.patch"
)
python_check_deps() {
python_has_version "dev-python/ply[${PYTHON_USEDEP}]"
}
src_prepare() {
cmake_src_prepare
rm -r third_party/testsuite || die
mv "${WORKDIR}/testsuite-${EGIT_COMMIT_TESTSUITE}" third_party/testsuite || die
rm -r third_party/wasm-c-api || die
mv "${WORKDIR}/wasm-c-api-${EGIT_COMMIT_WASM_C_API}" third_party/wasm-c-api || die
rm -v fuzz-in/wasm/stuff.wasm wasm2c/examples/fac/fac.wasm || die
use test || rm -v third_party/wasm-c-api/example/*.wasm || die
sed -i 's;default_compiler =.*;default_compiler = os.getenv("CC", "cc");' test/run-spec-wasm2c.py || die
# Broken tests
rm test/wasm2c/spec/simd_lane.txt test/wasm2c/spec/simd_load.txt
}
src_configure() {
local mycmakeargs=(
-DUSE_SYSTEM_GTEST=ON
-DBUILD_LIBWASM=ON
-DWITH_WASI=OFF # Need to unbundle third_party/uvwasi
-DBUILD_TESTS=$(usex test)
)
cmake_src_configure
}
src_test() {
cmake_build check
}