dev-manual: new-recipe.rst: add Meson example recipe
PATCH 1/2 dev-manual: new-recipe.rst: add Meson example recipe
From: Michael Opdenacker <[email protected]>
--- documentation/dev-manual/new-recipe.rst | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
documentation/dev-manual/new-recipe.rst +31 -0
@@ -1173,6 +1173,8 @@ recipe examples given various scenarios: - Building an Autotooled package +- Building a Meson package + - Splitting an application into multiple packages - Adding binaries to an image
@@ -1288,6 +1290,35 @@ as described in the ":ref:`dev-manual/licenses:tracking license changes`" section in the Yocto Project Overview and Concepts Manual. You can quickly create Autotool-based recipes in a manner similar to the previous example. +Building a Meson Package +------------------------ + +Applications built with the `Meson build system <https://mesonbuild.com/>`__ +just need a recipe that has sources described in :term:`SRC_URI` and inherits +the :ref:`ref-classes-meson` class. + +The :oe_git:`ipcalc recipe </meta-openembedded/tree/meta-networking/recipes-support/ipcalc>` +is a simple example of an application without dependencies:: + + SUMMARY = "Tool to assist in network address calculations for IPv4 and IPv6." + HOMEPAGE = "https://gitlab.com/ipcalc/ipcalc" + + SECTION = "net" + + LICENSE = "GPL-2.0-only" + LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + + SRC_URI = "git://gitlab.com/ipcalc/ipcalc.git;protocol=https;branch=master" + SRCREV = "4c4261a47f355946ee74013d4f5d0494487cc2d6" + + S = "${WORKDIR}/git" + + inherit meson + +Applications with dependencies are likely to inherit the +:ref:`ref-classes-pkgconfig` class, as ``pkg-config`` it is the default method +that Meson uses to find dependencies and compile applications against them. + Splitting an Application into Multiple Packages -----------------------------------------------
Signature · 1 line
2.37.2
PATCH 2/2 dev-manual: new-recipe.rst: add references to subsections in Examples section
From: Michael Opdenacker <[email protected]>
Making it possible to jump right away to the desired example
Rename a section title to make it more suitable for a link title.
Using short references (Section Name_) instead of :ref:dev-manual/new-recipe:Section Name) as we are in the same document.
--- documentation/dev-manual/new-recipe.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
documentation/dev-manual/new-recipe.rst +9 -9
@@ -361,7 +361,7 @@ and searches specific directories in a certain order: ``files``. The directories are assumed to be subdirectories of the directory in which the recipe or append file resides. For another example that specifies these types of files, see the -":ref:`dev-manual/new-recipe:building a single .c file package (hello world!)`" section. +"`building a single .c file package`_" section. The previous example also specifies a patch file. Patch files are files whose names usually end in ``.patch`` or ``.diff`` but can end with
@@ -1167,20 +1167,20 @@ Examples To help summarize how to write a recipe, this section provides some recipe examples given various scenarios: -- Building packages from a single local file +- `Building a single .c file package`_ -- Building a Makefile-based package +- `Building a Makefile-based package`_ -- Building an Autotooled package +- `Building an Autotooled package`_ -- Building a Meson package +- `Building a Meson package`_ -- Splitting an application into multiple packages +- `Splitting an application into multiple packages`_ -- Adding binaries to an image +- `Packaging externally produced binaries`_ -Building a Single .c File Package (Hello World!) ------------------------------------------------- +Building a Single .c File Package +--------------------------------- Building an application from a single file that is stored locally (e.g. under ``files``) requires a recipe that has the file listed in the :term:`SRC_URI`
Signature · 1 line
2.37.2
Hi Michael,
Quoted 41 lines · Michael Opdenacker via lists.yoctoproject.org
From: Michael Opdenacker <[email protected]>
Signed-off-by Michael Opdenacker <[email protected]>--- documentation/dev-manual/new-recipe.rst | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+)documentation/dev-manual/new-recipe.rst +19
-0@@ -1173,6 +1173,8 @@ recipe examples given various scenarios: - Building an Autotooled package +- Building a Meson package + - Splitting an application into multiple packages - Adding binaries to an image@@ -1288,6 +1290,35 @@ as described in the ":ref:`dev-manual/licenses:tracking license changes`" section in the Yocto Project Overview and Concepts Manual. You can quickly create Autotool-based recipes in a manner similar to the previous example. +Building a Meson Package +------------------------ + +Applications built with the `Meson build system <https://urldefense.com/v3/__https://mesonbuild.com/__;!!OOPJP91ZZw!hLxKIQgq28T7YW2MJN7MXVRoRC3TFLq8G2weHzeanzmiYu9JQS0ZsNUDJUCUDpFE9WGcl43l7VZrhhYZGJEczHo866O_aElqIP4L9UTg9UqYB2ZrNqD_$ >`__ +just need a recipe that has sources described in :term:`SRC_URI` and inherits +the :ref:`ref-classes-meson` class. + +The :oe_git:`ipcalc recipe </meta-openembedded/tree/meta-networking/recipes-support/ipcalc>` +is a simple example of an application without dependencies:: + + SUMMARY = "Tool to assist in network address calculations for IPv4 and IPv6." + HOMEPAGE = "https://urldefense.com/v3/__https://gitlab.com/ipcalc/ipcalc__;!!OOPJP91ZZw!hLxKIQgq28T7YW2MJN7MXVRoRC3TFLq8G2weHzeanzmiYu9JQS0ZsNUDJUCUDpFE9WGcl43l7VZrhhYZGJEczHo866O_aElqIP4L9UTg9UqYB5zP6znR$ " + + SECTION = "net" + + LICENSE = "GPL-2.0-only" + LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
documentation/dev-manual/new-recipe.rst as described in the ":ref:`dev-manual/licenses:tracking license changes`" · line 1319
Quoted 10 lines
documentation/dev-manual/new-recipe.rst +10
-0+ + SRC_URI = "git://gitlab.com/ipcalc/ipcalc.git;protocol=https;branch=master" + SRCREV = "4c4261a47f355946ee74013d4f5d0494487cc2d6" + + S = "${WORKDIR}/git" + + inherit meson + +Applications with dependencies are likely to inherit the +:ref:`ref-classes-pkgconfig` class, as ``pkg-config`` it is the default method
s/it//
documentation/dev-manual/new-recipe.rst as described in the ":ref:`dev-manual/licenses:tracking license changes`" · line 1321
Quoted 2 lines
documentation/dev-manual/new-recipe.rst +2
-0+that Meson uses to find dependencies and compile applications against them. +
I would suggest:
s/that Meson uses to find/used by Meson to find/
but that's a matter of personal taste.
Otherwise,
Cheers,
Quentin
Hi Quentin
Thanks for this new review!
Quoted 54 lines · Quentin Schulz via lists.yoctoproject.org
Hi Michael,
Quoted 51 lines · Michael Opdenacker via lists.yoctoproject.org
From: Michael Opdenacker <[email protected]>
Signed-off-by Michael Opdenacker <[email protected]>---
documentation/dev-manual/new-recipe.rst| 31 +++++++++++++++++++++++++1 file changed, 31 insertions(+)documentation/dev-manual/new-recipe.rst +0
-0@@ -1173,6 +1173,8 @@ recipe examples given various scenarios:- Building an Autotooled package
+- Building a Meson package
+
- Splitting an application into multiple packages - Adding binaries to an imagedocumentation/dev-manual/new-recipe.rst +0
-0@@ -1288,6 +1290,35 @@ as described in the":ref:
dev-manual/licenses:tracking license changes"
section in the Yocto Project Overview and Concepts Manual. You can quickly create Autotool-based recipes in a manner similar to the previous example. +Building a Meson Package
+------------------------documentation/dev-manual/new-recipe.rst +2
-0+ +Applications built with the `Meson build systemQuoted 1 line
`__
+just need a recipe that has sources described in :term:
SRC_URIand inheritsdocumentation/dev-manual/new-recipe.rst +3
-0+the :ref:`ref-classes-meson` class. + +The :oe_git:`ipcalc recipe</meta-openembedded/tree/meta-networking/recipes-support/ipcalc>`
documentation/dev-manual/new-recipe.rst +3
-0+is a simple example of an application without dependencies:: + + SUMMARY = "Tool to assist in network address calculations forIPv4 and IPv6."
+ HOMEPAGE ="https://urldefense.com/v3/__https://gitlab.com/ipcalc/ipcalc__;!!OOPJP91ZZw!hLxKIQgq28T7YW2MJN7MXVRoRC3TFLq8G2weHzeanzmiYu9JQS0ZsNUDJUCUDpFE9WGcl43l7VZrhhYZGJEczHo866O_aElqIP4L9UTg9UqYB5zP6znR$ "documentation/dev-manual/new-recipe.rst +5
-0+ + SECTION = "net" + + LICENSE = "GPL-2.0-only" + LIC_FILES_CHKSUM ="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI= "git://gitlab.com/ipcalc/ipcalc.git;protocol=https;branch=master" + SRCREV = "4c4261a47f355946ee74013d4f5d0494487cc2d6" +
+ S = "${WORKDIR}/git"
Quoted 8 lines
Quoted 6 lines
documentation/dev-manual/new-recipe.rst +5
-0+ + inherit meson + +Applications with dependencies are likely to inherit the +:ref:`ref-classes-pkgconfig` class, as ``pkg-config`` it is thedefault method
s/it//
Oops, good catch. Fixed.
Quoted 8 lines
Quoted 4 lines
+that Meson uses to find dependencies and compile applications against them.
+I would suggest:
s/that Meson uses to find/used by Meson to find/
but that's a matter of personal taste.
This suits my personal taste too ;-)
Accepted.
Thanks again
Michael.
Signature · 3 lines
Michael Opdenacker, Bootlin Embedded Linux and Kernel engineering https://bootlin.com