mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
dev-libs/bcunit: new recipe (#1986)
This commit is contained in:
80
dev-libs/bcunit/bcunit-3.0.2.recipe
Normal file
80
dev-libs/bcunit/bcunit-3.0.2.recipe
Normal file
@@ -0,0 +1,80 @@
|
||||
SUMMARY="A unit testing framework for C"
|
||||
DESCRIPTION="A lightweight system for writing, administering, and running unit \
|
||||
tests in C."
|
||||
HOMEPAGE="https://github.com/BelledonneCommunications/bcunit"
|
||||
COPYRIGHT="2017 BCUnit Authors"
|
||||
LICENSE="GNU LGPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/BelledonneCommunications/bcunit/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="eb7090aca5006aa0cea425722cb3fa1a7139185a7d9d1734d57844f69084713f"
|
||||
PATCHES="bcunit-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="1.0.1"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
bcunit$secondaryArchSuffix = $portVersion
|
||||
lib:libbcunit$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
bcunit${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libbcunit$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
bcunit$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:autoheader
|
||||
cmd:automake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
./autogen.sh
|
||||
runConfigure ./configure --enable-test
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
install -d -m 755 "$docDir" "$developDocDir"
|
||||
mv "$prefix/doc/BCUnit/"* "$developDocDir/"
|
||||
rm -rf "$prefix/doc"
|
||||
|
||||
install -t "$docDir" -m 644 AUTHORS
|
||||
|
||||
# No need to install internal test suite
|
||||
rm -rf "$dataDir/BCUnit/Test"
|
||||
|
||||
# libtool
|
||||
rm -f "$libDir/"*.la
|
||||
|
||||
prepareInstalledDevelLib libbcunit
|
||||
fixPkgconfig
|
||||
packageEntries devel \
|
||||
"$developDir" \
|
||||
"$manDir"
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
./BCUnit/Sources/Test/test_bcunit
|
||||
}
|
||||
22
dev-libs/bcunit/patches/bcunit-3.0.2.patchset
Normal file
22
dev-libs/bcunit/patches/bcunit-3.0.2.patchset
Normal file
@@ -0,0 +1,22 @@
|
||||
From 7b0aa89a836b38cf5abfe0b1489d91719638a763 Mon Sep 17 00:00:00 2001
|
||||
From: Leorize <alaviss@users.noreply.github.com>
|
||||
Date: Thu, 28 Dec 2017 18:40:39 +0700
|
||||
Subject: fix test
|
||||
|
||||
|
||||
diff --git a/BCUnit/Sources/Test/Makefile.am b/BCUnit/Sources/Test/Makefile.am
|
||||
index 04c1e8e..f6729b2 100644
|
||||
--- a/BCUnit/Sources/Test/Makefile.am
|
||||
+++ b/BCUnit/Sources/Test/Makefile.am
|
||||
@@ -5,7 +5,7 @@ testdir=${datadir}/@PACKAGE@/Test
|
||||
|
||||
test_PROGRAMS = test_bcunit
|
||||
test_bcunit_SOURCES = test_bcunit.c
|
||||
-test_bcunit_LDADD = ../libbcunit_test.a
|
||||
+test_bcunit_LDADD = ../libbcunit_test.a ../Basic/.libs/libbcunitbasic.a
|
||||
test_bcunit_LDFLAGS = -L..
|
||||
|
||||
INCLUDES = -I../../Headers -DMEMTRACE -DBCUNIT_BUILD_TESTS -DBCUNIT_DO_NOT_DEFINE_UNLESS_BUILDING_TESTS
|
||||
--
|
||||
2.15.0
|
||||
|
||||
Reference in New Issue
Block a user