Skip to contentSkip to conversation

uthash: update to v2.0.2

PATCH In review André Draszik 2 participants 5 messages Jan 12, 2018 – Jan 17, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 uthash: update to v2.0.2

From: André Draszik <[email protected]>

- the license has changed to BSD-1-Clause
- the main package is empty (as this only provides header files), so the -dev package must not depend on the main package

---
 meta-oe/recipes-support/uthash/uthash_1.9.7.bb | 16 --------------
 meta-oe/recipes-support/uthash/uthash_2.0.2.bb | 30 ++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 16 deletions(-)
 delete mode 100644 meta-oe/recipes-support/uthash/uthash_1.9.7.bb
 create mode 100644 meta-oe/recipes-support/uthash/uthash_2.0.2.bb
meta-oe/recipes-support/uthash/uthash_1.9.7.bb deleted +0 -16
deleted file mode 100644
index 82a9f2a6a..000000000
@@ -1,16 +0,0 @@
-SUMMARY = "Hash table for C structures"
-SECTION = "base"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=564f9c44927f6247dc810bf557e2b240"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2"
-
-SRC_URI[md5sum] = "1f14bbee7ee73ed0ceb3549f8cf378b4"
-SRC_URI[sha256sum] = "956f5c99798349c413275fe4c9ff128d72e280655dadbe4365f8e9fbda91393f"
-
-do_install () {
-    install -dm755 ${D}${includedir}
-    install -m 0644 ${S}/src/*.h ${D}${includedir}
-}
-
-BBCLASSEXTEND = "native"
meta-oe/recipes-support/uthash/uthash_2.0.2.bb new file +30 -0
new file mode 100644
index 000000000..8a6887ef0
@@ -0,0 +1,30 @@
+SUMMARY = "Hash table and linked list for C structures"
+DESCRIPTION = " uthash-dev provides a hash table implementation using C preprocessor macros.\n\
+ This package also includes:\n\
+  * utlist.h provides linked list macros for C structures\n\
+  * utarray.h implements dynamic arrays using macros\n\
+  * utstring.h implements a basic dynamic string\n\
+"
+HOMEPAGE = "https://troydhanson.github.io/uthash/"
+SECTION = "base"
+LICENSE = "BSD-1-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5cc1f1e4c71f19f580458586756c02b4"
+
+SRC_URI = "https://github.com/troydhanson/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz"
+UPSTREAM_CHECK_URI = "https://github.com/troydhanson/${BPN}/releases"
+
+SRC_URI[md5sum] = "d08632a58674274c9cd87e2930f5696a"
+SRC_URI[sha256sum] = "34a31d51dd7a839819cecd6f46049b4ffe031d7f3147d9a042f5504fdb1348d1"
+
+do_compile[noexec] = "1"
+
+do_install () {
+    install -dm755 ${D}${includedir}
+    install -m0644 src/*.h ${D}${includedir}
+}
+
+# The main package is empty and non-existent, so -dev
+# should not depend on it...
+RDEPENDS_${PN}-dev = ""
+
+BBCLASSEXTEND = "native"
Signature · 1 line
2.15.1
#1 lore raw

PATCH 2/2 uthash: add ptest support

From: André Draszik <[email protected]>

---
 meta-oe/recipes-support/uthash/uthash/run-ptest | 10 ++++++++++
 meta-oe/recipes-support/uthash/uthash_2.0.2.bb  | 18 +++++++++++++++++-
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100755 meta-oe/recipes-support/uthash/uthash/run-ptest
meta-oe/recipes-support/uthash/uthash/run-ptest new file +10 -0
new file mode 100755
index 000000000..14071a649
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+cd tests
+for i in test*[0-9] ; do
+    if ./${i} | cmp -s "${i}.ans" - ; then
+        echo "PASS: ${i}"
+    else
+        echo "FAIL: ${i}"
+    fi
+done
meta-oe/recipes-support/uthash/uthash_2.0.2.bb +17 -1
index 8a6887ef0..ccdd13b32 100644
@@ -10,19 +10,35 @@ SECTION = "base"
 LICENSE = "BSD-1-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=5cc1f1e4c71f19f580458586756c02b4"
 
-SRC_URI = "https://github.com/troydhanson/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz"
+SRC_URI = "\
+    https://github.com/troydhanson/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \
+    file://run-ptest \
+"
 UPSTREAM_CHECK_URI = "https://github.com/troydhanson/${BPN}/releases"
 
 SRC_URI[md5sum] = "d08632a58674274c9cd87e2930f5696a"
 SRC_URI[sha256sum] = "34a31d51dd7a839819cecd6f46049b4ffe031d7f3147d9a042f5504fdb1348d1"
 
+inherit ptest
+
 do_compile[noexec] = "1"
 
+do_compile_ptest() {
+    oe_runmake -C tests tests_only TEST_TARGET=
+}
+
 do_install () {
     install -dm755 ${D}${includedir}
     install -m0644 src/*.h ${D}${includedir}
 }
 
+do_install_ptest() {
+    install -dm755 ${D}${PTEST_PATH}/tests
+    install -m0755 tests/test*[0-9] ${D}${PTEST_PATH}/tests
+    install -m0644 tests/test*[0-9].ans ${D}${PTEST_PATH}/tests
+    install -m0644 tests/test*[0-9].dat ${D}${PTEST_PATH}/tests
+}
+
 # The main package is empty and non-existent, so -dev
 # should not depend on it...
 RDEPENDS_${PN}-dev = ""
Signature · 1 line
2.15.1
#2 lore raw
In reply to André Draszik
Quoted 1 line · André Draszik

[...]

meta-oe/recipes-support/uthash/uthash_2.0.2.bb line 11

Quoted 4 lines
meta-oe/recipes-support/uthash/uthash_2.0.2.bb new file +4 -0
+HOMEPAGE = "https://troydhanson.github.io/uthash/"
+SECTION = "base"
+LICENSE = "BSD-1-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5cc1f1e4c71f19f580458586756c02b4"

Note that there is no common license file for BSD-1-Clause in OE-core, which causes this warning:

WARNING: <image> do_rootfs: The license listed BSD-1-Clause was not in the licenses collected for recipe uthash

Is this really the first recipe using BSD-1-Clause?
Should a license file be added to OE-core, or is there a different approach taken normally?

Cheers,
Andre'

#3 lore raw
Quoted 9 lines · André Draszik

On Fri, 2018-01-12 at 12:29 +0000, André Draszik wrote:
[...]

meta-oe/recipes-support/uthash/uthash_2.0.2.bb line 11

Quoted 4 lines
meta-oe/recipes-support/uthash/uthash_2.0.2.bb new file +4 -0
+HOMEPAGE = "https://troydhanson.github.io/uthash/"
+SECTION = "base"
+LICENSE = "BSD-1-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5cc1f1e4c71f19f580458586756c02b4"

Note that there is no common license file for BSD-1-Clause in OE-core, which causes this warning:

Quoted 3 lines

WARNING: <image> do_rootfs: The license listed BSD-1-Clause was not in the licenses collected for recipe uthash

Is this really the first recipe using BSD-1-Clause?

Does the standalone "BSD" license over Clause 1?

Quoted 7 lines

Should a license file be added to OE-core, or is there a different approach taken normally?

Cheers,
Andre'

#4 lore raw
Quoted 14 lines · On Tue, 2018-01-16 at 22:20 -0800, akuster808 wrote:
Quoted 12 lines · André Draszik

On Fri, 2018-01-12 at 12:29 +0000, André Draszik wrote:
[...]

Quoted 5 lines
meta-oe/recipes-support/uthash/uthash_2.0.2.bb new file +4 -0
+HOMEPAGE = "https://troydhanson.github.io/uthash/"
+SECTION = "base"
+LICENSE = "BSD-1-Clause"
+LIC_FILES_CHKSUM =

"file://LICENSE;md5=5cc1f1e4c71f19f580458586756c02b4"

Note that there is no common license file for BSD-1-Clause in OE-core, which
causes this warning:

Quoted 6 lines
Quoted 4 lines

WARNING: <image> do_rootfs: The license listed BSD-1-Clause was not in the licenses collected for recipe uthash

Is this really the first recipe using BSD-1-Clause?

Does the standalone "BSD" license over Clause 1?

Well, the stand-alone BSD license is effectively BSD-3-Clause, so it's of course more restrictive than the 1-Clause version.

Cheers,
Andre'