[oe-commits] [meta-openembedded] 01/13: catch2: new package

git at git.openembedded.org git at git.openembedded.org
Wed Oct 17 16:20:13 UTC 2018


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit 1d7ae7438aecb21f694a9e5a6c38f7833130882f
Author: Bartosz Golaszewski <bgolaszewski at baylibre.com>
AuthorDate: Tue Oct 16 16:25:19 2018 +0200

    catch2: new package
    
    Add a recipe for the catch2 testing framework. There's a bug upstream
    which makes it impossible to build with gcc7 so include a patch.
    
    Signed-off-by: Bartosz Golaszewski <bgolaszewski at baylibre.com>
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../0001-Fix-convert-from-char-on-ARM-build.patch  | 46 ++++++++++++++++++++++
 meta-oe/recipes-test/catch2/catch2_2.4.1.bb        | 24 +++++++++++
 2 files changed, 70 insertions(+)

diff --git a/meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch b/meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch
new file mode 100644
index 0000000..3073775
--- /dev/null
+++ b/meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch
@@ -0,0 +1,46 @@
+From 5729874fa5059c39aa97cfa08fddf107b7a65c9e Mon Sep 17 00:00:00 2001
+From: Miguel Gaio <mgaio35 at gmail.com>
+Date: Wed, 3 Oct 2018 10:22:16 +0200
+Subject: [PATCH] Fix convert from char on ARM build
+
+Some platforms set the signedness of char to unsigned (eg. ARM).
+Convert from char should not assume the signedness of char.
+
+Fix build issue with -Werror,-Wtautological-unsigned-zero-compare flags.
+
+Signed-off-by: Miguel Gaio <mgaio35 at gmail.com>
+
+Upstream-Status: Accepted [Commit f1faaa9c107113692301ad8bb56084460ef1a2ff]
+
+Signed-off-by: Bartosz Golaszewski <bgolaszewski at baylibre.com>
+---
+ include/internal/catch_tostring.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/include/internal/catch_tostring.cpp b/include/internal/catch_tostring.cpp
+index 4e0c027d..8cbabbf2 100644
+--- a/include/internal/catch_tostring.cpp
++++ b/include/internal/catch_tostring.cpp
+@@ -205,7 +205,7 @@ std::string StringMaker<bool>::convert(bool b) {
+     return b ? "true" : "false";
+ }
+ 
+-std::string StringMaker<char>::convert(char value) {
++std::string StringMaker<signed char>::convert(signed char value) {
+     if (value == '\r') {
+         return "'\\r'";
+     } else if (value == '\f') {
+@@ -222,8 +222,8 @@ std::string StringMaker<char>::convert(char value) {
+         return chstr;
+     }
+ }
+-std::string StringMaker<signed char>::convert(signed char c) {
+-    return ::Catch::Detail::stringify(static_cast<char>(c));
++std::string StringMaker<char>::convert(char c) {
++    return ::Catch::Detail::stringify(static_cast<signed char>(c));
+ }
+ std::string StringMaker<unsigned char>::convert(unsigned char c) {
+     return ::Catch::Detail::stringify(static_cast<char>(c));
+-- 
+2.19.1
+
diff --git a/meta-oe/recipes-test/catch2/catch2_2.4.1.bb b/meta-oe/recipes-test/catch2/catch2_2.4.1.bb
new file mode 100644
index 0000000..0183c2e
--- /dev/null
+++ b/meta-oe/recipes-test/catch2/catch2_2.4.1.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "A modern, C++-native, header-only, test framework for unit-tests, \
+TDD and BDD - using C++11, C++14, C++17 and later."
+AUTHOR = "Phil Nash, Martin Horenovsky and others"
+HOMEPAGE = "https://github.com/catchorg/Catch2"
+LICENSE = "BSL-1.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
+
+SRC_URI = "git://github.com/catchorg/Catch2.git \
+           file://0001-Fix-convert-from-char-on-ARM-build.patch"
+SRCREV = "9e1bdca4667295fcb16265eae00efa8423f07007"
+
+S = "${WORKDIR}/git"
+
+inherit cmake python3native
+
+# Header-only library
+RDEPENDS_${PN}-dev = ""
+RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
+
+do_install_append() {
+    rm ${D}/${datadir}/Catch2/lldbinit
+    rm ${D}/${datadir}/Catch2/gdbinit
+    rmdir ${D}/${datadir}/Catch2/
+}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list