mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-17 19:13:13 -04:00
net-libs/nodejs-bin: new package, add 24.11.1
Signed-off-by: Nguyen Dinh Dang Duong <dangduong31205@gmail.com>
This commit is contained in:
63
net-libs/nodejs-bin/nodejs-bin-24.11.1.ebuild
Normal file
63
net-libs/nodejs-bin/nodejs-bin-24.11.1.ebuild
Normal file
@@ -0,0 +1,63 @@
|
||||
# Copyright 2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
|
||||
HOMEPAGE="https://nodejs.org/"
|
||||
SRC_URI="
|
||||
amd64? ( https://nodejs.org/dist/v${PV}/node-v${PV}-linux-x64.tar.xz )
|
||||
"
|
||||
S="${WORKDIR}/node-v${PV}-linux-x64" #only works for amd64 now
|
||||
|
||||
LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT Artistic-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
IUSE="corepack +npm"
|
||||
|
||||
COMMON_DEPEND="
|
||||
>=app-arch/brotli-1.1.0:=
|
||||
dev-db/sqlite:3
|
||||
>=dev-libs/libuv-1.51.0:=
|
||||
>=dev-libs/simdjson-4.0.7:=
|
||||
>=net-dns/c-ares-1.34.5:=
|
||||
>=net-libs/nghttp2-1.66.0:=
|
||||
>=net-libs/nghttp3-1.7.0:=
|
||||
virtual/zlib:=
|
||||
corepack? ( !sys-apps/yarn )
|
||||
"
|
||||
DEPEND="${COMMON_DEPEND}"
|
||||
RDEPEND="${COMMON_DEPEND}"
|
||||
|
||||
src_install() {
|
||||
dodoc *.md
|
||||
dodoc ./share/doc/node/*
|
||||
doman ./share/man/man1/*
|
||||
|
||||
local base="$(pwd)"
|
||||
local dest="/opt/${P}"
|
||||
|
||||
insinto "$dest"
|
||||
doins -r ./include/ ./lib/
|
||||
|
||||
exeinto "$dest/bin"
|
||||
doexe ./bin/node
|
||||
|
||||
insinto "$dest/bin"
|
||||
doins ./bin/npx
|
||||
[[ npm ]] && doins ./bin/npm
|
||||
[[ corepack ]] && doins ./bin/corepack
|
||||
|
||||
# Find all executable file but not symlink, make them executable at destination
|
||||
local rel
|
||||
while IFS= read -r file; do
|
||||
rel=${file#${base}/}
|
||||
[[ -f "${D}/${dest}/${rel}" ]] && fperms +x "${dest}/${rel}"
|
||||
done < <(find ./include ./bin ./lib -type f -perm /111 ! -xtype l)
|
||||
|
||||
# Make symlinks
|
||||
for exe in "${dest}"/bin/*; do
|
||||
dosym "${exe}" "/usr/bin/$(basename "$exe")"
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user