package/cunit: switch to maintain fork version 3.2.6
PATCH 1/1 package/cunit: switch to maintain fork version 3.2.6
The CUnit project on Sourgeforce has not been maintained since 2014. Switch to forked version on Gitlab which is under active development at:
https://gitlab.com/cunity/cunit#new-releases-of-cunit-2018-08-onwards
Changes which were made to the package include:
* Switch to CMake build system
* Requires BR2_USE_MMU for '-rdynamic' (CMake test)
* Requires C++ for CUnit/Sources/wxWidget/wxWidget.cpp
* Update hash format to two spaces
* Add patch to resolve issue with unused variable with assert to allow compiling with GCC 8
* Add patch to optionally build test and examples (turn off for buildroot)
* Add myself to DEVELOPERS for this package
Tested with ./utils/test-pkg -c cunit.config -p cunit:
br-arm-full [1/6]: OK
br-arm-cortex-a9-glibc [2/6]: OK
br-arm-cortex-m4-full [3/6]: SKIPPED
br-x86-64-musl [4/6]: OK
br-arm-full-static [5/6]: OK
sourcery-arm [6/6]: OK6 builds, 1 skipped, 0 build failed, 0 legal-info failed
Checked with check-package:
$ ./utils/check-package package/cunit/* 192 lines processed 0 warnings generated
--- DEVELOPERS | 1 + ...n-remove-variable-only-used-in-asser.patch | 45 +++++++ ...dd-optional-builds-of-tests-examples.patch | 114 ++++++++++++++++++ package/cunit/Config.in | 10 +- package/cunit/cunit.hash | 4 +- package/cunit/cunit.mk | 15 +-- 6 files changed, 178 insertions(+), 11 deletions(-) create mode 100644 package/cunit/0001-Framework-TestRun-remove-variable-only-used-in-asser.patch create mode 100644 package/cunit/0002-CMakeLists-add-optional-builds-of-tests-examples.patch
DEVELOPERS +1 -0
@@ -2250,6 +2250,7 @@ F: package/davfs2/ N: Ryan Barnett <[email protected]> F: package/atftp/ +F: package/cunit/ F: package/miraclecast/ F: package/python-pycrypto/ F: package/python-pysnmp/
package/cunit/0001-Framework-TestRun-remove-variable-only-used-in-asser.patch new file +45 -0
45 lines not on this page · raw message
package/cunit/0002-CMakeLists-add-optional-builds-of-tests-examples.patch new file +114 -0
114 lines not on this page · raw message
package/cunit/Config.in +8 -2
@@ -1,6 +1,12 @@ config BR2_PACKAGE_CUNIT bool "cunit" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU help - An automated testing framework in 'C'. + An automated testing framework in 'C' forked from the + Sourceforge CUnit which is currently unmaintained. - http://cunit.sourceforge.net/ + https://gitlab.com/cunity/cunit + +comment "cunit needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP
package/cunit/cunit.hash +2 -2
@@ -1,3 +1,3 @@ # Locally calculated: -sha256 f5b29137f845bb08b77ec60584fdb728b4e58f1023e6f249a464efa49a40f214 CUnit-2.1-3.tar.bz2 -sha256 5d9d73d41a57dd2f34487ef3978a2c13cdb97294baeeb81fcd274796399eb15f COPYING +sha256 4f59094ff602489a0a88fc4960df9c860e46343183eb59475b02062d3121e1f2 cunit-3.2.6.tar.gz +sha256 5d9d73d41a57dd2f34487ef3978a2c13cdb97294baeeb81fcd274796399eb15f COPYING
package/cunit/cunit.mk +8 -7
@@ -4,14 +4,15 @@ # ################################################################################ -CUNIT_VERSION = 2.1-3 -CUNIT_SITE = http://downloads.sourceforge.net/project/cunit/CUnit/$(CUNIT_VERSION) -CUNIT_SOURCE = CUnit-$(CUNIT_VERSION).tar.bz2 -CUNIT_INSTALL_STAGING = YES +CUNIT_VERSION = 3.2.6 +CUNIT_SITE = https://gitlab.com/cunity/cunit/-/archive/$(CUNIT_VERSION) CUNIT_LICENSE = LGPL-2.0+ CUNIT_LICENSE_FILES = COPYING -# The source archive does not have the autoconf/automake material generated. -CUNIT_AUTORECONF = YES +# Static library for unit testing +CUNIT_INSTALL_STAGING = YES +CUNIT_INSTALL_TARGET = NO + +CUNIT_CONF_OPTS +=-DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -fPIC -pie " -$(eval $(autotools-package)) +$(eval $(cmake-package))
Signature · 1 line
2.17.1
PATCH 1/1 package/cunit: switch to maintain fork version 3.2.6
All,
Quoted 36 lines · Ryan Barnett
The CUnit project on Sourgeforce has not been maintained since 2014. Switch to forked version on Gitlab which is under active development at:
https://gitlab.com/cunity/cunit#new-releases-of-cunit-2018-08-onwards
Changes which were made to the package include:
* Switch to CMake build system
* RequiresBR2_USE_MMUfor '-rdynamic' (CMake test)
* Requires C++ for CUnit/Sources/wxWidget/wxWidget.cpp
* Update hash format to two spaces
* Add patch to resolve issue with unused variable with assert to allow compiling with GCC 8
* Add patch to optionally build test and examples (turn off for buildroot)
* Add myself to DEVELOPERS for this packageTested with ./utils/test-pkg -c cunit.config -p cunit:
br-arm-full [1/6]: OK br-arm-cortex-a9-glibc [2/6]: OK br-arm-cortex-m4-full [3/6]: SKIPPED br-x86-64-musl [4/6]: OK br-arm-full-static [5/6]: OK sourcery-arm [6/6]: OK6 builds, 1 skipped, 0 build failed, 0 legal-info failed
Checked with check-package:
$ ./utils/check-package package/cunit/* 192 lines processed 0 warnings generatedSigned-off-by Ryan Barnett <[email protected]>
Quoted 10 lines
--- DEVELOPERS | 1 + ...n-remove-variable-only-used-in-asser.patch | 45 +++++++ ...dd-optional-builds-of-tests-examples.patch | 114 ++++++++++++++++++ package/cunit/Config.in | 10 +- package/cunit/cunit.hash | 4 +- package/cunit/cunit.mk | 15 +-- 6 files changed, 178 insertions(+), 11 deletions(-) create mode 100644 package/cunit/0001-Framework-TestRun-remove-variable-only-used-in-asser.patch create mode 100644 package/cunit/0002-CMakeLists-add-optional-builds-of-tests-examples.patch
I'm going to mark these as changes requested as it appears that upstream is going to make more changes in regards to supporting building without tests or examples:
https://gitlab.com/cunity/cunit/-/merge_requests/58
Will send v2 when these changes are merged.
Thanks,
-Ryan
PATCH 1/1 package/cunit: switch to maintain fork version 3.2.6
In reply to Ryan BarnettHello,
Quoted 4 lines · On Tue, 28 Apr 2020 17:10:18 -0500 Ryan Barnett…
Changes which were made to the package include:
* Switch to CMake build system
* RequiresBR2_USE_MMUfor '-rdynamic' (CMake test)
-rdynamic is more related to shared libraries than MMU support. You can have a pure static library system on a MMU-capable system, and some no-MMU platforms support shared libraries.
Quoted 9 lines
package/cunit/Config.in +2
-0@@ -1,6 +1,12 @@ config BR2_PACKAGE_CUNIT bool "cunit" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU
package/cunit/Config.in line 12
Quoted 10 lines
package/cunit/Config.in +6
-2help - An automated testing framework in 'C'. + An automated testing framework in 'C' forked from the + Sourceforge CUnit which is currently unmaintained. - http://cunit.sourceforge.net/ + https://gitlab.com/cunity/cunit + +comment "cunit needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP
This comment would have required a "depends on BR2_USE_MMU". But most likely, it will be a !BR2_STATIC_LIBS dependency instead.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/cunit: switch to maintain fork version 3.2.6
Thomas/All,
Quoted 6 lines · Thomas Petazzoni
Hello,
On Tue, 28 Apr 2020 17:10:18 -0500
Ryan Barnett <[email protected]> wrote:
Quoted 8 lines
Quoted 4 lines
Changes which were made to the package include:
* Switch to CMake build system
* RequiresBR2_USE_MMUfor '-rdynamic' (CMake test)-rdynamic is more related to shared libraries than MMU support. You can have a pure static library system on a MMU-capable system, and some no-MMU platforms support shared libraries.
That is what I'm gather based on the feedback from upstream in my issue that I created:
https://gitlab.com/cunity/cunit/-/issues/39
Quoted 14 lines
Quoted 14 lines
package/cunit/Config.in +4
-1@@ -1,6 +1,12 @@ config BR2_PACKAGE_CUNIT bool "cunit" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU help - An automated testing framework in 'C'. + An automated testing framework in 'C' forked from the + Sourceforge CUnit which is currently unmaintained.
Quoted 8 lines
package/cunit/Config.in line 12
Quoted 5 lines
package/cunit/Config.in +4
-1- http://cunit.sourceforge.net/ + https://gitlab.com/cunity/cunit + +comment "cunit needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPPThis comment would have required a "depends on
BR2_USE_MMU". But most likely, it will be a !BR2_STATIC_LIBS dependency instead.
Do you have any suggestions in regards to the feedback that Ian Norton (maintainer of forked cunit) of how we could handle this properly?
Feedback from Ian:
Hi Ryan, that error is complaining about the linker not supporting -rdynamic.
I think you can make this go away by setting a newer cmake policy -
https://cmake.org/cmake/help/v3.6/policy/CMP0065.html
Or by overriding the cmake shared library flags to be empty perhaps?
-DCMAKE_SHARED_LIBRARY_LINK_C_FLAGS=""
Thanks,
-Ryan