media-libs/musicbrainz: Disable unittests if USE=!test
authorAndreas Sturmlechner <asturm@gentoo.org>
Fri, 10 Nov 2017 12:35:15 +0000 (13:35 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Fri, 10 Nov 2017 12:37:58 +0000 (13:37 +0100)
Closes: https://bugs.gentoo.org/603112
Package-Manager: Portage-2.3.8, Repoman-2.3.4

media-libs/musicbrainz/musicbrainz-3.0.3.ebuild
media-libs/musicbrainz/musicbrainz-5.1.0.ebuild

index f30c547810f88abcd5ec3ffa3454900ac305d8ab..4bb2649b464474e91b7671e7934e68ec2cf16a36 100644 (file)
@@ -1,5 +1,6 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
+
 EAPI=5
 
 inherit cmake-utils
@@ -26,3 +27,10 @@ CMAKE_IN_SOURCE_BUILD=true
 DOCS="README.txt NEWS.txt AUTHORS.txt"
 
 PATCHES=( "${FILESDIR}/${PN}-3.0.2-gcc44.patch" )
+
+src_configure() {
+       local mycmakeargs=(
+               $(cmake-utils_use_find_package test CppUnit)
+       )
+       cmake-utils_src_configure
+}
index f8f09eb468ed67cc7c7bf683c6b53cdbcece4448..420253156f0b4765328221953fe9a1dc51fa0c82 100644 (file)
@@ -24,6 +24,11 @@ DEPEND="${RDEPEND}
 
 S="${WORKDIR}/lib${P}"
 
+src_prepare() {
+       use test || cmake_comment_add_subdirectory tests
+       cmake-utils_src_prepare
+}
+
 src_install() {
        cmake-utils_src_install