unittest++: add recipe for version 1.6.1

This commit is contained in:
Jerome Duval
2016-06-02 21:44:16 +02:00
parent 521be40c0b
commit 169e6a7a89
2 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
From e9bd231d1a65425721a94b945973fc8dd26a42a3 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 2 Jun 2016 19:49:48 +0200
Subject: Haiku patch
diff --git a/UnitTest++/Config.h b/UnitTest++/Config.h
index ff62b4e..4bd31fe 100644
--- a/UnitTest++/Config.h
+++ b/UnitTest++/Config.h
@@ -21,7 +21,8 @@
#endif
#if defined(unix) || defined(__unix__) || defined(__unix) || defined(linux) || \
- defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
+ defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) \
+ || defined (__HAIKU__)
#define UNITTEST_POSIX
#endif
--
2.2.2

View File

@@ -0,0 +1,71 @@
SUMMARY="A lightweight unit testing framework for C++"
DESCRIPTION="UnitTest++ was designed to do test-driven development on a wide \
variety of platforms. Simplicity, portability, speed, and small footprint \
are all very important aspects of UnitTest++. UnitTest++ is mostly standard \
C++ and makes minimal use of advanced library and language features, which \
means it should be easily portable to just about any platform."
HOMEPAGE="http://unittest-cpp.github.io"
COPYRIGHT="2006 Noel Llopis and Charles Nicholson"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/unittest-cpp/unittest-cpp/archive/v$portVersion.tar.gz"
SOURCE_FILENAME="unittest-cpp-$portVersion.tar.gz"
CHECKSUM_SHA256="1cc9071be01db190f26868fefb6a7af49ee56a339fc3b08d1a1e9eeca5376c45"
SOURCE_DIR="unittest-cpp-$portVersion"
PATCHES="unittest++-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86 x86_gcc2"
PROVIDES="
unittest++$secondaryArchSuffix = $portVersion
lib:libunittest++$secondaryArchSuffix = $portVersion compat >= 1
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
unittest++${secondaryArchSuffix}_devel = $portVersion
devel:libunittest++$secondaryArchSuffix = $portVersion compat >= 1
"
REQUIRES_devel="
unittest++$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
cmake -DCMAKE_INSTALL_PREFIX=$prefix .
make $jobArgs
}
INSTALL()
{
make install
mkdir -p $includeDir
mv $prefix/include/UnitTest++ $includeDir/
rmdir $prefix/include
if [ -n "$secondaryArchSuffix" ]; then
mkdir -p $libDir
mv $prefix/lib/lib* $prefix/lib/cmake $libDir/
fi
prepareInstalledDevelLibs libUnitTest++
packageEntries devel $relativeDevelopDir
}
TEST()
{
./TestUnitTest++
}