From 33740c69c4bb65f43ce2b9a927d98cf914d2f58d Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Sun, 19 Feb 2023 16:24:30 +0100 Subject: [PATCH] catch2, new recipe (#7866) --- dev-cpp/catch2/catch2-3.3.1.recipe | 59 ++++++++++++++++++++++++++++++ dev-cpp/catch2/licenses/Boost v1.0 | 23 ++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 dev-cpp/catch2/catch2-3.3.1.recipe create mode 100644 dev-cpp/catch2/licenses/Boost v1.0 diff --git a/dev-cpp/catch2/catch2-3.3.1.recipe b/dev-cpp/catch2/catch2-3.3.1.recipe new file mode 100644 index 000000000..dfa7a5735 --- /dev/null +++ b/dev-cpp/catch2/catch2-3.3.1.recipe @@ -0,0 +1,59 @@ +SUMMARY="A unit testing framework for C++" +DESCRIPTION="Catch2 is mainly a unit testing framework for C++, but it also provides basic \ +micro-benchmarking features, and simple BDD macros. + +Catch2's main advantage is that using it is both simple and natural. +Test names do not have to be valid identifiers, assertions look like normal C++ boolean \ +expressions, and sections provide a nice and local way to share set-up and tear-down code in \ +tests." +HOMEPAGE="https://github.com/catchorg/Catch2" +COPYRIGHT="Catch2 Authors" +LICENSE="Boost v1.0" +REVISION="1" +SOURCE_URI="$HOMEPAGE/archive/refs/tags/v$portVersion.tar.gz" +CHECKSUM_SHA256="d90351cdc55421f640c553cfc0875a8c834428679444e8062e9187d05b18aace" +SOURCE_FILENAME="catch2-v$portVersion.tar.gz" +SOURCE_DIR="Catch2-$portVersion" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + catch2$secondaryArchSuffix = $portVersion + devel:libcatch2$secondaryArchSuffix = $portVersion + devel:libcatch2main$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:python3 + cmd:make + " + +BUILD() +{ + cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \ + $cmakeDirArgs #\ + #-DCATCH_DEVELOPMENT_BUILD=ON #needed to run the tests + make -C build $jobArgs +} + +INSTALL() +{ + make -C build install + + prepareInstalledDevelLibs libCatch2 libCatch2Main +} + +TEST() +{ + cd build + CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E "RegressionCheck-1670" +} diff --git a/dev-cpp/catch2/licenses/Boost v1.0 b/dev-cpp/catch2/licenses/Boost v1.0 new file mode 100644 index 000000000..36b7cd93c --- /dev/null +++ b/dev-cpp/catch2/licenses/Boost v1.0 @@ -0,0 +1,23 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE.