meta-skeleton: add recipe examples from documentation sources

This adds three examples previously located in the yocto-docs
repository (under documentation/ref-manual/examples).

The examples were not used for building the documentation
so it's better to keep them here where they can automatically be
tested.

Fixed the "hello-single" to add a version number to the .bb file.
After this, all examples build fine with the "master" branch of Poky.

Note that the "mtd-utils" example, and example of a recipe
for an Autotools page, was not copied over. It doesn't build any
more, and anyway, we already have an official recipe for a recent version
of "mtd-utils" in OE-core.

(From OE-Core rev: a186c746e431831ccbd459be2175cdaa7ed42a54)

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Opdenacker 2021-07-29 15:34:51 +02:00 committed by Richard Purdie
parent 697d460090
commit 3778e45af9
4 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,9 @@
DESCRIPTION = "GNU Helloworld application"
SECTION = "examples"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"
SRC_URI[sha256sum] = "31e066137a962676e89f69d1b65382de95a7ef7d914b8cb956f41ea72e0f516b"
inherit autotools-brokensep gettext

View File

@ -0,0 +1,8 @@
#include <stdio.h>
int main(void)
{
printf("Hello world!\n");
return 0;
}

View File

@ -0,0 +1,17 @@
DESCRIPTION = "Simple helloworld application"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://helloworld.c"
S = "${WORKDIR}"
do_compile() {
${CC} ${LDFLAGS} helloworld.c -o helloworld
}
do_install() {
install -d ${D}${bindir}
install -m 0755 helloworld ${D}${bindir}
}

View File

@ -0,0 +1,14 @@
require recipes-graphics/xorg-lib/xorg-lib-common.inc
DESCRIPTION = "X11 Pixmap library"
LICENSE = "X-BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=3e07763d16963c3af12db271a31abaa5"
DEPENDS += "libxext"
PR = "r2"
PE = "1"
XORG_PN = "libXpm"
PACKAGES =+ "sxpm cxpm"
FILES:cxpm = "${bindir}/cxpm"
FILES:sxpm = "${bindir}/sxpm"