Skip to content
Snippets Groups Projects
Commit 888b937c authored by Robert Drab's avatar Robert Drab
Browse files

Initial meta-thirdparty


Adding recipes for third party ohosinit dependencies:
- cjson library - built directly from github, not from gitee
- libsec - library implementing secure versions of some standard functions

Recipe naming resembles original OHOS repository names
with the exception when the repository contains only
single library source code - in such case recipe name is the
same as the library name it provides

Signed-off-by: default avatarRobert Drab <robert.drab@huawei.com>
parent d12a14ff
No related branches found
No related tags found
No related merge requests found
# meta-thirdparty
meta-ohos-thirdparty
====================
This README file contains information on the contents of the meta-ohos-thirdparty layer.
Please see the corresponding sections below for details.
Dependencies
============
This layer depends on:
URI: git://git.yoctoproject.org/poky.git
branch: master
Table of Contents
=================
I. Adding the meta-thirdparty layer to your build
II. Misc
I. Adding the meta-thirdparty layer to your build
=================================================
Run 'bitbake-layers add-layer meta-ohos/meta-ohos-thirdparty'
II. Misc
========
This layer provides recipes for various third-party libraries
used by OHOS.
## Layer layout:
- recipes-libs
- cjson - Ultralightweight JSON parser in ANSI C
- libsec - library implementing Annex K of C11, Bounds-checking interfaces
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "ohos-thirdparty"
BBFILE_PATTERN_ohos-thirdparty = "^${LAYERDIR}/"
BBFILE_PRIORITY_ohos-thirdparty = "6"
LAYERDEPENDS_ohos-thirdparty = "core"
LAYERSERIES_COMPAT_ohos-thirdparty = "gatesgarth"
SUMMARY = "Ultralightweight JSON parser library in ANSI C"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0 \
file://tests/unity/docs/license.txt;md5=b7dd0dffc9dda6a87fa96e6ba7f9ce6c"
SRC_URI = "https://github.com/DaveGamble/cJSON/archive/v${PV}.tar.gz"
SRC_URI[md5sum] = "ff0557033e8374033107d40ca79bd52d"
SRC_URI[sha1sum] = "b401e57edbc9377f0b4139206297984e073c4e47"
SRC_URI[sha256sum] = "fb50a663eefdc76bafa80c82bc045af13b1363e8f45cec8b442007aef6a41343"
SRC_URI[sha384sum] = "52d3d168bf6ee941e8c7fc0d8f53f81d43fb66b91e2518b7e9f0daf71ae2edf6ca721087d6ec7c781a9732e5db09f45d"
SRC_URI[sha512sum] = "8de1dedc123ed025a9cbe6764e5963eb0550f726d06a8f6bedfe05b84e852cd9c1587cd381669663073967f42be894a535ba239013f304ce544c3b15a6477c01"
S = "${WORKDIR}/cJSON-${PV}"
inherit cmake
SUMMARY = "OHOS third-party libraries"
LICENSE = "MulanPSL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=bf1e53b0cdc806a88b7a66486dc5e61f"
PV = "1.0+git${SRCPV}"
PVSHORT = '${@d.getVar("PV", False).split("+")[0]}'
PVMAJOR = '${@d.getVar("PV", False).split(".")[0]}'
SRCREV = "8355937ae5ae9bf01af491b39ff42f68246959c4"
SRC_URI = "git://gitee.com/openharmony/third_party_bounds_checking_function.git;protocol=https"
S = "${WORKDIR}/git"
CFLAGS += "-I${S}/include -fPIC -shared"
LDFLAGS += "-Wl,-soname,${PN}.so.${PVMAJOR}"
do_compile () {
${CC} ${CFLAGS} ${LDFLAGS} ${S}/src/*.c -o ${B}/${PN}.so.${PVSHORT}
}
do_install () {
install -d ${D}${includedir}
install -d ${D}${libdir}
install -m 0755 ${S}/include/*.h ${D}${includedir}/
oe_soinstall ${B}/${PN}.so.${PVSHORT} ${D}${libdir}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment