* [gentoo-commits] repo/gentoo:master commit in: dev-libs/unittest++/files/, dev-libs/unittest++/
@ 2020-08-15 17:46 Louis Sautier
0 siblings, 0 replies; 2+ messages in thread
From: Louis Sautier @ 2020-08-15 17:46 UTC (permalink / raw
To: gentoo-commits
commit: ef6917fd19d9002b321667b6e4535bf22e26e34b
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 15 17:12:31 2020 +0000
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 17:45:36 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef6917fd
dev-libs/unittest++: fix tests with clang
Closes: https://bugs.gentoo.org/737206
Package-Manager: Portage-3.0.2, Repoman-2.3.23
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>
.../unittest++-2.0.0-fix-tests-with-clang.patch | 27 ++++++++++++++++++++++
dev-libs/unittest++/unittest++-2.0.0.ebuild | 6 +++--
2 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/dev-libs/unittest++/files/unittest++-2.0.0-fix-tests-with-clang.patch b/dev-libs/unittest++/files/unittest++-2.0.0-fix-tests-with-clang.patch
new file mode 100644
index 00000000000..201ff10de5a
--- /dev/null
+++ b/dev-libs/unittest++/files/unittest++-2.0.0-fix-tests-with-clang.patch
@@ -0,0 +1,27 @@
+commit 2423fcac7668aa9c331a2dcf024c3ca06742942d
+Author: Dan Huantes <daniel.f.huantes@saic.com>
+Date: Thu Aug 15 08:26:41 2019 -0500
+
+ CrasingTestsAreReportedAsFailures no longer core dumps on Clang Release
+
+ Found that Crashing tests at some point in Clang
+ history were actually caught but testing on
+ Clang 6.0 and Clang 7.0 this is not the case.
+ So added Clang to the list of compilers that
+ don't run this tests. Noted that several
+ other Pull Requests were failing for the same
+ reason.
+
+diff --git a/tests/TestTest.cpp b/tests/TestTest.cpp
+index 5a4e1ca..0db0650 100644
+--- a/tests/TestTest.cpp
++++ b/tests/TestTest.cpp
+@@ -72,7 +72,7 @@ namespace {
+ CHECK_EQUAL(1, results.GetFailureCount());
+ }
+
+-#if !defined(UNITTEST_MINGW) && !defined(UNITTEST_WIN32)
++#if !defined(UNITTEST_MINGW) && !defined(UNITTEST_WIN32) && !defined(__clang__)
+ // Skip this test in debug because some debuggers don't like it.
+ #if defined(NDEBUG)
+ TEST(CrashingTestsAreReportedAsFailures)
diff --git a/dev-libs/unittest++/unittest++-2.0.0.ebuild b/dev-libs/unittest++/unittest++-2.0.0.ebuild
index af6ca161249..88339de1228 100644
--- a/dev-libs/unittest++/unittest++-2.0.0.ebuild
+++ b/dev-libs/unittest++/unittest++-2.0.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -11,6 +11,7 @@ MY_P="${MY_PN}-${PV}"
DESCRIPTION="A lightweight unit testing framework for C++"
HOMEPAGE="https://unittest-cpp.github.io/"
SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
LICENSE="MIT"
SLOT="0"
@@ -18,7 +19,8 @@ KEYWORDS="amd64 x86"
IUSE="test"
RESTRICT="!test? ( test )"
-S="${WORKDIR}/${MY_P}"
+# https://github.com/unittest-cpp/unittest-cpp/commit/2423fcac7668aa9c331a2dcf024c3ca06742942d
+PATCHES=( "${FILESDIR}/${P}-fix-tests-with-clang.patch" )
src_prepare() {
cmake-utils_src_prepare
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/unittest++/files/, dev-libs/unittest++/
@ 2021-01-09 23:48 Matt Turner
0 siblings, 0 replies; 2+ messages in thread
From: Matt Turner @ 2021-01-09 23:48 UTC (permalink / raw
To: gentoo-commits
commit: 333ffeb4deaa942c2c6101a4c5f9ea5774d307b7
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 9 21:37:59 2021 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Jan 9 23:47:26 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=333ffeb4
dev-libs/unittest++: Fix libdir
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
...ittest++-2.0.0-Add-support-for-LIB_SUFFIX.patch | 55 ++++++++++++++++++++++
...0-cmake-fix-pkgconfig-dir-path-on-FreeBSD.patch | 28 +++++++++++
dev-libs/unittest++/unittest++-2.0.0-r2.ebuild | 49 +++++++++++++++++++
3 files changed, 132 insertions(+)
diff --git a/dev-libs/unittest++/files/unittest++-2.0.0-Add-support-for-LIB_SUFFIX.patch b/dev-libs/unittest++/files/unittest++-2.0.0-Add-support-for-LIB_SUFFIX.patch
new file mode 100644
index 00000000000..fcaad5b0e69
--- /dev/null
+++ b/dev-libs/unittest++/files/unittest++-2.0.0-Add-support-for-LIB_SUFFIX.patch
@@ -0,0 +1,55 @@
+From 0757ba8f903fc94ac852c8ba394cd96358b0e2c7 Mon Sep 17 00:00:00 2001
+From: Christoph Willing <chris.willing@iinet.net.au>
+Date: Mon, 23 Jan 2017 17:49:12 +1000
+Subject: [PATCH] Add support for LIB_SUFFIX
+
+Signed-off-by: Christoph Willing <chris.willing@iinet.net.au>
+---
+ CMakeLists.txt | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a0f5511..6b490ef 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -11,6 +11,8 @@ option(UTPP_AMPLIFY_WARNINGS
+ "Set this to OFF if you wish to use CMake default warning levels; should generally only use to work around support issues for your specific compiler"
+ ON)
+
++set(LIB_SUFFIX "" CACHE STRING "Identifier to add to end of lib directory name e.g. 64 for lib64")
++
+ if(MSVC14 OR MSVC12)
+ # has the support we need
+ else()
+@@ -92,10 +94,10 @@ else()
+ set (UTPP_INSTALL_DESTINATION "include/UnitTestPP")
+ endif()
+
+-set(config_install_dir_ lib/cmake/${PROJECT_NAME})
++set(config_install_dir_ lib${LIB_SUFFIX}/cmake/${PROJECT_NAME})
+ set(targets_export_name_ "${PROJECT_NAME}Targets")
+
+-install(TARGETS UnitTest++ EXPORT "${targets_export_name_}" DESTINATION lib)
++install(TARGETS UnitTest++ EXPORT "${targets_export_name_}" DESTINATION lib${LIB_SUFFIX})
+ install(FILES ${headers_} DESTINATION ${UTPP_INSTALL_DESTINATION})
+ install(FILES ${platformHeaders_} DESTINATION ${UTPP_INSTALL_DESTINATION}/${platformDir_})
+ install(FILES cmake/UnitTest++Config.cmake DESTINATION "${config_install_dir_}")
+@@ -103,13 +105,13 @@ install(EXPORT "${targets_export_name_}" DESTINATION "${config_install_dir_}")
+
+ set(prefix ${CMAKE_INSTALL_PREFIX})
+ set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin)
+-set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
++set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
+ set(includedir ${CMAKE_INSTALL_PREFIX}/include/UnitTest++)
+ configure_file("UnitTest++.pc.in" "UnitTest++.pc" @ONLY)
+ if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+ set(pkgconfdir ${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig)
+ else()
+- set(pkgconfdir ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
++ set(pkgconfdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig)
+ endif()
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/UnitTest++.pc"
+ DESTINATION "${pkgconfdir}")
+--
+2.26.2
+
diff --git a/dev-libs/unittest++/files/unittest++-2.0.0-cmake-fix-pkgconfig-dir-path-on-FreeBSD.patch b/dev-libs/unittest++/files/unittest++-2.0.0-cmake-fix-pkgconfig-dir-path-on-FreeBSD.patch
new file mode 100644
index 00000000000..44c24367002
--- /dev/null
+++ b/dev-libs/unittest++/files/unittest++-2.0.0-cmake-fix-pkgconfig-dir-path-on-FreeBSD.patch
@@ -0,0 +1,28 @@
+From 85bade33f596a4dab33eb6d44f662d64fc20f510 Mon Sep 17 00:00:00 2001
+From: Iblis Lin <iblis@hs.ntnu.edu.tw>
+Date: Sat, 14 Jan 2017 23:00:24 +0800
+Subject: [PATCH] cmake: fix pkgconfig dir path on FreeBSD
+
+---
+ CMakeLists.txt | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fb10f47..a0f5511 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -106,5 +106,10 @@ set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin)
+ set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
+ set(includedir ${CMAKE_INSTALL_PREFIX}/include/UnitTest++)
+ configure_file("UnitTest++.pc.in" "UnitTest++.pc" @ONLY)
++if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
++ set(pkgconfdir ${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig)
++else()
++ set(pkgconfdir ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
++endif()
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/UnitTest++.pc"
+- DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
++ DESTINATION "${pkgconfdir}")
+--
+2.26.2
+
diff --git a/dev-libs/unittest++/unittest++-2.0.0-r2.ebuild b/dev-libs/unittest++/unittest++-2.0.0-r2.ebuild
new file mode 100644
index 00000000000..4930c05f9b6
--- /dev/null
+++ b/dev-libs/unittest++/unittest++-2.0.0-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+MY_PN="unittest-cpp"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A lightweight unit testing framework for C++"
+HOMEPAGE="https://unittest-cpp.github.io/"
+SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ # https://github.com/unittest-cpp/unittest-cpp/commit/2423fcac7668aa9c331a2dcf024c3ca06742942d
+ "${FILESDIR}"/${P}-fix-tests-with-clang.patch
+
+ "${FILESDIR}"/${P}-cmake-fix-pkgconfig-dir-path-on-FreeBSD.patch
+ "${FILESDIR}"/${P}-Add-support-for-LIB_SUFFIX.patch
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ # https://github.com/unittest-cpp/unittest-cpp/pull/163
+ sed -i '/run unit tests as post build step/,/Running unit tests/d' \
+ CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ # Don't build with -Werror: https://bugs.gentoo.org/747583
+ -DUTPP_AMPLIFY_WARNINGS=OFF
+ -DUTPP_INCLUDE_TESTS_IN_BUILD=$(usex test)
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ "${BUILD_DIR}/TestUnitTest++" || die "Tests failed"
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-09 23:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-09 23:48 [gentoo-commits] repo/gentoo:master commit in: dev-libs/unittest++/files/, dev-libs/unittest++/ Matt Turner
-- strict thread matches above, loose matches on Subject: below --
2020-08-15 17:46 Louis Sautier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox