check: add recipe for version 0.10.0.

This commit is contained in:
fbrosson
2016-03-11 21:32:17 +00:00
parent 25ce22e439
commit 7746bb1be1
2 changed files with 110 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
SUMMARY="Unit Testing Framework for C"
DESCRIPTION="Check is a unit testing framework for C. It features a simple \
interface for defining unit tests, putting little in the way of the developer.
Tests are run in a separate address space, so both assertion failures and code \
errors that cause segmentation faults or other signals can be caught. Test \
results are reportable in the following: Subunit, TAP, XML, and a generic \
logging format."
HOMEPAGE="https://libcheck.github.io/check/"
COPYRIGHT="2001-2015 Arien Malec, Branden Archer, Chris Pickett, Fredrik \
Hugosson, and Robert Lemmen."
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="https://github.com/libcheck/check/files/71408/check-$portVersion.tar.gz"
CHECKSUM_SHA256="f5f50766aa6f8fe5a2df752666ca01a950add45079aa06416b83765b1cf71052"
PATCHES="check-$portVersion.patch"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
check$secondaryArchSuffix = $portVersion
lib:libcheck$secondaryArchSuffix = 0.0.0 compat >= 0
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES="$PROVIDES
cmd:checkmk = $portVersion
"
fi
REQUIRES="
haiku$secondaryArchSuffix
"
if [ -n "$secondaryArchSuffix" ]; then
REQUIRES="$REQUIRES
check == $portVersion base
"
fi
PROVIDES_devel="
check${secondaryArchSuffix}_devel = $portVersion
devel:libcheck$secondaryArchSuffix = 0.0.0 compat >= 0
"
REQUIRES_devel="
check$secondaryArchSuffix == $portVersion base
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:gawk
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
if [ "$targetArchitecture" != "$effectiveTargetArchitecture" ]; then
# We are building for the secondary architecture, so let's remove some files.
rm -fr $dataDir $manDir $infoDir $binDir
# $binDir/checkmk is a script and it is identical to the one in the base package.
# So we can replace it by a symbolic link to the main one.
mkdir -p $binDir
ln -s ../checkmk $binDir
fi
prepareInstalledDevelLib libcheck
fixPkgconfig
packageEntries devel \
$developDir
}
TEST()
{
make check
}

View File

@@ -0,0 +1,27 @@
--- a/src/check_msg.c 2015-08-02 19:31:23.000000000 +0000
+++ b/src/check_msg.c
@@ -226,22 +226,22 @@ void teardown_messaging(void)
*/
FILE *open_tmp_file(char **name)
{
FILE *file = NULL;
- *name = NULL;
-
#if !HAVE_MKSTEMP
/* Windows does not like tmpfile(). This is likely because tmpfile()
* call unlink() on the file before returning it, to make sure the
* file is deleted when it is closed. The unlink() call also fails
* on Windows if the file is still open. */
/* also note that mkstemp is apparently a C90 replacement for tmpfile */
/* perhaps all we need to do on Windows is set TMPDIR to whatever is
stored in TEMP for tmpfile to work */
/* and finally, the "b" from "w+b" is ignored on OS X, not sure about WIN32 */
+ *name = NULL;
+
file = tmpfile();
if(file == NULL)
{
char *tmp = getenv("TEMP");
char *tmp_file = tempnam(tmp, "check_");