*/*: [QA] Fix trivial cases of MissingTestRestrict
[gentoo.git] / media-libs / musicbrainz / musicbrainz-5.1.0.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit cmake-utils flag-o-matic
7
8 DESCRIPTION="Client Library for accessing the latest XML based MusicBrainz web service"
9 HOMEPAGE="https://musicbrainz.org/doc/libmusicbrainz"
10 SRC_URI="https://github.com/metabrainz/lib${PN}/releases/download/release-${PV}/lib${P}.tar.gz"
11
12 LICENSE="LGPL-2.1"
13 SLOT="5/1"      # soname of libmusicbrainz5.so
14 KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
15 IUSE="examples test"
16 RESTRICT="!test? ( test )"
17
18 RDEPEND="
19         dev-libs/libxml2
20         net-libs/neon
21 "
22 DEPEND="${RDEPEND}
23         test? ( dev-util/cppunit )
24 "
25
26 S="${WORKDIR}/lib${P}"
27
28 src_prepare() {
29         use test || cmake_comment_add_subdirectory tests
30         cmake-utils_src_prepare
31 }
32
33 src_configure() {
34         # bug 619668
35         append-cxxflags -std=c++14
36
37         cmake-utils_src_configure
38 }
39
40 src_install() {
41         cmake-utils_src_install
42
43         if use examples; then
44                 docinto examples
45                 dodoc examples/*.{c,cc,txt}
46                 docompress -x /usr/share/doc/${PF}/examples
47         fi
48 }