mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 23:18:58 +02:00
x86_64 is used as a baseline: the "x86_64" entry, whatever status it has, is transformed into "all", and then the other entries in ARCHITECTURES either dropped or rearranged appropriately.
82 lines
1.7 KiB
Bash
82 lines
1.7 KiB
Bash
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="f0ccd8242d55e2fd74b16ba518359151f6f8383ff8aef4976e48393f77bba8b6"
|
|
PATCHES="cmocka-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="0.7.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="
|
|
cmocka$secondaryArchSuffix == $portVersion base
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
|
|
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
|
|
}
|