commit: 0b76ba5b46b0ed644332f4a9d9df840526f23707
parent 4718b112bf5acfa7ec89a090cc6442937f25d2a1
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sun, 5 Mar 2023 00:08:03 +0100
dev-util/uglifyjs: new package, add 3.17.4
Diffstat:
2 files changed, 54 insertions(+), 0 deletions(-)
diff --git a/dev-util/uglifyjs/Manifest b/dev-util/uglifyjs/Manifest
@@ -0,0 +1 @@
+DIST uglifyjs-3.17.4.tar.gz 539533 BLAKE2B e6939d0c2127d4a3a13e0b3d1a8942b4241d01e72ab3813dafece63728c1250facf57cad36b1c14be8d799da99ca7f9b06b9d2dbb4afa87d6d9e1d1c96840b4a SHA512 1382332a65a5d3a093f701508d0e4a12b2d08a94d35f94d405f5357a2dd8ba8d3c96ee4389f3c2f4bc53c6b97cd79be81c84964e1e0daa5e5529909a676c2b70
diff --git a/dev-util/uglifyjs/uglifyjs-3.17.4.ebuild b/dev-util/uglifyjs/uglifyjs-3.17.4.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2022 Gentoo Authors
+# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit nodejs
+
+MY_PN="UglifyJS"
+DESCRIPTION="JavaScript parser, minifier, compressor and beautifier toolkit"
+HOMEPAGE="https://lisperator.net/uglifyjs/"
+SRC_URI="https://github.com/mishoo/${MY_PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="test"
+
+RESTRICT="!test? ( test )"
+
+DEPEND="test? ( dev-nodejs/semver )"
+RDEPEND="net-libs/nodejs"
+
+NPM_FLAGS=(
+ --audit false
+ --color false
+ --foreground-scripts
+ --global
+ --offline
+ --progress false
+ --save false
+ --verbose
+)
+
+src_prepare() {
+ default
+
+ # One doesn't simply packages acorn
+ rm test/mocha/exports.js test/mocha/imports.js || die
+}
+
+src_compile() {
+ npm "${NPM_FLAGS[@]}" pack || die
+}
+
+src_install() {
+ npm "${NPM_FLAGS[@]}" \
+ --prefix "${ED}"/usr \
+ install \
+ uglify-js-${PV}.tgz || die
+}