summaryrefslogtreecommitdiff
path: root/dev-libs/unittest++
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-01-22 20:28:19 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-01-22 20:28:19 +0000
commitabaa75b10f899ada8dd05b23cc03205064394bc6 (patch)
treeeca3dd248b73b92013cba00a0fcc1edf2696e19a /dev-libs/unittest++
parent24fd814c326e282c4321965c31f341dad77e270d (diff)
gentoo resync : 22.01.2021
Diffstat (limited to 'dev-libs/unittest++')
-rw-r--r--dev-libs/unittest++/Manifest3
-rw-r--r--dev-libs/unittest++/files/unittest++-2.0.0-Add-support-for-LIB_SUFFIX.patch55
-rw-r--r--dev-libs/unittest++/files/unittest++-2.0.0-cmake-fix-pkgconfig-dir-path-on-FreeBSD.patch28
-rw-r--r--dev-libs/unittest++/unittest++-2.0.0-r2.ebuild49
4 files changed, 135 insertions, 0 deletions
diff --git a/dev-libs/unittest++/Manifest b/dev-libs/unittest++/Manifest
index df362291022f..0e02932200f2 100644
--- a/dev-libs/unittest++/Manifest
+++ b/dev-libs/unittest++/Manifest
@@ -1,5 +1,8 @@
+AUX unittest++-2.0.0-Add-support-for-LIB_SUFFIX.patch 2311 BLAKE2B c7d8511fbf0973f1209e0b555b3550b25692d306f35274e4e3dc8864d2928fe47930cf74f9e17e6c09cd1dc43e6c14a8f2f1f1444a5149b3d0e18a1672c78996 SHA512 638ee1aa92fdfc0148563e493b3853b4e8b71e69a8d0a279e6d033b6ecf2de9fe4b2e6b0b57ad8e242bda7d4a19ada1bd26649745ef2297275615e87a82a3ac7
+AUX unittest++-2.0.0-cmake-fix-pkgconfig-dir-path-on-FreeBSD.patch 999 BLAKE2B 02ac677273d5b2c52e23683b878df04095ddfdc294c87778da71e1e3f4a2c0b2012f9ffb78f92f43a5667b8c76426abf094b8048c76283f69951f3e8e3fbb104 SHA512 089ab6aa6b68f52ba7d61a4b7929cfefe4feb25b73ff6ab0f05e9a8fec29e502bc2bf5c16cd620808e24267f04b3330572baf232d8ce78e459d439c22b22d0b2
AUX unittest++-2.0.0-fix-tests-with-clang.patch 1018 BLAKE2B 5913b010ceae5975b8cdcfe7656c137cfe47845ae92815d3b7fa66f429a712e686cb7accb400c43149458b6716020c7ff48f0a673a7c2b7bcc36f5cf0fcd40ae SHA512 dd77794e8c22e168235f14c3c00381bf7439bfe60a700ae038290c93e2f6faa276d4f45de17a159d7a1edbb182a40b078b7751a25e1dcf646e7d311fd33e31cf
DIST unittest++-2.0.0.tar.gz 54100 BLAKE2B 5aceda6e76f4536054c8de0fb4a4a17027d0707101fb323883734d420f038aeb094fb6567e41145804f012c952a5807bdd6fe1bae1e4a09a6e36c5f1bbc5717e SHA512 39318f4ed31534c116679a3257bf1438a6c4b3bef1894dfd40aea934950c6c8197af6a7f61539b8e9ddc67327c9388d7e8a6f8a3e0e966ad26c07554e2429cab
EBUILD unittest++-2.0.0-r1.ebuild 1082 BLAKE2B 1ba9a0302f39ea36d30d3566e2d185ece2f7a5cebcbf872338b25ebdd447ef4d4abe3f3fc9dfe37ec72cc50cdd14637363d301c338fb94dd44fcfcbd340ca2e6 SHA512 fa6347d4a4da9e656523f49c31f0e553a2c45203edad7a1a70bbfd0a9c9c5b7e08ad003b299d6174dae93925ad38863f1fd86d00b4b0706de060b6d0027dd7b7
+EBUILD unittest++-2.0.0-r2.ebuild 1204 BLAKE2B 41ead1db3468995edbebf103b4e66cfd0673e005047c4f1907ef0949e77c8029668489f7654857088c9b3efc874f6eab82abbfce185c7bddd48606d009c4dfcb SHA512 4169f5f74ef3a3946984ffaef47f93c9572e506102fdd2b689be785f42866f094dbde0b03831312a1f4122f1f3be24eabc038f4d7903b5b8975c5707f0ea148b
EBUILD unittest++-2.0.0.ebuild 1007 BLAKE2B fe8d05aa14bbf52caba06854a459eeba25ca8db8c081adb0abf468ec8585370543286fd58424078c9b92a9a8b2b8a604c76bf2f11b5fdf389af6d50e2dd4aa29 SHA512 8abb78978aa9283e9901e909d46fd31d6f74d97cee1d8dbd0926f4c7ade5c2c2948acdc9fa334f26b7801fe681ec54f7751fea0e86647f1ce90e20afe48fbe35
MISC metadata.xml 408 BLAKE2B 79c6d8551125de4ae8c262513a3c8a7fa46d1518418312aed741eebc9f60ca5be8032ad4df6ca08b67d5fe65a46b11eb99533817556248df44dd04da741bee88 SHA512 6fec64fc5f6ecc1971d0cf79caac9d3529b4e9a7cc32b0b1a39254761de8c487df692b9730221866276f44a79ab7bae0e4fc8cccdacbf7bfec8e4c372fdada25
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 000000000000..fcaad5b0e69f
--- /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 000000000000..44c243670027
--- /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 000000000000..4930c05f9b6e
--- /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"
+}