commit: 590725c0880b2b8e967feea816f8f0c9763d5ab6
parent 1fa40ba40db597bc4533f6ed26155f9f2a10c478
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Mon, 9 Oct 2023 05:41:18 +0200
dev-util/esbuild: Enable nearly all tests thanks to source-map-js
Diffstat:
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/dev-util/esbuild/esbuild-0.18.19.ebuild b/dev-util/esbuild/esbuild-0.18.19.ebuild
@@ -17,7 +17,10 @@ IUSE="test"
DEPEND="
>=dev-lang/go-1.13
dev-go/sys
- test? ( net-libs/nodejs )
+ test? (
+ net-libs/nodejs
+ dev-nodejs/source-map-js
+ )
"
BDEPEND="sys-apps/help2man"
@@ -31,6 +34,19 @@ src_unpack() {
mv "${WORKDIR}/${P}" "${S}" || die
}
+src_prepare() {
+ default
+
+ # complex: Depends on fuse.js + react
+ sed -i \
+ -e "s;require('source-map');require('source-map-js');" \
+ -e "/check('complex'/,/}),/d" \
+ scripts/verify-source-map.js || die
+
+ # No need to fetch dependencies via npm
+ sed -i -e 's;cd scripts && npm ci;true;' Makefile || die
+}
+
src_configure() {
# disable module-aware mode
export GO111MODULE=off
@@ -43,13 +59,6 @@ src_configure() {
export GOPATH="${WORKDIR}:${EPREFIX}/usr/lib/go-gentoo"
export EGO_BUILD_FLAGS="${EGO_BUILD_FLAGS} -trimpath"
-
- # Depends on external node libraries
- sed -i \
- -e '/^test-common:/s;verify-source-map;;' \
- -e '/^test-common:/s;register-test;;' \
- -e '/^test-common:/s;node-unref-tests;;' \
- Makefile || die
}
src_test() {