mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
77 lines
1.9 KiB
Bash
77 lines
1.9 KiB
Bash
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="122928b814b75717316c71af69bd2b43387643ba076a6ec16e7882bfb2dfacbb"
|
|
SOURCE_FILENAME="catch2-v$portVersion.tar.gz"
|
|
SOURCE_DIR="Catch2-$portVersion"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
catch2$secondaryArchSuffix = $portVersion
|
|
lib:libcatch2$secondaryArchSuffix = $portVersion
|
|
lib:libcatch2main$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
catch2${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libcatch2$secondaryArchSuffix = $portVersion
|
|
devel:libcatch2main$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES_devel="
|
|
catch2$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
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 \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DPKGCONFIG_INSTALL_DIR=$developLibDir/pkgconfig # \
|
|
# -DCATCH_DEVELOPMENT_BUILD=ON #needed to run the tests
|
|
make -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
prepareInstalledDevelLibs libCatch2 \
|
|
libCatch2Main
|
|
|
|
packageEntries devel \
|
|
$developDir \
|
|
$documentationDir \
|
|
$libDir/cmake
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
cd build
|
|
CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E "RegressionCheck-1670"
|
|
}
|