public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/check/, dev-libs/check/files/
Date: Sat, 21 Mar 2020 08:53:44 +0000 (UTC)	[thread overview]
Message-ID: <1584780810.6c5026b88f869f521d85d6a130982c2e92f63e75.juippis@gentoo> (raw)

commit:     6c5026b88f869f521d85d6a130982c2e92f63e75
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 21 08:52:58 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Mar 21 08:53:30 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c5026b8

dev-libs/check: migrate to CMake, "fix" tests, revbump 0.14.0

Bug: https://bugs.gentoo.org/711390
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-libs/check/check-0.14.0-r1.ebuild              | 50 ++++++++++++++++++++++
 .../check-0.14.0-r1-disable-automagic-dep.patch    | 23 ++++++++++
 2 files changed, 73 insertions(+)

diff --git a/dev-libs/check/check-0.14.0-r1.ebuild b/dev-libs/check/check-0.14.0-r1.ebuild
new file mode 100644
index 00000000000..ff085a62e15
--- /dev/null
+++ b/dev-libs/check/check-0.14.0-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+inherit cmake-multilib
+
+DESCRIPTION="A unit test framework for C"
+HOMEPAGE="https://libcheck.github.io/check/"
+SRC_URI="https://github.com/lib${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc subunit test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="subunit? ( dev-python/subunit[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+	sys-apps/texinfo"
+BDEPEND="doc? ( app-doc/doxygen )"
+
+PATCHES=( "${FILESDIR}/check-0.14.0-r1-disable-automagic-dep.patch" )
+
+multilib_src_configure() {
+	local mycmakeargs=(
+		-DCHECK_ENABLE_TESTS=$(usex test ON OFF)
+		-DCHECK_ENABLE_SUBUNIT=$(usex subunit 1 0)
+	)
+
+	cmake_src_configure
+}
+
+multilib_src_compile() {
+	cmake_src_compile
+
+	if use doc && multilib_is_native_abi; then
+		cd "${S}"/doc/ || die "Failed to switch directories."
+		doxygen "." || die "Failed to run doxygen to generate docs."
+	fi
+}
+
+multilib_src_install_all() {
+	use doc && local HTML_DOCS=( "${S}"/doc/html/. )
+	einstalldocs
+
+	find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
+}

diff --git a/dev-libs/check/files/check-0.14.0-r1-disable-automagic-dep.patch b/dev-libs/check/files/check-0.14.0-r1-disable-automagic-dep.patch
new file mode 100644
index 00000000000..a79a7bcccdd
--- /dev/null
+++ b/dev-libs/check/files/check-0.14.0-r1-disable-automagic-dep.patch
@@ -0,0 +1,23 @@
+--- a/CMakeLists.txt	2020-03-21 09:42:30.411037664 +0200
++++ b/CMakeLists.txt	2020-03-21 09:49:12.358161439 +0200
+@@ -365,15 +365,16 @@
+   ADD_DEFINITIONS(-DHAVE_LIBRT=1)
+ endif (HAVE_LIBRT)
+
+-check_library_exists(subunit subunit_test_start "" HAVE_SUBUNIT)
+-if (HAVE_SUBUNIT)
++option(CHECK_ENABLE_SUBUNIT "Enable subunit support" ON)
++if (CHECK_ENABLE_SUBUNIT EQUAL 1)
+   set(SUBUNIT "subunit")
+   set(ENABLE_SUBUNIT 1)
++  set(HAVE_SUBUNIT 1)
+   add_definitions(-DENABLE_SUBUNIT=1)
+-else(HAVE_SUBUNIT)
++else(CHECK_ENABLE_SUBUNIT EQUAL 0)
+   set(ENABLE_SUBUNIT 0)
+   add_definitions(-DENABLE_SUBUNIT=0)
+-endif (HAVE_SUBUNIT)
++endif (CHECK_ENABLE_SUBUNIT)
+
+ ###############################################################################
+ # Generate "config.h" from "cmake/config.h.in"


             reply	other threads:[~2020-03-21  8:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-21  8:53 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-03-23 13:14 [gentoo-commits] repo/gentoo:master commit in: dev-libs/check/, dev-libs/check/files/ Joonas Niilola
2020-02-02  8:08 Joonas Niilola
2016-12-23  8:46 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1584780810.6c5026b88f869f521d85d6a130982c2e92f63e75.juippis@gentoo \
    --to=juippis@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox