From 169e6a7a895976b9dca398ac1be77102896a818e Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Thu, 2 Jun 2016 21:44:16 +0200 Subject: [PATCH] unittest++: add recipe for version 1.6.1 --- .../patches/unittest++-1.6.1.patchset | 23 ++++++ dev-libs/unittest++/unittest++-1.6.1.recipe | 71 +++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 dev-libs/unittest++/patches/unittest++-1.6.1.patchset create mode 100644 dev-libs/unittest++/unittest++-1.6.1.recipe diff --git a/dev-libs/unittest++/patches/unittest++-1.6.1.patchset b/dev-libs/unittest++/patches/unittest++-1.6.1.patchset new file mode 100644 index 000000000..99456d150 --- /dev/null +++ b/dev-libs/unittest++/patches/unittest++-1.6.1.patchset @@ -0,0 +1,23 @@ +From e9bd231d1a65425721a94b945973fc8dd26a42a3 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +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 + diff --git a/dev-libs/unittest++/unittest++-1.6.1.recipe b/dev-libs/unittest++/unittest++-1.6.1.recipe new file mode 100644 index 000000000..eb5eea097 --- /dev/null +++ b/dev-libs/unittest++/unittest++-1.6.1.recipe @@ -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++ +}