7bd3382acf0d6a2ecab17229b82525c5d252c012
[gentoo.git] / dev-libs / libical / libical-2.0.0-r2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit cmake-utils
6
7 DESCRIPTION="An implementation of basic iCAL protocols"
8 HOMEPAGE="https://github.com/libical/libical"
9 SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
10
11 LICENSE="|| ( MPL-1.0 LGPL-2.1 )"
12 SLOT="0/2"
13 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
14 IUSE="doc examples static-libs"
15
16 # The GOBJECT_INTROSPECTION build is broken, and upstream has given up
17 # on it at the moment (it's disabled in Travis). It will probably come
18 # back in v2.0.1 or later.
19 # This snippet belongs to RDEPEND:
20 # introspection? ( dev-libs/gobject-introspection )"
21 RDEPEND="dev-libs/icu:="
22 DEPEND="${RDEPEND}
23         dev-lang/perl"
24
25 DOCS=(
26         AUTHORS ReadMe.txt ReleaseNotes.txt TEST THANKS TODO
27         doc/{AddingOrModifyingComponents,UsingLibical}.txt
28 )
29
30 PATCHES=( "${FILESDIR}/fix-libdir-location.patch" )
31
32 src_configure() {
33         # See above, introspection is disabled for v2.0.0 at least.
34         #local mycmakeargs=(
35         #       -DGOBJECT_INTROSPECTION=$(usex introspection true false)
36         #)
37         use static-libs || mycmakeargs+=( -DSHARED_ONLY=ON )
38         cmake-utils_src_configure
39 }
40
41 src_install() {
42         cmake-utils_src_install
43
44         if use examples; then
45                 rm examples/CMakeLists.txt || die
46                 dodoc -r examples
47         fi
48 }