diff mbox series

[1/2] dev-manual: new-recipe.rst: add Meson example recipe

Message ID 20230223153729.2492175-1-michael.opdenacker@bootlin.com
State New
Headers show
Series [1/2] dev-manual: new-recipe.rst: add Meson example recipe | expand

Commit Message

Michael Opdenacker Feb. 23, 2023, 3:37 p.m. UTC
From: Michael Opdenacker <michael.opdenacker@bootlin.com>

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
 documentation/dev-manual/new-recipe.rst | 31 +++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

Comments

Quentin Schulz Feb. 24, 2023, 10:17 a.m. UTC | #1
Hi Michael,

On 2/23/23 16:37, Michael Opdenacker via lists.yoctoproject.org wrote:
> From: Michael Opdenacker <michael.opdenacker@bootlin.com>
> 
> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
> ---
>   documentation/dev-manual/new-recipe.rst | 31 +++++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
> 
> diff --git a/documentation/dev-manual/new-recipe.rst b/documentation/dev-manual/new-recipe.rst
> index 143c8b9c3b..9f00ac198f 100644
> --- a/documentation/dev-manual/new-recipe.rst
> +++ b/documentation/dev-manual/new-recipe.rst
> @@ -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"
> +
> +   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//

> +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,
Reviewed-by: Quentin Schulz <foss+yocto@0leil.net>

Cheers,
Quentin
Michael Opdenacker Feb. 24, 2023, 3:40 p.m. UTC | #2
Hi Quentin

Thanks for this new review!

On 24.02.23 at 11:17, Quentin Schulz via lists.yoctoproject.org wrote:
> Hi Michael,
>
> On 2/23/23 16:37, Michael Opdenacker via lists.yoctoproject.org wrote:
>> From: Michael Opdenacker <michael.opdenacker@bootlin.com>
>>
>> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
>> ---
>>   documentation/dev-manual/new-recipe.rst | 31 +++++++++++++++++++++++++
>>   1 file changed, 31 insertions(+)
>>
>> diff --git a/documentation/dev-manual/new-recipe.rst 
>> b/documentation/dev-manual/new-recipe.rst
>> index 143c8b9c3b..9f00ac198f 100644
>> --- a/documentation/dev-manual/new-recipe.rst
>> +++ b/documentation/dev-manual/new-recipe.rst
>> @@ -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"
>> +
>> +   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//


Oops, good catch. Fixed.

>
>> +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.
diff mbox series

Patch

diff --git a/documentation/dev-manual/new-recipe.rst b/documentation/dev-manual/new-recipe.rst
index 143c8b9c3b..9f00ac198f 100644
--- a/documentation/dev-manual/new-recipe.rst
+++ b/documentation/dev-manual/new-recipe.rst
@@ -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
 -----------------------------------------------