Message ID | 20220107090348.3947187-1-romain.naour@smile.fr |
---|---|
State | Accepted |
Headers | show |
Series | [PATCHv4] package/bat: new package | expand |
Hello, On Fri, 7 Jan 2022 10:03:48 +0100 Romain Naour <romain.naour@smile.fr> wrote: > diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk > index bf1436a86b..e2fe104cf3 100644 > --- a/package/pkg-cargo.mk > +++ b/package/pkg-cargo.mk > @@ -110,6 +110,7 @@ ifndef $(2)_INSTALL_TARGET_CMDS > define $(2)_INSTALL_TARGET_CMDS > cd $$(@D) && \ > $$(TARGET_MAKE_ENV) $$($(2)_CARGO_ENV) \ > + CC_$$(subst -,_,$$(RUSTC_TARGET_NAME))=$$(TARGET_CC) \ But we don't even pass this variable at build time.. why would it be needed at install time? Due to the fact that "bar" builds stuff during the install step, I understand that we might need extra variable during the installation step, but I would expect to only need variables that are already passed during the build step. Any idea? Thomas
Le 07/01/2022 à 11:05, Thomas Petazzoni a écrit : > Hello, > > On Fri, 7 Jan 2022 10:03:48 +0100 > Romain Naour <romain.naour@smile.fr> wrote: > >> diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk >> index bf1436a86b..e2fe104cf3 100644 >> --- a/package/pkg-cargo.mk >> +++ b/package/pkg-cargo.mk >> @@ -110,6 +110,7 @@ ifndef $(2)_INSTALL_TARGET_CMDS >> define $(2)_INSTALL_TARGET_CMDS >> cd $$(@D) && \ >> $$(TARGET_MAKE_ENV) $$($(2)_CARGO_ENV) \ >> + CC_$$(subst -,_,$$(RUSTC_TARGET_NAME))=$$(TARGET_CC) \ > > But we don't even pass this variable at build time.. why would it be > needed at install time? Due to the fact that "bar" builds stuff during > the install step, I understand that we might need extra variable during > the installation step, but I would expect to only need variables that > are already passed during the build step. It seems we just need to add $$(TARGET_CONFIGURE_OPTS) to _INSTALL_TARGET_CMDS http://lists.busybox.net/pipermail/buildroot/2022-January/632613.html > > Any idea? > > Thomas >
Hello, On Fri, 7 Jan 2022 11:08:21 +0100 Romain Naour <romain.naour@smile.fr> wrote: > > But we don't even pass this variable at build time.. why would it be > > needed at install time? Due to the fact that "bar" builds stuff during > > the install step, I understand that we might need extra variable during > > the installation step, but I would expect to only need variables that > > are already passed during the build step. > > It seems we just need to add $$(TARGET_CONFIGURE_OPTS) to _INSTALL_TARGET_CMDS > > http://lists.busybox.net/pipermail/buildroot/2022-January/632613.html Ah, OK. This indeed we are passing at build time, but not at install time currently. We can certainly add that at install time too. Though this "build during install step" thing is a bit annoying... Thomas
diff --git a/DEVELOPERS b/DEVELOPERS index ff661e9357..99637c7ae3 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -673,6 +673,9 @@ F: linux/linux-ext-ev3dev-linux-drivers.mk F: package/brickd/ F: package/ev3dev-linux-drivers/ +N: David Pierret <david.pierret@smile.fr> +F: package/bat/ + N: Davide Viti <zinosat@gmail.com> F: board/friendlyarm/nanopi-r1/ F: configs/friendlyarm_nanopi_r1_defconfig diff --git a/package/Config.in b/package/Config.in index a88f0a6849..98a4d4c5f3 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2595,6 +2595,7 @@ menu "System tools" endmenu menu "Text editors and viewers" + source "package/bat/Config.in" source "package/ed/Config.in" source "package/joe/Config.in" source "package/less/Config.in" diff --git a/package/bat/Config.in b/package/bat/Config.in new file mode 100644 index 0000000000..515eaf591a --- /dev/null +++ b/package/bat/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_BAT + bool "bat" + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS + select BR2_PACKAGE_HOST_RUSTC + # we need a full version of less + select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + select BR2_PACKAGE_LESS + help + A cat(1) clone with syntax highlighting and Git integration. + + https://github.com/sharkdp/bat diff --git a/package/bat/bat.hash b/package/bat/bat.hash new file mode 100644 index 0000000000..aa6c8d743d --- /dev/null +++ b/package/bat/bat.hash @@ -0,0 +1,4 @@ +# Locally generated +sha256 9c345788eb916777a60e7ff32031f1c92edc5565031e0c057bce860982768744 bat-0.18.3.tar.gz +sha256 c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE-APACHE +sha256 64de710b6309a7db5e44ad0af382300c7fb6f6d116d8ae32f0164e05db033068 LICENSE-MIT diff --git a/package/bat/bat.mk b/package/bat/bat.mk new file mode 100644 index 0000000000..9b619af172 --- /dev/null +++ b/package/bat/bat.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# bat +# +################################################################################ + +BAT_VERSION = 0.18.3 +BAT_SITE = $(call github,sharkdp,bat,v$(BAT_VERSION)) +BAT_LICENSE = Apache-2.0 or MIT +BAT_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT + +$(eval $(cargo-package)) diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk index bf1436a86b..e2fe104cf3 100644 --- a/package/pkg-cargo.mk +++ b/package/pkg-cargo.mk @@ -110,6 +110,7 @@ ifndef $(2)_INSTALL_TARGET_CMDS define $(2)_INSTALL_TARGET_CMDS cd $$(@D) && \ $$(TARGET_MAKE_ENV) $$($(2)_CARGO_ENV) \ + CC_$$(subst -,_,$$(RUSTC_TARGET_NAME))=$$(TARGET_CC) \ cargo install \ --target $$(RUSTC_TARGET_NAME) \ --offline \