| Message ID | 20251217161114.403899-1-renaud.barrau@madic.com |
|---|---|
| State | New |
| Headers | show |
| Series | [meta-oe,1/2] libtoml: add new recipe | expand |
On 12/17/25 17:11, Renaud Barrau via lists.openembedded.org wrote: > From: Renaud Barrau <rbarrau33@gmail.com> > > Create a recipe for the tomlc99 project https://github.com/cktan/tomlc99 > > Signed-off-by: Renaud Barrau <rbarrau33@gmail.com> > --- > .../recipes-support/libtoml/libtoml_git.bb | 41 +++++++++++++++++++ > 1 file changed, 41 insertions(+) > create mode 100644 meta-oe/recipes-support/libtoml/libtoml_git.bb > > diff --git a/meta-oe/recipes-support/libtoml/libtoml_git.bb b/meta-oe/recipes-support/libtoml/libtoml_git.bb > new file mode 100644 > index 0000000000..befd413d3c > --- /dev/null > +++ b/meta-oe/recipes-support/libtoml/libtoml_git.bb > @@ -0,0 +1,41 @@ > +SUMMARY = "TOML parser in C" > +HOMEPAGE = "https://github.com/cktan/tomlc99" > +LICENSE = "MIT" > +LIC_FILES_CHKSUM = "file://LICENSE;md5=95bbe2f9180443b5dcef3fb959804a65" > + > +SRC_URI = "git://github.com/cktan/tomlc99;protocol=https;branch=master" It looks that this project isn't developed anymore (based on its readme), and has been superseded by tomlc17 from the same developer. Wouldn't it be better to use that? (This is a question from me - the project claims to be compatible with this library, but don't know if it's really true) > + > +SRCREV = "26b9c1ea770dab2378e5041b695d24ccebe58a7a" > + > +S = "${WORKDIR}/git" Specifying S using WORKDIR is a fatal error in Whinlatter and master branch - when using the git fetcher, S doesn't need to be specified anymore 99% of the cases, the default should work. > + > +inherit pkgconfig > + > +do_compile() { > + oe_runmake CC="${CC}" > +} > + > +do_install() { > + install -d ${D}${includedir} > + install -m 0644 toml.h ${D}${includedir}/ > + > + install -d ${D}${libdir} > + install -m 0644 libtoml.a ${D}${libdir}/ > +} > + > +do_install:append() { > + install -d ${D}${libdir}/pkgconfig > + > + cat << EOF > ${D}${libdir}/pkgconfig/libtoml.pc > +prefix=${prefix} > +exec_prefix=${exec_prefix} > +includedir=${includedir} > +libdir=${libdir} > + > +Name: libtoml > +Description: TOML parser in C (tomlc99) > +Version: 1.0 > +Libs: -L\${libdir} -ltoml > +Cflags: -I\${includedir} > +EOF > +} > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#122725): https://lists.openembedded.org/g/openembedded-devel/message/122725 > Mute This Topic: https://lists.openembedded.org/mt/116829679/6084445 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [skandigraun@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta-oe/recipes-support/libtoml/libtoml_git.bb b/meta-oe/recipes-support/libtoml/libtoml_git.bb new file mode 100644 index 0000000000..befd413d3c --- /dev/null +++ b/meta-oe/recipes-support/libtoml/libtoml_git.bb @@ -0,0 +1,41 @@ +SUMMARY = "TOML parser in C" +HOMEPAGE = "https://github.com/cktan/tomlc99" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=95bbe2f9180443b5dcef3fb959804a65" + +SRC_URI = "git://github.com/cktan/tomlc99;protocol=https;branch=master" + +SRCREV = "26b9c1ea770dab2378e5041b695d24ccebe58a7a" + +S = "${WORKDIR}/git" + +inherit pkgconfig + +do_compile() { + oe_runmake CC="${CC}" +} + +do_install() { + install -d ${D}${includedir} + install -m 0644 toml.h ${D}${includedir}/ + + install -d ${D}${libdir} + install -m 0644 libtoml.a ${D}${libdir}/ +} + +do_install:append() { + install -d ${D}${libdir}/pkgconfig + + cat << EOF > ${D}${libdir}/pkgconfig/libtoml.pc +prefix=${prefix} +exec_prefix=${exec_prefix} +includedir=${includedir} +libdir=${libdir} + +Name: libtoml +Description: TOML parser in C (tomlc99) +Version: 1.0 +Libs: -L\${libdir} -ltoml +Cflags: -I\${includedir} +EOF +}