Add support for Meson build
v2 cover Add support for Meson build
Last year, Eric Le Bihan already proposed patches to support the Meson build system [1], but the patches were rejected, as no package in Buildroot required a Meson build.
This has changed, as the libmpdclient package has switched from autotools to Meson.
Therefore, the patches from Eric are resubmitted with some changes as suggested by Yann E. Morin.
[1] http://patchwork.ozlabs.org/patch/646685/
Eric Le Bihan (2):
meson: new package
docs/manual: document meson-based packages
J?rg Krause (1):
libmpdclient: bump to version 2.13
docs/manual/adding-packages-meson.txt | 80 +++++++++++++++++++++++++++++++++ docs/manual/adding-packages.txt | 2 + package/libmpdclient/libmpdclient.hash | 4 +- package/libmpdclient/libmpdclient.mk | 26 +++++++++-- package/meson/cross-compilation.conf.in | 15 +++++++ package/meson/meson.hash | 2 + package/meson/meson.mk | 31 +++++++++++++ 7 files changed, 155 insertions(+), 5 deletions(-) create mode 100644 docs/manual/adding-packages-meson.txt create mode 100644 package/meson/cross-compilation.conf.in create mode 100644 package/meson/meson.hash create mode 100644 package/meson/meson.mk
Signature · 1 line
2.13.3
PATCH v3 1/3 meson: new package
From: Eric Le Bihan <[email protected]>
This new package provides the host variant of 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.
Besides building Meson, it generates a configuration file ("$(HOST_DIR)/etc/meson/cross-compilation.conf") to be used when cross-compiling a Meson-based project.
[J?rg Krause:
* bump to version 0.41.2
* use explicit tarball release instead of github helper
* use explicit sed
* pass BR2_GCC_TARGET_CPU to cross file]
---
v3:
* fix missing mkdir
--- package/meson/cross-compilation.conf.in | 15 +++++++++++++++ package/meson/meson.hash | 2 ++ package/meson/meson.mk | 31 +++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 package/meson/cross-compilation.conf.in create mode 100644 package/meson/meson.hash create mode 100644 package/meson/meson.mk
package/meson/cross-compilation.conf.in new file +15 -0
@@ -0,0 +1,15 @@ +# Note: in Meson terminology, what Buildroot calls the "host" system is the +# "build" system and the "target" system is called the "host" system. + +[binaries] +c = '@TARGET_CROSS at gcc' +cpp = '@TARGET_CROSS at g++' +ar = '@TARGET_CROSS at ar' +strip = '@TARGET_CROSS at strip' +pkgconfig = '@HOST_DIR@/usr/bin/pkg-config' + +[host_machine] +system = 'linux' +cpu_family ='@TARGET_ARCH@' +cpu = '@TARGET_CPU@' +endian = '@TARGET_ENDIAN@'
package/meson/meson.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally generated +sha256 074dd24fd068be0893e2e45bcc35c919d8e12777e9d6a7efdf72d4dc300867ca meson-0.41.2.tar.gz
package/meson/meson.mk new file +31 -0
@@ -0,0 +1,31 @@ +################################################################################ +# +# meson +# +################################################################################ + +MESON_VERSION = 0.41.2 +MESON_SITE = https://github.com/mesonbuild/meson/releases/download/$(MESON_VERSION) +MESON_LICENSE = Apache-2.0 +MESON_LICENSE_FILES = COPYING +MESON_SETUP_TYPE = setuptools + +HOST_MESON_DEPENDENCIES = host-ninja +HOST_MESON_NEEDS_HOST_PYTHON = python3 + +HOST_MESON_TARGET_ENDIAN = $(shell echo $(BR2_ENDIAN) | tr 'A-Z' 'a-z') + +define HOST_MESON_INSTALL_CROSS_CONF + mkdir -p $(HOST_DIR)/etc/meson + sed -e 's;@TARGET_CROSS@;$(TARGET_CROSS);g' \ + -e 's;@TARGET_ARCH@;$(ARCH);g' \ + -e 's;@TARGET_CPU@;$(BR2_GCC_TARGET_CPU);g' \ + -e 's;@TARGET_ENDIAN@;$(HOST_MESON_TARGET_ENDIAN);g' \ + -e 's;@HOST_DIR@;$(HOST_DIR);g' \ + $(HOST_MESON_PKGDIR)/cross-compilation.conf.in \ + > $(HOST_DIR)/etc/meson/cross-compilation.conf +endef + +HOST_MESON_POST_INSTALL_HOOKS += HOST_MESON_INSTALL_CROSS_CONF + +$(eval $(host-python-package))
Signature · 1 line
2.13.3
PATCH v3 1/3 meson: new package
J?rg, ?ric, All,
On 2017-07-27 11:55 +0200, J?rg Krause spake thusly:
package/meson/cross-compilation.conf.in
Quoted 38 lines
From: Eric Le Bihan <[email protected]>
This new package provides the host variant of 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.
Besides building Meson, it generates a configuration file ("$(HOST_DIR)/etc/meson/cross-compilation.conf") to be used when cross-compiling a Meson-based project.
Signed-off-by Eric Le Bihan <[email protected]>[J?rg Krause:
* bump to version 0.41.2
* use explicit tarball release instead of github helper
* use explicit sed
* passBR2_GCC_TARGET_CPUto cross file]Signed-off-by J?rg Krause <[email protected]>---
v3:
* fix missing mkdir--- package/meson/cross-compilation.conf.in | 15 +++++++++++++++ package/meson/meson.hash | 2 ++ package/meson/meson.mk | 31 +++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 package/meson/cross-compilation.conf.in create mode 100644 package/meson/meson.hash create mode 100644 package/meson/meson.mkpackage/meson/cross-compilation.conf.in new file +0
-0
And what about host packages that use meson?
package/meson/cross-compilation.conf.in line 2
Quoted 3 lines
package/meson/cross-compilation.conf.in new file +2
-0@@ -0,0 +1,15 @@ +# Note: in Meson terminology, what Buildroot calls the "host" system is the +# "build" system and the "target" system is called the "host" system.
Yeah, pretty confusing, isn't it? Buildroot is wrong here, but since we've been wrong for almost two decades now, we can't really change...
I'd still suggest a little rephrasing:
# Note: Buildroot's and Meson's terminologies differ about the meaning # of 'build', 'host' and 'target':
# - Buildroot's 'host' is Meson's 'build'
# - Buildroot's 'target' is Meson's 'host'
Regards,
Yann E. MORIN.
Quoted 60 lines
package/meson/cross-compilation.conf.in new file +12
-0+[binaries] +c = '@TARGET_CROSS at gcc' +cpp = '@TARGET_CROSS at g++' +ar = '@TARGET_CROSS at ar' +strip = '@TARGET_CROSS at strip' +pkgconfig = '@HOST_DIR@/usr/bin/pkg-config' + +[host_machine] +system = 'linux' +cpu_family ='@TARGET_ARCH@' +cpu = '@TARGET_CPU@' +endian = '@TARGET_ENDIAN@'package/meson/meson.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally generated +sha256 074dd24fd068be0893e2e45bcc35c919d8e12777e9d6a7efdf72d4dc300867ca meson-0.41.2.tar.gzpackage/meson/meson.mk new file +31
-0@@ -0,0 +1,31 @@ +################################################################################ +# +# meson +# +################################################################################ + +MESON_VERSION = 0.41.2 +MESON_SITE = https://github.com/mesonbuild/meson/releases/download/$(MESON_VERSION) +MESON_LICENSE = Apache-2.0 +MESON_LICENSE_FILES = COPYING +MESON_SETUP_TYPE = setuptools + +HOST_MESON_DEPENDENCIES = host-ninja +HOST_MESON_NEEDS_HOST_PYTHON = python3 + +HOST_MESON_TARGET_ENDIAN = $(shell echo $(BR2_ENDIAN) | tr 'A-Z' 'a-z') + +define HOST_MESON_INSTALL_CROSS_CONF + mkdir -p $(HOST_DIR)/etc/meson + sed -e 's;@TARGET_CROSS@;$(TARGET_CROSS);g' \ + -e 's;@TARGET_ARCH@;$(ARCH);g' \ + -e 's;@TARGET_CPU@;$(BR2_GCC_TARGET_CPU);g' \ + -e 's;@TARGET_ENDIAN@;$(HOST_MESON_TARGET_ENDIAN);g' \ + -e 's;@HOST_DIR@;$(HOST_DIR);g' \ + $(HOST_MESON_PKGDIR)/cross-compilation.conf.in \ + > $(HOST_DIR)/etc/meson/cross-compilation.conf +endef + +HOST_MESON_POST_INSTALL_HOOKS += HOST_MESON_INSTALL_CROSS_CONF + +$(eval $(host-python-package))Signature · 1 line
2.13.3
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 1/3 meson: new package
Hi!
Quoted 36 lines · Yann E. MORIN
J?rg, ?ric, All,
On 2017-07-27 11:55 +0200, J?rg Krause spake thusly:
Quoted 33 lines
From: Eric Le Bihan <[email protected]>
This new package provides the host variant of 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.
Besides building Meson, it generates a configuration file ("$(HOST_DIR)/etc/meson/cross-compilation.conf") to be used when cross-compiling a Meson-based project.
Signed-off-by Eric Le Bihan <[email protected]>[J?rg Krause:
* bump to version 0.41.2
* use explicit tarball release instead of github helper
* use explicit sed
* passBR2_GCC_TARGET_CPUto cross file]Signed-off-by J?rg Krause <[email protected]>---
v3:
* fix missing mkdir--- package/meson/cross-compilation.conf.in | 15 +++++++++++++++ package/meson/meson.hash | 2 ++ package/meson/meson.mk | 31 +++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 package/meson/cross-compilation.conf.in create mode 100644 package/meson/meson.hash create mode 100644 package/meson/meson.mk
Quoted 7 lines
package/meson/cross-compilation.conf.in
Quoted 5 lines
package/meson/cross-compilation.conf.in new file +0
-0And what about host packages that use meson?
Good question. I don't know about host packages that may switch to Meson. But, out of curiosity, I'll try with a dummy package to see how it would behave.
Quoted 7 lines
package/meson/cross-compilation.conf.in line 2
Quoted 3 lines
package/meson/cross-compilation.conf.in new file +2
-0@@ -0,0 +1,15 @@ +# Note: in Meson terminology, what Buildroot calls the "host" system is the +# "build" system and the "target" system is called the "host" system.Yeah, pretty confusing, isn't it? Buildroot is wrong here, but since we've been wrong for almost two decades now, we can't really change...
Quoted 6 lines
I'd still suggest a little rephrasing:
# Note: Buildroot's and Meson's terminologies differ about the meaning # of 'build', 'host' and 'target':
# - Buildroot's 'host' is Meson's 'build'
# - Buildroot's 'target' is Meson's 'host'
Looks sensible to me.
Quoted 55 lines
Regards,
Yann E. MORIN.Quoted 52 lines
package/meson/cross-compilation.conf.in new file +12
-0+[binaries] +c = '@TARGET_CROSS at gcc' +cpp = '@TARGET_CROSS at g++' +ar = '@TARGET_CROSS at ar' +strip = '@TARGET_CROSS at strip' +pkgconfig = '@HOST_DIR@/usr/bin/pkg-config' + +[host_machine] +system = 'linux' +cpu_family ='@TARGET_ARCH@' +cpu = '@TARGET_CPU@' +endian = '@TARGET_ENDIAN@'package/meson/meson.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally generated +sha256 074dd24fd068be0893e2e45bcc35c919d8e12777e9d6a7efdf72d4dc300867ca meson-0.41.2.tar.gzpackage/meson/meson.mk new file +26
-0@@ -0,0 +1,31 @@ +################################################################################ +# +# meson +# +################################################################################ + +MESON_VERSION = 0.41.2 +MESON_SITE = https://github.com/mesonbuild/meson/releases/download/$(MESON_VERSION) +MESON_LICENSE = Apache-2.0 +MESON_LICENSE_FILES = COPYING +MESON_SETUP_TYPE = setuptools + +HOST_MESON_DEPENDENCIES = host-ninja +HOST_MESON_NEEDS_HOST_PYTHON = python3 + +HOST_MESON_TARGET_ENDIAN = $(shell echo $(BR2_ENDIAN) | tr 'A-Z' 'a-z') + +define HOST_MESON_INSTALL_CROSS_CONF + mkdir -p $(HOST_DIR)/etc/meson + sed -e 's;@TARGET_CROSS@;$(TARGET_CROSS);g' \ + -e 's;@TARGET_ARCH@;$(ARCH);g' \ + -e 's;@TARGET_CPU@;$(BR2_GCC_TARGET_CPU);g' \ + -e 's;@TARGET_ENDIAN@;$(HOST_MESON_TARGET_ENDIAN);g' \ + -e 's;@HOST_DIR@;$(HOST_DIR);g' \ + $(HOST_MESON_PKGDIR)/cross-compilation.conf.in \ + > $(HOST_DIR)/etc/meson/cross-compilation.conf
Quoted 8 lines
Quoted 8 lines
package/meson/meson.mk new file +5
-1+endef + +HOST_MESON_POST_INSTALL_HOOKS += HOST_MESON_INSTALL_CROSS_CONF + +$(eval $(host-python-package)) --2.13.3
Regards,
--
ELB
PATCH v3 1/3 meson: new package
In reply to Jörg KrauseHello J?rg, Eric,
Quoted 80 lines · J?rg Krause
From: Eric Le Bihan <[email protected]>
This new package provides the host variant of 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.
Besides building Meson, it generates a configuration file ("$(HOST_DIR)/etc/meson/cross-compilation.conf") to be used when cross-compiling a Meson-based project.
Signed-off-by Eric Le Bihan <[email protected]>[J?rg Krause:
* bump to version 0.41.2
* use explicit tarball release instead of github helper
* use explicit sed
* passBR2_GCC_TARGET_CPUto cross file]Signed-off-by J?rg Krause <[email protected]>---
v3:
* fix missing mkdir--- package/meson/cross-compilation.conf.in | 15 +++++++++++++++ package/meson/meson.hash | 2 ++ package/meson/meson.mk | 31 +++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 package/meson/cross-compilation.conf.in create mode 100644 package/meson/meson.hash create mode 100644 package/meson/meson.mkpackage/meson/cross-compilation.conf.in new file +15
-0@@ -0,0 +1,15 @@ +# Note: in Meson terminology, what Buildroot calls the "host" system is the +# "build" system and the "target" system is called the "host" system. + +[binaries] +c = '@TARGET_CROSS at gcc' +cpp = '@TARGET_CROSS at g++' +ar = '@TARGET_CROSS at ar' +strip = '@TARGET_CROSS at strip' +pkgconfig = '@HOST_DIR@/usr/bin/pkg-config' + +[host_machine] +system = 'linux' +cpu_family ='@TARGET_ARCH@' +cpu = '@TARGET_CPU@' +endian = '@TARGET_ENDIAN@'package/meson/meson.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally generated +sha256 074dd24fd068be0893e2e45bcc35c919d8e12777e9d6a7efdf72d4dc300867ca meson-0.41.2.tar.gzpackage/meson/meson.mk new file +12
-0@@ -0,0 +1,31 @@ +################################################################################ +# +# meson +# +################################################################################ + +MESON_VERSION = 0.41.2 +MESON_SITE = https://github.com/mesonbuild/meson/releases/download/$(MESON_VERSION) +MESON_LICENSE = Apache-2.0 +MESON_LICENSE_FILES = COPYING +MESON_SETUP_TYPE = setuptools +
package/meson/meson.mk line 22
Quoted 10 lines
package/meson/meson.mk new file +10
-0+HOST_MESON_DEPENDENCIES = host-ninja +HOST_MESON_NEEDS_HOST_PYTHON = python3 + +HOST_MESON_TARGET_ENDIAN = $(shell echo $(BR2_ENDIAN) | tr 'A-Z' 'a-z') + +define HOST_MESON_INSTALL_CROSS_CONF + mkdir -p $(HOST_DIR)/etc/meson + sed -e 's;@TARGET_CROSS@;$(TARGET_CROSS);g' \ + -e 's;@TARGET_ARCH@;$(ARCH);g' \ + -e 's;@TARGET_CPU@;$(BR2_GCC_TARGET_CPU);g' \
This leads to the following entry in the cross-compilation.conf file
cpu = '"cortex-a53"'
and a compile failure on a first try to enable meson build for gstreamer1 package. The following patch fixes the entry to
cpu = 'cortex-a53'
which fixes the gstreamer1 meson based build for me:
@ -14,12 +14,13 @@ HOST_MESON_DEPENDENCIES = host-ninja
HOST_MESON_NEEDS_HOST_PYTHON = python3
HOST_MESON_TARGET_ENDIAN = $(shell echo $(BR2_ENDIAN) | tr 'A-Z' 'a-z')
+HOST_MESON_TARGET_CPU = $(call qstrip,$(BR2_GCC_TARGET_CPU))
define HOST_MESON_INSTALL_CROSS_CONF
mkdir -p $(HOST_DIR)/etc/meson
sed -e 's;@TARGET_CROSS@;$(TARGET_CROSS);g' \
-e 's;@TARGET_ARCH@;$(ARCH);g' \
- -e 's;@TARGET_CPU@;$(BR2_GCC_TARGET_CPU);g' \
+ -e 's;@TARGET_CPU@;$(HOST_MESON_TARGET_CPU);g' \
-e 's;@TARGET_ENDIAN@;$(HOST_MESON_TARGET_ENDIAN);g' \
-e 's;@HOST_DIR@;$(HOST_DIR);g' \
$(HOST_MESON_PKGDIR)/cross-compilation.conf.in \
Regards,
Peter
Note: the next version of libinput (1.9.0) drops autotools support and changed to using meson, see [1].
[1] https://lists.freedesktop.org/archives/wayland-devel/2017-October/035469.html
Quoted 9 lines
package/meson/meson.mk new file +9
-0+ -e 's;@TARGET_ENDIAN@;$(HOST_MESON_TARGET_ENDIAN);g' \ + -e 's;@HOST_DIR@;$(HOST_DIR);g' \ + $(HOST_MESON_PKGDIR)/cross-compilation.conf.in \ + > $(HOST_DIR)/etc/meson/cross-compilation.conf +endef + +HOST_MESON_POST_INSTALL_HOOKS += HOST_MESON_INSTALL_CROSS_CONF + +$(eval $(host-python-package))
PATCH v3 2/3 docs/manual: document meson-based packages
In reply to Jörg KrauseFrom: Eric Le Bihan <[email protected]>
Add instructions for adding a package which uses the Meson build system.
[J?rg Krause:
* use one-liner for buildtype]
---
v3:
* none
--- docs/manual/adding-packages-meson.txt | 80 +++++++++++++++++++++++++++++++++++ docs/manual/adding-packages.txt | 2 + 2 files changed, 82 insertions(+) create mode 100644 docs/manual/adding-packages-meson.txt
docs/manual/adding-packages-meson.txt new file +80 -0
@@ -0,0 +1,80 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +=== Integration of Meson-based packages + +[[meson-package-tutorial]] + +==== +meson-package+ tutorial + +http://mesonbuild.com[Meson] is an open source build system meant to be both +extremely fast, and, even more importantly, as user friendly as possible. + +Buildroot does not (yet) provide a dedicated package infrastructure for +meson-based packages. So, we will explain how to write a +.mk+ file for such a +package. Let's start with an example: + +------------------------------ +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: FOO_VERSION = 1.0 +08: FOO_SOURCE = foo-$(FOO_VERSION).tar.gz +09: FOO_SITE = http://www.foosoftware.org/download +10: FOO_LICENSE = GPLv3+ +11: FOO_LICENSE_FILES = COPYING +12: +13: FOO_DEPENDENCIES = host-meson host-pkgconf bar +14: +15: FOO_MESON_OPTS += \ +16: --prefix=/usr \ +17: --buildtype $(if $(BR2_ENABLE_DEBUG),debug,release) \ +18: --cross-file $(HOST_DIR)/etc/meson/cross-compilation.conf +19: +20: define FOO_CONFIGURE_CMDS +21: rm -rf $(@D)/build +22: mkdir -p $(@D)/build +23: $(TARGET_MAKE_ENV) meson.py $(FOO_MESON_OPTS) $(@D) $(@D)/build +24: endef +25: +26: define FOO_BUILD_CMDS +27: $(TARGET_MAKE_ENV) ninja -C $(@D)/build +28: endef +29: +30: define FOO_INSTALL_TARGET_CMDS +31: $(TARGET_MAKE_ENV) DESTDIR=$(TARGET_DIR) ninja -C $(@D)/build install +32: endef +33: +34: $(eval $(generic-package)) +-------------------------------- + +The Makefile starts with the definition of the standard variables for package +declaration (lines 7 to 11). + +As seen in line 34, it is based on the +xref:generic-package-tutorial[+generic-package+ infrastructure]. So, it defines +the variables required by this particular infrastructure, where Meson and its +companion tool, Ninja, are invoked: + +* +FOO_CONFIGURE_CMDS+: the build directory required by Meson is created, and + Meson is invoked to generate the Ninja build file. The options required to + configure the cross-compilation of the package are passed via + +FOO_MESON_OPTS+. + +* +FOO_BUILD_CMDS+: Ninja is invoked to perform the build. + +* +FOO_INSTALL_TARGET_CMDS+: Ninja is invoked to install the files generated + during the build step. + +In order to have Meson available for the build, +FOO_DEPENDENCIES+ needs to +contain +host-meson+. In the example, +host-pkgconf+ and +bar+ are also +declared as dependencies because the Meson build file of +foo+ uses `pkg-config` +to determine the compilation flags and libraries of package +bar+. + +To sum it up, to add a new meson-based package, the Makefile example can be +copied verbatim then edited to replace all occurences of +FOO+ with the +uppercase name of the new package and update the values of the standard +variables.
docs/manual/adding-packages.txt +2 -0
@@ -34,6 +34,8 @@ include::adding-packages-rebar.txt[] include::adding-packages-waf.txt[] +include::adding-packages-meson.txt[] + include::adding-packages-kernel-module.txt[] include::adding-packages-asciidoc.txt[]
Signature · 1 line
2.13.3
PATCH v3 2/3 docs/manual: document meson-based packages
J?rg, ?ric, All,
On 2017-07-27 11:55 +0200, J?rg Krause spake thusly:
Quoted 33 lines
From: Eric Le Bihan <[email protected]>
Add instructions for adding a package which uses the Meson build system.
Signed-off-by Eric Le Bihan <[email protected]>[J?rg Krause:
* use one-liner for buildtype]Signed-off-by J?rg Krause <[email protected]>---
v3:
* none--- docs/manual/adding-packages-meson.txt | 80 +++++++++++++++++++++++++++++++++++ docs/manual/adding-packages.txt | 2 + 2 files changed, 82 insertions(+) create mode 100644 docs/manual/adding-packages-meson.txtdocs/manual/adding-packages-meson.txt new file +10
-0@@ -0,0 +1,80 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +=== Integration of Meson-based packages + +[[meson-package-tutorial]] + +==== +meson-package+ tutorial + +http://mesonbuild.com[Meson] is an open source build system meant to be both
docs/manual/adding-packages-meson.txt line 20
Quoted 10 lines
docs/manual/adding-packages-meson.txt new file +10
-0+extremely fast, and, even more importantly, as user friendly as possible. + +Buildroot does not (yet) provide a dedicated package infrastructure for +meson-based packages. So, we will explain how to write a +.mk+ file for such a +package. Let's start with an example: + +------------------------------ +01: ################################################################################ +02: # +03: # foo
We're not very consistent with the meta-name of the tutorial package. Some infras use libfoo, others use foo, while there is also foobar. Sigh...
foo is nice for me, but I'd settle for anything as long as it is consistent.
Quoted 5 lines
docs/manual/adding-packages-meson.txt new file +5
-0+04: # +05: ################################################################################ +06: +07: FOO_VERSION = 1.0 +08: FOO_SOURCE = foo-$(FOO_VERSION).tar.gz
docs/manual/adding-packages-meson.txt line 35
Quoted 10 lines
docs/manual/adding-packages-meson.txt new file +10
-0+09: FOO_SITE = http://www.foosoftware.org/download +10: FOO_LICENSE = GPLv3+ +11: FOO_LICENSE_FILES = COPYING +12: +13: FOO_DEPENDENCIES = host-meson host-pkgconf bar +14: +15: FOO_MESON_OPTS += \ +16: --prefix=/usr \ +17: --buildtype $(if $(BR2_ENABLE_DEBUG),debug,release) \ +18: --cross-file $(HOST_DIR)/etc/meson/cross-compilation.conf
Whether we one day add a meson-package infra or not, I think this variable should be documented as FOO_CONF_OPTS for symetry with the other package infras.
docs/manual/adding-packages-meson.txt line 38
Quoted 2 lines
docs/manual/adding-packages-meson.txt new file +2
-0+20: define FOO_CONFIGURE_CMDS +21: rm -rf $(@D)/build
We don't usually remove stuff created in a previous run, unless it breaks the build.
docs/manual/adding-packages-meson.txt line 44
Quoted 6 lines
docs/manual/adding-packages-meson.txt new file +6
-0+22: mkdir -p $(@D)/build +23: $(TARGET_MAKE_ENV) meson.py $(FOO_MESON_OPTS) $(@D) $(@D)/build +24: endef +25: +26: define FOO_BUILD_CMDS +27: $(TARGET_MAKE_ENV) ninja -C $(@D)/build
Would the build accept additional options? I mean, do we need to prepare to pass extra parameteres, like FOO_MAKE_OPTS does for autotools?
docs/manual/adding-packages-meson.txt line 48
Quoted 4 lines
docs/manual/adding-packages-meson.txt new file +4
-0+28: endef +29: +30: define FOO_INSTALL_TARGET_CMDS +31: $(TARGET_MAKE_ENV) DESTDIR=$(TARGET_DIR) ninja -C $(@D)/build install
Ditto FOO_INSTALL_TARGET_OPTS and FOO_INSTALL_STAGING_OPTS?
docs/manual/adding-packages-meson.txt line 49
Quoted 1 line
docs/manual/adding-packages-meson.txt new file +1
-0+32: endef
If all the meson-based packages are just those three commands (configure, build and install) and never deviates by more than the _OPTS stuff, then I believe we should add the meson-package infra right away. And it should be reasonably easy.
Regards,
Yann E. MORIN.
Quoted 46 lines
docs/manual/adding-packages-meson.txt new file +30
-0+34: $(eval $(generic-package)) +-------------------------------- + +The Makefile starts with the definition of the standard variables for package +declaration (lines 7 to 11). + +As seen in line 34, it is based on the +xref:generic-package-tutorial[+generic-package+ infrastructure]. So, it defines +the variables required by this particular infrastructure, where Meson and its +companion tool, Ninja, are invoked: + +* +FOO_CONFIGURE_CMDS+: the build directory required by Meson is created, and + Meson is invoked to generate the Ninja build file. The options required to + configure the cross-compilation of the package are passed via + +FOO_MESON_OPTS+. + +* +FOO_BUILD_CMDS+: Ninja is invoked to perform the build. + +* +FOO_INSTALL_TARGET_CMDS+: Ninja is invoked to install the files generated + during the build step. + +In order to have Meson available for the build, +FOO_DEPENDENCIES+ needs to +contain +host-meson+. In the example, +host-pkgconf+ and +bar+ are also +declared as dependencies because the Meson build file of +foo+ uses `pkg-config` +to determine the compilation flags and libraries of package +bar+. + +To sum it up, to add a new meson-based package, the Makefile example can be +copied verbatim then edited to replace all occurences of +FOO+ with the +uppercase name of the new package and update the values of the standard +variables.docs/manual/adding-packages.txt +2
-0@@ -34,6 +34,8 @@ include::adding-packages-rebar.txt[] include::adding-packages-waf.txt[] +include::adding-packages-meson.txt[] + include::adding-packages-kernel-module.txt[] include::adding-packages-asciidoc.txt[]Signature · 1 line
2.13.3
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 2/3 docs/manual: document meson-based packages
Quoted 70 lines · Yann E. MORIN
J?rg, ?ric, All,
On 2017-07-27 11:55 +0200, J?rg Krause spake thusly:
Quoted 33 lines
From: Eric Le Bihan <[email protected]>
Add instructions for adding a package which uses the Meson build system.
Signed-off-by Eric Le Bihan <[email protected]>[J?rg Krause:
* use one-liner for buildtype]Signed-off-by J?rg Krause <[email protected]>---
v3:
* none--- docs/manual/adding-packages-meson.txt | 80 +++++++++++++++++++++++++++++++++++ docs/manual/adding-packages.txt | 2 + 2 files changed, 82 insertions(+) create mode 100644 docs/manual/adding-packages-meson.txtdocs/manual/adding-packages-meson.txt new file +10
-0@@ -0,0 +1,80 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +=== Integration of Meson-based packages + +[[meson-package-tutorial]] + +==== +meson-package+ tutorial + +http://mesonbuild.com[Meson] is an open source build system meant to be bothdocs/manual/adding-packages-meson.txt line 20
Quoted 10 lines
docs/manual/adding-packages-meson.txt new file +10
-0+extremely fast, and, even more importantly, as user friendly as possible. + +Buildroot does not (yet) provide a dedicated package infrastructure for +meson-based packages. So, we will explain how to write a +.mk+ file for such a +package. Let's start with an example: + +------------------------------ +01: ################################################################################ +02: # +03: # fooWe're not very consistent with the meta-name of the tutorial package. Some infras use libfoo, others use foo, while there is also foobar. Sigh...
foo is nice for me, but I'd settle for anything as long as it is consistent.
Quoted 5 lines
docs/manual/adding-packages-meson.txt new file +5
-0+04: # +05: ################################################################################ +06: +07: FOO_VERSION = 1.0 +08: FOO_SOURCE = foo-$(FOO_VERSION).tar.gzdocs/manual/adding-packages-meson.txt line 35
Quoted 10 lines
docs/manual/adding-packages-meson.txt new file +10
-0+09: FOO_SITE = http://www.foosoftware.org/download +10: FOO_LICENSE = GPLv3+ +11: FOO_LICENSE_FILES = COPYING +12: +13: FOO_DEPENDENCIES = host-meson host-pkgconf bar +14: +15: FOO_MESON_OPTS += \ +16: --prefix=/usr \ +17: --buildtype $(if $(BR2_ENABLE_DEBUG),debug,release) \ +18: --cross-file $(HOST_DIR)/etc/meson/cross-compilation.conf
Quoted 3 lines
Whether we one day add a meson-package infra or not, I think this variable should be documented as
FOO_CONF_OPTSfor symetry with the other package infras.
OK.
Quoted 5 lines
docs/manual/adding-packages-meson.txt line 38
Quoted 2 lines
docs/manual/adding-packages-meson.txt new file +2
-0+20: define FOO_CONFIGURE_CMDS +21: rm -rf $(@D)/buildWe don't usually remove stuff created in a previous run, unless it breaks the build.
OK.
Quoted 9 lines
docs/manual/adding-packages-meson.txt line 44
Quoted 6 lines
docs/manual/adding-packages-meson.txt new file +6
-0+22: mkdir -p $(@D)/build +23: $(TARGET_MAKE_ENV) meson.py $(FOO_MESON_OPTS) $(@D) $(@D)/build +24: endef +25: +26: define FOO_BUILD_CMDS +27: $(TARGET_MAKE_ENV) ninja -C $(@D)/buildWould the build accept additional options? I mean, do we need to prepare to pass extra parameteres, like
FOO_MAKE_OPTSdoes for autotools?
I'll check this.
Quoted 6 lines
docs/manual/adding-packages-meson.txt line 48
Quoted 4 lines
docs/manual/adding-packages-meson.txt new file +4
-0+28: endef +29: +30: define FOO_INSTALL_TARGET_CMDS +31: $(TARGET_MAKE_ENV) DESTDIR=$(TARGET_DIR) ninja -C $(@D)/build installDitto
FOO_INSTALL_TARGET_OPTSandFOO_INSTALL_STAGING_OPTS?
I did not know about these two (I should have read the other pkg-*.mk more carefully). I'll check this.
Quoted 48 lines
docs/manual/adding-packages-meson.txt line 49
Quoted 1 line
docs/manual/adding-packages-meson.txt new file +1
-0+32: endefIf all the meson-based packages are just those three commands (configure, build and install) and never deviates by more than the
_OPTSstuff, then I believe we should add the meson-package infra right away. And it should be reasonably easy.Regards,
Yann E. MORIN.Quoted 38 lines
docs/manual/adding-packages-meson.txt new file +30
-0+34: $(eval $(generic-package)) +-------------------------------- + +The Makefile starts with the definition of the standard variables for package +declaration (lines 7 to 11). + +As seen in line 34, it is based on the +xref:generic-package-tutorial[+generic-package+ infrastructure]. So, it defines +the variables required by this particular infrastructure, where Meson and its +companion tool, Ninja, are invoked: + +* +FOO_CONFIGURE_CMDS+: the build directory required by Meson is created, and + Meson is invoked to generate the Ninja build file. The options required to + configure the cross-compilation of the package are passed via + +FOO_MESON_OPTS+. + +* +FOO_BUILD_CMDS+: Ninja is invoked to perform the build. + +* +FOO_INSTALL_TARGET_CMDS+: Ninja is invoked to install the files generated + during the build step. + +In order to have Meson available for the build, +FOO_DEPENDENCIES+ needs to +contain +host-meson+. In the example, +host-pkgconf+ and +bar+ are also +declared as dependencies because the Meson build file of +foo+ uses `pkg-config` +to determine the compilation flags and libraries of package +bar+. + +To sum it up, to add a new meson-based package, the Makefile example can be +copied verbatim then edited to replace all occurences of +FOO+ with the +uppercase name of the new package and update the values of the standard +variables.docs/manual/adding-packages.txt +0
-0@@ -34,6 +34,8 @@ include::adding-packages-rebar.txt[] include::adding-packages-waf.txt[]
Quoted 8 lines
Quoted 8 lines
docs/manual/adding-packages.txt +2
-1+include::adding-packages-meson.txt[] + include::adding-packages-kernel-module.txt[] include::adding-packages-asciidoc.txt[] --2.13.3
Regards,
--
ELB
PATCH v3 2/3 docs/manual: document meson-based packages
Hello everybody,
Quoted 77 lines · Eric Le Bihan
Quoted 70 lines · Yann E. MORIN
J?rg, ?ric, All,
On 2017-07-27 11:55 +0200, J?rg Krause spake thusly:
Quoted 33 lines
From: Eric Le Bihan <[email protected]>
Add instructions for adding a package which uses the Meson build system.
Signed-off-by Eric Le Bihan <[email protected]>[J?rg Krause:
* use one-liner for buildtype]Signed-off-by J?rg Krause <[email protected]>---
v3:
* none--- docs/manual/adding-packages-meson.txt | 80 +++++++++++++++++++++++++++++++++++ docs/manual/adding-packages.txt | 2 + 2 files changed, 82 insertions(+) create mode 100644 docs/manual/adding-packages-meson.txtdocs/manual/adding-packages-meson.txt new file +10
-0@@ -0,0 +1,80 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +=== Integration of Meson-based packages + +[[meson-package-tutorial]] + +==== +meson-package+ tutorial + +http://mesonbuild.com[Meson] is an open source build system meant to be bothdocs/manual/adding-packages-meson.txt line 20
Quoted 10 lines
docs/manual/adding-packages-meson.txt new file +10
-0+extremely fast, and, even more importantly, as user friendly as possible. + +Buildroot does not (yet) provide a dedicated package infrastructure for +meson-based packages. So, we will explain how to write a +.mk+ file for such a +package. Let's start with an example: + +------------------------------ +01: ################################################################################ +02: # +03: # fooWe're not very consistent with the meta-name of the tutorial package. Some infras use libfoo, others use foo, while there is also foobar. Sigh...
foo is nice for me, but I'd settle for anything as long as it is consistent.
Quoted 5 lines
docs/manual/adding-packages-meson.txt new file +5
-0+04: # +05: ################################################################################ +06: +07: FOO_VERSION = 1.0 +08: FOO_SOURCE = foo-$(FOO_VERSION).tar.gzdocs/manual/adding-packages-meson.txt line 35
Quoted 10 lines
docs/manual/adding-packages-meson.txt new file +10
-0+09: FOO_SITE = http://www.foosoftware.org/download +10: FOO_LICENSE = GPLv3+ +11: FOO_LICENSE_FILES = COPYING +12: +13: FOO_DEPENDENCIES = host-meson host-pkgconf bar +14: +15: FOO_MESON_OPTS += \ +16: --prefix=/usr \ +17: --buildtype $(if $(BR2_ENABLE_DEBUG),debug,release) \ +18: --cross-file $(HOST_DIR)/etc/meson/cross-compilation.confQuoted 3 lines
Whether we one day add a meson-package infra or not, I think this variable should be documented as
FOO_CONF_OPTSfor symetry with the other package infras.OK.
Quoted 7 lines
Quoted 5 lines
docs/manual/adding-packages-meson.txt line 38
Quoted 2 lines
docs/manual/adding-packages-meson.txt new file +2
-0+20: define FOO_CONFIGURE_CMDS +21: rm -rf $(@D)/buildWe don't usually remove stuff created in a previous run, unless it breaks the build.
OK.
Though you may want/need to remove the build directory at least for the ?<pkg>-reconfigure? target because Meson will refuse to use an already-configured build directory:
% mkdir build
% meson . build/
...
% meson . build/
Trying to run Meson on a build directory that has already been configured. If you want to build it, just run your build command (e.g. ninja) inside the build directory. Meson will autodetect any changes in your setup and regenerate itself as required. Though it shouldn't be necessary, running ninja reconfigure will force Meson to regenerate the build files.
If you want to change option values, use meson configure instead. %
Quoted 81 lines
Quoted 9 lines
docs/manual/adding-packages-meson.txt line 44
Quoted 6 lines
docs/manual/adding-packages-meson.txt new file +6
-0+22: mkdir -p $(@D)/build +23: $(TARGET_MAKE_ENV) meson.py $(FOO_MESON_OPTS) $(@D) $(@D)/build +24: endef +25: +26: define FOO_BUILD_CMDS +27: $(TARGET_MAKE_ENV) ninja -C $(@D)/buildWould the build accept additional options? I mean, do we need to prepare to pass extra parameteres, like
FOO_MAKE_OPTSdoes for autotools?I'll check this.
Quoted 6 lines
docs/manual/adding-packages-meson.txt line 48
Quoted 4 lines
docs/manual/adding-packages-meson.txt new file +4
-0+28: endef +29: +30: define FOO_INSTALL_TARGET_CMDS +31: $(TARGET_MAKE_ENV) DESTDIR=$(TARGET_DIR) ninja -C $(@D)/build installDitto
FOO_INSTALL_TARGET_OPTSandFOO_INSTALL_STAGING_OPTS?I did not know about these two (I should have read the other pkg-*.mk more carefully). I'll check this.
Quoted 48 lines
docs/manual/adding-packages-meson.txt line 49
Quoted 1 line
docs/manual/adding-packages-meson.txt new file +1
-0+32: endefIf all the meson-based packages are just those three commands (configure, build and install) and never deviates by more than the
_OPTSstuff, then I believe we should add the meson-package infra right away. And it should be reasonably easy.Regards,
Yann E. MORIN.Quoted 38 lines
docs/manual/adding-packages-meson.txt new file +30
-0+34: $(eval $(generic-package)) +-------------------------------- + +The Makefile starts with the definition of the standard variables for package +declaration (lines 7 to 11). + +As seen in line 34, it is based on the +xref:generic-package-tutorial[+generic-package+ infrastructure]. So, it defines +the variables required by this particular infrastructure, where Meson and its +companion tool, Ninja, are invoked: + +* +FOO_CONFIGURE_CMDS+: the build directory required by Meson is created, and + Meson is invoked to generate the Ninja build file. The options required to + configure the cross-compilation of the package are passed via + +FOO_MESON_OPTS+. + +* +FOO_BUILD_CMDS+: Ninja is invoked to perform the build. + +* +FOO_INSTALL_TARGET_CMDS+: Ninja is invoked to install the files generated + during the build step. + +In order to have Meson available for the build, +FOO_DEPENDENCIES+ needs to +contain +host-meson+. In the example, +host-pkgconf+ and +bar+ are also +declared as dependencies because the Meson build file of +foo+ uses `pkg-config` +to determine the compilation flags and libraries of package +bar+. + +To sum it up, to add a new meson-based package, the Makefile example can be +copied verbatim then edited to replace all occurences of +FOO+ with the +uppercase name of the new package and update the values of the standard +variables.docs/manual/adding-packages.txt +0
-0@@ -34,6 +34,8 @@ include::adding-packages-rebar.txt[] include::adding-packages-waf.txt[]Quoted 8 lines
Quoted 8 lines
docs/manual/adding-packages.txt +2
-1+include::adding-packages-meson.txt[] + include::adding-packages-kernel-module.txt[] include::adding-packages-asciidoc.txt[] --2.13.3
Regards,
Quoted 7 lines
--
ELB
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20171008/fa0814a3/attachment.asc>
PATCH v3 2/3 docs/manual: document meson-based packages
Adrian, All,
On 2017-10-08 18:48 +0200, Adrian Perez de Castro spake thusly:
Quoted 4 lines · Eric Le Bihan
Quoted 3 lines · Yann E. MORIN
Quoted 2 lines
On 2017-07-27 11:55 +0200, J?rg Krause spake thusly:
Quoted 1 line
From: Eric Le Bihan <[email protected]>
[--SNIP--]
Quoted 8 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
+20: define
FOO_CONFIGURE_CMDS
+21: rm -rf $(@D)/buildWe don't usually remove stuff created in a previous run, unless it breaks the build.
OK.
Though you may want/need to remove the build directory at least for the ?<pkg>-reconfigure? target because Meson will refuse to use an already-configured build directory:
[--SNIP--]
This is a good reason to forcibly remove it, indeed.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 3/3 libmpdclient: bump to version 2.13
In reply to Jörg Krause---
v2:
* none
--- package/libmpdclient/libmpdclient.hash | 4 ++-- package/libmpdclient/libmpdclient.mk | 26 +++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-)
package/libmpdclient/libmpdclient.hash +2 -2
@@ -1,2 +1,2 @@ -# Verified against http://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.10.tar.xz.sig, sha256 locally computed -sha256 4f08cde82dae70895f8e4532a6e9b54b201efd5591c6b5d6834895807ed2ff82 libmpdclient-2.10.tar.xz +# Verified against http://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.13.tar.xz.sig, sha256 locally computed +sha256 5115bd52bc20a707c1ecc7587e6389c17305348e2132a66cf767c62fc55ed45d libmpdclient-2.13.tar.xz
package/libmpdclient/libmpdclient.mk +23 -3
@@ -5,12 +5,32 @@ ################################################################################ LIBMPDCLIENT_VERSION_MAJOR = 2 -LIBMPDCLIENT_VERSION = $(LIBMPDCLIENT_VERSION_MAJOR).10 +LIBMPDCLIENT_VERSION = $(LIBMPDCLIENT_VERSION_MAJOR).13 LIBMPDCLIENT_SOURCE = libmpdclient-$(LIBMPDCLIENT_VERSION).tar.xz LIBMPDCLIENT_SITE = http://www.musicpd.org/download/libmpdclient/$(LIBMPDCLIENT_VERSION_MAJOR) -LIBMPDCLIENT_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' LIBMPDCLIENT_INSTALL_STAGING = YES LIBMPDCLIENT_LICENSE = BSD-3-Clause LIBMPDCLIENT_LICENSE_FILES = COPYING -$(eval $(autotools-package)) +LIBMPDCLIENT_DEPENDENCIES = host-meson host-pkgconf + +LIBMPDCLIENT_MESON_OPTS += \ + --prefix=/usr \ + --buildtype $(if $(BR2_ENABLE_DEBUG),debug,release) \ + --cross-file $(HOST_DIR)/etc/meson/cross-compilation.conf + +define LIBMPDCLIENT_CONFIGURE_CMDS + rm -rf $(@D)/build + mkdir -p $(@D)/build + $(TARGET_MAKE_ENV) meson $(LIBMPDCLIENT_MESON_OPTS) $(@D) $(@D)/build +endef + +define LIBMPDCLIENT_BUILD_CMDS + $(TARGET_MAKE_ENV) ninja -C $(@D)/build +endef + +define LIBMPDCLIENT_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) DESTDIR=$(TARGET_DIR) ninja -C $(@D)/build install +endef + +$(eval $(generic-package))
Signature · 1 line
2.13.3
PATCH v2 3/3 libmpdclient: bump to version 2.13
Hello J?rg, Eric,
Quoted 41 lines · J?rg Krause
Signed-off-by J?rg Krause <[email protected]>---
v2:
* none--- package/libmpdclient/libmpdclient.hash | 4 ++-- package/libmpdclient/libmpdclient.mk | 26 +++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-)package/libmpdclient/libmpdclient.hash +2
-2@@ -1,2 +1,2 @@ -# Verified against http://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.10.tar.xz.sig, sha256 locally computed -sha256 4f08cde82dae70895f8e4532a6e9b54b201efd5591c6b5d6834895807ed2ff82 libmpdclient-2.10.tar.xz +# Verified against http://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.13.tar.xz.sig, sha256 locally computed +sha256 5115bd52bc20a707c1ecc7587e6389c17305348e2132a66cf767c62fc55ed45d libmpdclient-2.13.tar.xzpackage/libmpdclient/libmpdclient.mk +6
-3@@ -5,12 +5,32 @@ ################################################################################ LIBMPDCLIENT_VERSION_MAJOR = 2 -LIBMPDCLIENT_VERSION = $(LIBMPDCLIENT_VERSION_MAJOR).10 +LIBMPDCLIENT_VERSION = $(LIBMPDCLIENT_VERSION_MAJOR).13 LIBMPDCLIENT_SOURCE = libmpdclient-$(LIBMPDCLIENT_VERSION).tar.xz LIBMPDCLIENT_SITE = http://www.musicpd.org/download/libmpdclient/$(LIBMPDCLIENT_VERSION_MAJOR) -LIBMPDCLIENT_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' LIBMPDCLIENT_INSTALL_STAGING = YES LIBMPDCLIENT_LICENSE = BSD-3-Clause LIBMPDCLIENT_LICENSE_FILES = COPYING -$(eval $(autotools-package)) +LIBMPDCLIENT_DEPENDENCIES = host-meson host-pkgconf + +LIBMPDCLIENT_MESON_OPTS += \ + --prefix=/usr \ + --buildtype $(if $(BR2_ENABLE_DEBUG),debug,release) \
package/libmpdclient/libmpdclient.mk line 29
Quoted 10 lines
package/libmpdclient/libmpdclient.mk +10
-0+ --cross-file $(HOST_DIR)/etc/meson/cross-compilation.conf + +define LIBMPDCLIENT_CONFIGURE_CMDS + rm -rf $(@D)/build + mkdir -p $(@D)/build + $(TARGET_MAKE_ENV) meson $(LIBMPDCLIENT_MESON_OPTS) $(@D) $(@D)/build +endef + +define LIBMPDCLIENT_BUILD_CMDS + $(TARGET_MAKE_ENV) ninja -C $(@D)/build
Better change to
$(TARGET_MAKE_ENV) ninja $(if $(VERBOSE),-v) -C $(@D)/build
to honour the buildroot 'make V=1' verbose mode...
Regards,
Peter
Quoted 7 lines
package/libmpdclient/libmpdclient.mk +7
-0+endef + +define LIBMPDCLIENT_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) DESTDIR=$(TARGET_DIR) ninja -C $(@D)/build install +endef + +$(eval $(generic-package))