logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: 4ce97c1cf402db407d51f73a29630d0a82a7eafd
parent ff8d9b2498e8e2ce0662c69da7b69fdb2017b5a1
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu,  3 Aug 2023 08:15:26 +0200

dev-util/esbuild: new package, add 0.18.17

Diffstat:

Adev-util/esbuild/Manifest1+
Adev-util/esbuild/esbuild-0.18.17.ebuild62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/dev-util/esbuild/Manifest b/dev-util/esbuild/Manifest @@ -0,0 +1 @@ +DIST esbuild-0.18.17.tar.gz 1705125 BLAKE2B d867d3719d9313be20a4e732ccfc6edea822e45b3dd234ba1aa357fe9e67b7c94fc7b6dee29ce6a689c54a7daea551b52d00dbe09caa0e29a2713ffbc07c492a SHA512 11895c4fc02dc4399ed0cbcb2210db5feab607126c4728494351197dd73d6535dd965e3c9180e03241e14897554a7c649149634009be52abc4fa7774b857313b diff --git a/dev-util/esbuild/esbuild-0.18.17.ebuild b/dev-util/esbuild/esbuild-0.18.17.ebuild @@ -0,0 +1,62 @@ +# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +EGO_PN="github.com/evanw/esbuild" + +DESCRIPTION="extremely fast bundler for the web" +HOMEPAGE="https://esbuild.github.io/" +SRC_URI="https://github.com/evanw/esbuild/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/src/${EGO_PN}" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" + +DEPEND=" + >=dev-lang/go-1.13 + dev-go/x-sys + test? ( net-libs/nodejs ) +" + +RESTRICT="!test? ( test ) strip" +QA_FLAGS_IGNORED='.*' + +src_unpack() { + default + + mkdir -p "$(dirname "${S}")" || die + mv "${WORKDIR}/${P}" "${S}" || die +} + +src_configure() { + # disable module-aware mode + export GO111MODULE=off + # no network access + export GOPROXY=off + # don't try to update the toolchain + export GOTOOLCHAIN="local" + + # With GO111MODULE=off WORKDIR needs to be included + 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() { + emake test +} + +src_install() { + set -- env GOBIN="${ED}/usr/bin" go install -v -work -x ${EGO_BUILD_FLAGS} ./cmd/esbuild + echo "$@" + "$@" || die +}