mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
80
dev-util/cmocka/cmocka-1.1.2.recipe
Normal file
80
dev-util/cmocka/cmocka-1.1.2.recipe
Normal file
@@ -0,0 +1,80 @@
|
||||
SUMMARY="A unit testing framework for C"
|
||||
DESCRIPTION="cmocka is an elegant unit testing framework for C with support \
|
||||
for mock objects. It only requires the standard C library, works on a range \
|
||||
of computing platforms (including embedded) and with different compilers."
|
||||
HOMEPAGE="https://cmocka.org/"
|
||||
COPYRIGHT="2008 Google Inc.
|
||||
2014-2018 Andreas Schneider
|
||||
2015 Jakub Hrozek"
|
||||
LICENSE="Apache v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://cmocka.org/files/${portVersion%.*}/cmocka-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="d11cd1e129827ff240a501c1c43557e808de89e8fcd8ab9e963c8db419332bdd"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="0.5.0"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
cmocka$secondaryArchSuffix = $portVersion
|
||||
lib:libcmocka$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
cmocka${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libcmocka$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmocka$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
defineDebugInfoPackage cmocka$secondaryArchSuffix \
|
||||
"$libDir"/libcmocka.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
cmake .. \
|
||||
$cmakeDirArgs \
|
||||
-DINCLUDE_INSTALL_DIR="$includeDir" \
|
||||
-DLIBEXEC_INSTALL_DIR="$libDir" \
|
||||
-DLIB_INSTALL_DIR="$libDir"
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
|
||||
prepareInstalledDevelLib libcmocka
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
"$developDir" \
|
||||
"$libDir"/cmake
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd build
|
||||
make test
|
||||
}
|
||||
Reference in New Issue
Block a user