All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexis Lothoré via buildroot" <buildroot@buildroot.org>
To: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Alexis Lothoré" <alexis.lothore@bootlin.com>
Cc: <buildroot@buildroot.org>,
	"Nicolas Carrier" <nicolas.carrier@nav-timing.safrangroup.com>
Subject: Re: [Buildroot] [PATCH 1/2] package/uglifyjs: new package
Date: Mon, 10 Aug 2026 10:44:49 +0200	[thread overview]
Message-ID: <DKL4R5768V4T.188YQE4W2AGL9@bootlin.com> (raw)
In-Reply-To: <anWMFshKM90_1I-z@windsurf>

Hi Thomas,

On Fri Aug 7, 2026 at 9:44 AM CEST, Thomas Petazzoni wrote:
> Hello Alexis,
>
> On Thu, Aug 06, 2026 at 11:24:22PM +0200, Alexis Lothoré wrote:
>> uglifyjs is a JavaScript parser, minifier, compressor and beautifier
>> toolkit.
>> 
>> https://github.com/mishoo/UglifyJS
>> 
>> Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
>
> Thanks for the patch. Overall looks good. One or two suggestions below.
>
>> new file mode 100644
>> index 000000000000..921d4dffee8e
>> --- /dev/null
>> +++ b/package/uglifyjs/uglifyjs.mk
>> @@ -0,0 +1,23 @@
>> +################################################################################
>> +#
>> +# uglifyjs
>> +#
>> +################################################################################
>> +
>> +UGLIFYJS_VERSION = 3.19.3
>> +UGLIFYJS_SITE = $(call github,mishoo,UglifyJS,v$(UGLIFYJS_VERSION))
>> +UGLIFYJS_LICENSE = BSD-2-Clause
>> +UGLIFYJS_LICENSE_FILES = LICENSE
>> +HOST_UGLIFYJS_DEPENDENCIES = host-nodejs
>> +
>> +define HOST_UGLIFYJS_INSTALL_CMDS
>> +	$(INSTALL) -m 0755 -d $(HOST_DIR)/lib/node_modules/uglify-js
>> +	rsync -a $(@D)/bin $(HOST_DIR)/lib/node_modules/uglify-js/
>> +	rsync -a $(@D)/lib $(HOST_DIR)/lib/node_modules/uglify-js/
>> +	rsync -a $(@D)/tools $(HOST_DIR)/lib/node_modules/uglify-js/
>
> We more commonly use "cp -dpfr" for this kind of situation, and you
> could also use a loop?
>
>> +	$(INSTALL) -m 0755 $(@D)/package.json $(HOST_DIR)/lib/node_modules/uglify-js/
>
> Something like:
>
> 	$(foreach p,bin lib tools package.json,\
> 		cp -dpfr $(@D)/$(p) $(HOST_DIR)/lib/node_modules/uglify-js/
> 	)
>

Indeed, it looks better with the loop, I'll update accordingly.

>> +	ln -sf ../lib/node_modules/uglify-js/bin/uglifyjs $(HOST_DIR)/bin/uglifyjs
>> +
>
> Drop this empty new line.
>
>> +endef
>> +
>> +$(eval $(host-generic-package))
>> diff --git a/support/testing/tests/package/test_uglifyjs.py b/support/testing/tests/package/test_uglifyjs.py
>> new file mode 100644
>> index 000000000000..666a5fb46ff1
>> --- /dev/null
>> +++ b/support/testing/tests/package/test_uglifyjs.py
>
> Forgot about commenting on this on the DEVELOPERS file: please add
> this file to the DEVELOPERS file as well, under your name. This way if
> this test fails in our CI, you'll get notified.

Ah,true, I've likely missed tests from some other packages then, I'll
update here and send a separate patch for existing packages.

Alexis

> Thanks!
>
> Thomas




-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-08-10  8:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06 21:24 [Buildroot] [PATCH 0/2] package: bring two host tools Alexis Lothoré via buildroot
2026-08-06 21:24 ` [Buildroot] [PATCH 1/2] package/uglifyjs: new package Alexis Lothoré via buildroot
2026-08-07  7:44   ` Thomas Petazzoni via buildroot
2026-08-10  8:44     ` Alexis Lothoré via buildroot [this message]
2026-08-06 21:24 ` [Buildroot] [PATCH 2/2] package/sass: " Alexis Lothoré via buildroot
2026-08-07  8:29   ` Thomas Petazzoni via buildroot
2026-08-07 11:55     ` Thomas Perale via buildroot
2026-08-10 12:25       ` Alexis Lothoré via buildroot
2026-08-10 21:04         ` Thomas Perale via buildroot
2026-08-10  9:29     ` Alexis Lothoré via buildroot
2026-08-10 12:32       ` Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DKL4R5768V4T.188YQE4W2AGL9@bootlin.com \
    --to=buildroot@buildroot.org \
    --cc=alexis.lothore@bootlin.com \
    --cc=nicolas.carrier@nav-timing.safrangroup.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.