Skip to content

Instantly share code, notes, and snippets.

@stephengroat
Last active November 19, 2017 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephengroat/6f3bfe85247c017a76de780fb30f36a4 to your computer and use it in GitHub Desktop.
Save stephengroat/6f3bfe85247c017a76de780fb30f36a4 to your computer and use it in GitHub Desktop.
cmocka cygport
inherit cmake
NAME="cmocka"
VERSION=1.1.1
RELEASE=1
CATEGORY="Devel"
SUMMARY="A powerful testing framework for C which only requires the standard C library"
DESCRIPTION="An elegant unit testing framework for C with support for mock objects.
It only requires the standard C library, works on a lot of platforms
(including embedded) and with different compilers."
HOMEPAGE="https://cmocka.org"
SRC_URI="https://cmocka.org/files/1.1/cmocka-${VERSION}.tar.xz"
# Build dependencies only
DEPEND="doxygen"
PKG_NAMES="libcmocka0 libcmocka-devel cmocka-doc"
libcmocka0_CONTENTS="
usr/bin/cygcmocka-0.dll
usr/share/doc/cmocka
"
libcmocka_devel_CONTENTS="
usr/include/cmocka.h
usr/include/cmocka_pbc.h
usr/include/cmockery
usr/lib/cmake/cmocka
usr/lib/libcmocka.a
usr/lib/libcmocka.dll.a
usr/lib/pkgconfig/cmocka.pc
"
src_test() {
cd ${B}
make test
}
CYGCMAKE_ARGS="
-DWITH_STATIC_LIB=ON
-DWITH_CMOCKERY_SUPPORT=ON
-DUNIT_TESTING=ON
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment