# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit cmake DESCRIPTION="CUnit is a Unit testing framework for C" HOMEPAGE="https://gitlab.com/cunity/cunit" SRC_URI="https://gitlab.com/cunity/cunit/-/archive/${PV}/${P}.tar.bz2" LICENSE="LGPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" IUSE="test" RESTRICT="!test? ( test )" src_prepare() { sed -i -e 's:-Werror ::' CMakeLists.txt CUnit/CMakeLists.txt || die # Modify the target directory to conform to expected paths sed -i 's/CUnit\/share\/cmake/share\/CUnit\/cmake/g' CUnit/CMakeLists.txt || die cmake_src_prepare } src_configure() { local mycmakeargs=( -DCUNIT_DISABLE_TESTS=$(usex !test) -DCUNIT_DISABLE_EXAMPLES=ON ) cmake_src_configure } src_install() { cmake_src_install #find "${ED}" -type f -name '*.a' -delete || die }