Message ID | 20241206213002.24669-3-vjardin@free.fr |
---|---|
State | Superseded |
Headers | show |
Series | meson install with optional tags | expand |
Hi Vincent, On Fri Dec 6, 2024 at 3:30 PM CST, Vincent Jardin wrote: > Described the usage of FOO_MESON_INSTALL_TAGS=YES which decreases > the footprint of the target since only the runtime will be installed. > All the other development header files or libraries will be installed > into the staging folder. > > Signed-off-by: Vincent Jardin <vjardin@free.fr> > Suggested-by: Brandon Maier <brandon.maier@gmail.com> > --- > docs/manual/adding-packages-meson.adoc | 5 +++++ > package/pkg-meson.mk | 4 ++-- > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/docs/manual/adding-packages-meson.adoc b/docs/manual/adding-packages-meson.adoc > index 01891e03cc..b7c987ddd1 100644 > --- a/docs/manual/adding-packages-meson.adoc > +++ b/docs/manual/adding-packages-meson.adoc > @@ -124,6 +124,11 @@ will therefore only use a few of them. > +c_link_args+, +cpp_args+, +cpp_link_args+, +sys_root+, and > +pkg_config_libdir+. > > +* +FOO_MESON_INSTALL_TAGS+, can be set to +YES+ to enable meson's `--runtime` and > + `--devel` installation modes for the target and staging folders, respectively. > + This configuration is necessary to prevent meson from installing development > + artifacts into the target folder. > + > * +FOO_NINJA_ENV+, to specify additional environment variables to pass to > +ninja+, meson companion tool in charge of the build operations. By default, > empty. > diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk > index 4568f8690e..a4e77cde42 100644 > --- a/package/pkg-meson.mk > +++ b/package/pkg-meson.mk > @@ -235,7 +235,7 @@ ifndef $(2)_INSTALL_STAGING_CMDS > define $(2)_INSTALL_STAGING_CMDS > $$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(STAGING_DIR) \ > $$(MESON) install -C \ > - $$($$(PKG)_SRCDIR)/build $(if $(filter YES,$($(2)_MESON_INSTALL_TAGS)),--tags=runtime$(comma)devel) > + $$($$(PKG)_SRCDIR)/build $$(if $$(filter YES,$$($$(PKG)_MESON_INSTALL_TAGS)),--tags=runtime$(comma)devel) It looks like these changes accidentally got applied to the wrong patch. > endef > endif > > @@ -247,7 +247,7 @@ ifndef $(2)_INSTALL_TARGET_CMDS > define $(2)_INSTALL_TARGET_CMDS > $$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(TARGET_DIR) \ > $$(MESON) install -C \ > - $$($$(PKG)_SRCDIR)/build $(if $(filter YES,$($(2)_MESON_INSTALL_TAGS)),--tags=runtime) > + $$($$(PKG)_SRCDIR)/build $$(if $$(filter YES,$$($$(PKG)_MESON_INSTALL_TAGS)),--tags=runtime) > endef > endif >
Hi Brandon, Happy new year ! > > - $$($$(PKG)_SRCDIR)/build $(if $(filter YES,$($(2)_MESON_INSTALL_TAGS)),--tags=runtime$(comma)devel) > > + $$($$(PKG)_SRCDIR)/build $$(if $$(filter YES,$$($$(PKG)_MESON_INSTALL_TAGS)),--tags=runtime$(comma)devel) > > It looks like these changes accidentally got applied to the > wrong patch. > Oops, I hope 2025 will be more efficient ! v6 for such a small patch ;) LoL Thanks for your support, Vincent
diff --git a/docs/manual/adding-packages-meson.adoc b/docs/manual/adding-packages-meson.adoc index 01891e03cc..b7c987ddd1 100644 --- a/docs/manual/adding-packages-meson.adoc +++ b/docs/manual/adding-packages-meson.adoc @@ -124,6 +124,11 @@ will therefore only use a few of them. +c_link_args+, +cpp_args+, +cpp_link_args+, +sys_root+, and +pkg_config_libdir+. +* +FOO_MESON_INSTALL_TAGS+, can be set to +YES+ to enable meson's `--runtime` and + `--devel` installation modes for the target and staging folders, respectively. + This configuration is necessary to prevent meson from installing development + artifacts into the target folder. + * +FOO_NINJA_ENV+, to specify additional environment variables to pass to +ninja+, meson companion tool in charge of the build operations. By default, empty. diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk index 4568f8690e..a4e77cde42 100644 --- a/package/pkg-meson.mk +++ b/package/pkg-meson.mk @@ -235,7 +235,7 @@ ifndef $(2)_INSTALL_STAGING_CMDS define $(2)_INSTALL_STAGING_CMDS $$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(STAGING_DIR) \ $$(MESON) install -C \ - $$($$(PKG)_SRCDIR)/build $(if $(filter YES,$($(2)_MESON_INSTALL_TAGS)),--tags=runtime$(comma)devel) + $$($$(PKG)_SRCDIR)/build $$(if $$(filter YES,$$($$(PKG)_MESON_INSTALL_TAGS)),--tags=runtime$(comma)devel) endef endif @@ -247,7 +247,7 @@ ifndef $(2)_INSTALL_TARGET_CMDS define $(2)_INSTALL_TARGET_CMDS $$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(TARGET_DIR) \ $$(MESON) install -C \ - $$($$(PKG)_SRCDIR)/build $(if $(filter YES,$($(2)_MESON_INSTALL_TAGS)),--tags=runtime) + $$($$(PKG)_SRCDIR)/build $$(if $$(filter YES,$$($$(PKG)_MESON_INSTALL_TAGS)),--tags=runtime) endef endif
Described the usage of FOO_MESON_INSTALL_TAGS=YES which decreases the footprint of the target since only the runtime will be installed. All the other development header files or libraries will be installed into the staging folder. Signed-off-by: Vincent Jardin <vjardin@free.fr> Suggested-by: Brandon Maier <brandon.maier@gmail.com> --- docs/manual/adding-packages-meson.adoc | 5 +++++ package/pkg-meson.mk | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-)