Files
haikuports/dev-util/cmocka/cmocka-1.1.5.recipe
Alexander von Gluck 47ea51f320 cmake/meson: Mass fix packages with broken debuginfo (#12822)
* cmake/debuginfo: Mass fix packages with broken debuginfo

* rtl_sdr: Fix trailing whitespace

* meson/debuginfo: Mass fix packages with broken debuginfo

* clean up conflicts

---------

Co-authored-by: Luc Schrijvers <begasus@gmail.com>
2026-01-07 17:36:21 +01:00

77 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="3"
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()
{
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
$cmakeDirArgs \
-DINCLUDE_INSTALL_DIR="$includeDir" \
-DLIBEXEC_INSTALL_DIR="$libDir" \
-DLIB_INSTALL_DIR="$libDir"
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib libcmocka
fixPkgconfig
packageEntries devel \
"$developDir" \
"$libDir"/cmake
}
TEST()
{
cd build
make test
}