check-0.10.0-r2.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. AUTOTOOLS_PRUNE_LIBTOOL_FILES="all"
  5. inherit autotools autotools-multilib
  6. DESCRIPTION="A unit test framework for C"
  7. HOMEPAGE="https://libcheck.github.io/check/"
  8. SRC_URI="https://github.com/lib${PN}/${PN}/archive/${PV}.tar.gz -> ${P}-github.tar.gz"
  9. LICENSE="LGPL-2.1"
  10. SLOT="0"
  11. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
  12. IUSE="static-libs subunit"
  13. RDEPEND="subunit? ( >=dev-python/subunit-0.0.10-r1[${MULTILIB_USEDEP}] )"
  14. DEPEND="${RDEPEND}
  15. virtual/pkgconfig"
  16. pkg_setup() {
  17. # See multilib_src_test(), disable sleep()-based tests because they
  18. # just take a long time doing pretty much nothing.
  19. export CPPFLAGS="-DTIMEOUT_TESTS_ENABLED=0 ${CPPFLAGS}"
  20. }
  21. src_prepare() {
  22. sed -i -e '/^docdir =/d' {.,doc}/Makefile.am \
  23. || die 'failed to unset docdir in Makefile.am'
  24. eautoreconf
  25. }
  26. src_configure() {
  27. local myeconfargs=(
  28. --disable-dependency-tracking
  29. $(use_enable subunit)
  30. --docdir="${EPREFIX}/usr/share/doc/${PF}"
  31. )
  32. autotools-multilib_src_configure
  33. }
  34. multilib_src_test() {
  35. elog "-DTIMEOUT_TESTS_ENABLED=0 has been prepended to CPPFLAGS. To run the"
  36. elog "entire testsuite for dev-libs/check, ensure that"
  37. elog "-DTIMEOUT_TESTS_ENABLED=1 is in your CPPFLAGS."
  38. default_src_test
  39. }
  40. src_install() {
  41. autotools-multilib_src_install
  42. dodoc AUTHORS *ChangeLog* NEWS README THANKS TODO
  43. rm -f "${ED}/usr/share/doc/${PF}"/COPYING* || \
  44. die 'failed to remove COPYING files'
  45. }