[Buildroot] [PATCH v4 2/2] package/pkg-meson: use meson to build/install packages

Thomas Petazzoni thomas.petazzoni at bootlin.com
Tue Jul 26 07:07:55 UTC 2022


On Tue, 26 Jul 2022 00:38:11 -0600
James Hilliard <james.hilliard1 at gmail.com> wrote:

> > I *think* this is wrong, at least in the classical autotools sense of
> > prefix vs. DESTDIR.  
> 
> This isn't really different from how we handle target/staging prefix+install.

It is completely different. Do you know the difference between prefix
and DESTDIR?

prefix is the path where the software will be located when executed.

DESTDIR is here to divert the installation.

For host packages, we use prefix=$(HOST_DIR) and no DESTDIR because the
software will be located in $(HOST_DIR) when executed.

For target packages, we use prefix=/usr and DESTDIR=$(TARGET_DIR) /
$(STAGING_DIR) because the software will be located in /usr when
executed on the target, but temporarily during the installation we need
the files to go in $(TARGET_DIR) or $(STAGING_DIR).

See also https://www.gnu.org/prep/standards/html_node/DESTDIR.html.

> > And you should drop --destdir $$(HOST_DIR) here.  
> 
> I recall this didn't work due to pkg-config file generation being prefix based
> which was resulting in pkg-config files being incompatible with per-package
> directories.

And this needs to be investigated since as explained above --prefix /
and --destdir $(HOST_DIR) is most likely incorrect for host packages.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com



More information about the buildroot mailing list