binaryen-129nest
download
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{12..14} )
inherit cmake edo python-any-r1
MY_PV="version_${PV}"
DESCRIPTION="Optimizer and compiler/toolchain library for WebAssembly"
HOMEPAGE="https://github.com/WebAssembly/binaryen"
SRC_URI="https://github.com/WebAssembly/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${MY_PV}"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
BDEPEND="test? ( dev-cpp/gtest
net-libs/nodejs
$(python_gen_any_dep 'dev-python/filecheck[${PYTHON_USEDEP}]
dev-python/lit[${PYTHON_USEDEP}]') )"
PATCHES=( "${FILESDIR}/${PN}"-125-test-CMakeLists.patch )
pkg_setup() {
use test && python-any-r1_pkg_setup
}
src_configure() {
local mycmakeargs=(
-DBUILD_TESTS="$(usex test)"
-DENABLE_WERROR=OFF
)
cmake_src_configure
}
src_test() {
edo "${BUILD_DIR}"/bin/binaryen-unittests
edo "${BUILD_DIR}"/bin/binaryen-lit "${MAKEOPTS}" -vv test/lit
}