From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] python-meson: new package
Date: Wed, 8 Jun 2016 22:22:50 +0200 [thread overview]
Message-ID: <20160608222250.6d493138@free-electrons.com> (raw)
In-Reply-To: <1465047243-1169-3-git-send-email-eric.le.bihan.dev@free.fr>
Hello,
On Sat, 4 Jun 2016 15:34:03 +0200, Eric Le Bihan wrote:
> This new package provides the Meson Build System, an open source build
> system meant to be both extremely fast, and as user friendly as
> possible.
>
> More precisely, Meson creates configuration files for the Ninja build
> system.
>
> The host variant is also provided, which, besides building Meson,
> generates a cross-compilation configuration file:
> '$(HOST_DIR)/etc/meson/cross-compilation.conf'.
>
> To be able to perform checks when cross-compiling, the host variant
> depends on host-qemu.
>
> To cross-compile a Meson-based project for the target, its package
> should:
>
> - depend on host-python-meson
> - invoke the host variant of Meson with the
> *--cross-file=$(HOST_DIR)/etc/meson/cross-compilation.conf* option.
> - invoke host variant of Ninja to perform the actual build.
It would probably be good to write this somewhere, as it is quite
important to know for users of this build system. But I'm not sure
where: you're going to have only a host package, so no Config.in file,
and therefore no help text. And I'm not sure where this could be added
in the Buildroot manual.
> package/Config.in | 1 +
> package/python-meson/Config.in | 9 +++++
As discussed, if it's a build system, please add only a host package.
> diff --git a/package/python-meson/python-meson.hash b/package/python-meson/python-meson.hash
> new file mode 100644
> index 0000000..7af56c5
> --- /dev/null
> +++ b/package/python-meson/python-meson.hash
> @@ -0,0 +1 @@
> +none xxx python-meson-0.31.0.tar.gz
Since you're fetching from Github, please add a real hash.
> +HOST_PYTHON_MESON_DEPENDENCIES = host-qemu
> +HOST_PYTHON_MESON_NEEDS_HOST_PYTHON = python3
> +
> +HOST_PYTHON_MESON_TARGET_ARCH = $(call qstrip,$(BR2_ARCH))
You can directly use the $(ARCH) variable, which is defined in the main
Makefile.
> +HOST_PYTHON_MESON_TARGET_ENDIAN = $(shell echo $(BR2_ENDIAN) | tr 'A-Z' 'a-z')
$(call LOWERCASE,$(call qstrip,$(BR2_ENDIAN))
> +
> +define HOST_PYTHON_MESON_REMOVE_GUI_TOOL
> + rm -f $(HOST_DIR)/usr/bin/mesongui.py
> +endef
Not sure removing stuff from the host variant is really useful.
> +
> +define HOST_PYTHON_MESON_INSTALL_CROSS_CONF
> + $(INSTALL) -D -m 0644 package/python-meson/cross-compilation.conf.in \
> + $(HOST_DIR)/etc/meson/cross-compilation.conf
> + $(SED) 's;@TARGET_CROSS@;$(TARGET_CROSS);g' \
> + -e 's;@TARGET_ARCH@;$(HOST_PYTHON_MESON_TARGET_ARCH);g' \
> + -e 's;@TARGET_ENDIAN@;$(HOST_PYTHON_MESON_TARGET_ENDIAN);g' \
> + -e 's;@HOST_DIR@;$(HOST_DIR);g' \
> + $(HOST_DIR)/etc/meson/cross-compilation.conf
> +endef
> +
> +define HOST_PYTHON_MESON_INSTALL_EXE_WRAPPER
> + $(INSTALL) -D -m 0755 package/python-meson/meson-exe-wrapper.in \
> + $(HOST_DIR)/usr/bin/meson-exe-wrapper
> + $(SED) 's;@TARGET_ARCH@;$(HOST_PYTHON_MESON_TARGET_ARCH);g' \
> + -e 's;@HOST_DIR@;$(HOST_DIR);g' \
> + -e 's;@TARGET_DIR@;$(TARGET_DIR);g' \
> + $(HOST_DIR)/usr/bin/meson-exe-wrapper
> +endef
> +
> +HOST_PYTHON_MESON_POST_INSTALL_HOOKS += \
> + HOST_PYTHON_MESON_REMOVE_GUI_TOOL \
> + HOST_PYTHON_MESON_INSTALL_CROSS_CONF \
> + HOST_PYTHON_MESON_INSTALL_EXE_WRAPPER
> +
> +
> +$(eval $(python-package))
> +$(eval $(host-python-package))
Other than that, looks good!
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-06-08 20:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-04 13:34 [Buildroot] [PATCH 0/2] Ninja, Meson: new build systems Eric Le Bihan
2016-06-04 13:34 ` [Buildroot] [PATCH 1/2] ninja: new package Eric Le Bihan
2016-06-04 15:50 ` Bernd Kuhls
2016-06-04 18:03 ` Eric Le Bihan
2016-06-08 20:17 ` Thomas Petazzoni
2016-06-08 20:16 ` Thomas Petazzoni
2016-06-04 13:34 ` [Buildroot] [PATCH 2/2] python-meson: " Eric Le Bihan
2016-06-08 20:22 ` Thomas Petazzoni [this message]
2016-06-09 17:59 ` Eric Le Bihan
2016-06-09 19:28 ` Thomas Petazzoni
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=20160608222250.6d493138@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox