dev-libs/libical: x86 stable (bug #587572)
[gentoo.git] / dev-libs / libical / libical-2.0.0-r3.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit cmake-utils
7
8 DESCRIPTION="An implementation of basic iCAL protocols"
9 HOMEPAGE="https://github.com/libical/libical"
10 SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="|| ( MPL-1.0 LGPL-2.1 )"
13 SLOT="0/2"
14 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"
15 IUSE="doc examples static-libs"
16
17 # The GOBJECT_INTROSPECTION build is broken, and upstream has given up
18 # on it at the moment (it's disabled in Travis). It will probably come
19 # back in v2.0.1 or later.
20 # This snippet belongs to RDEPEND:
21 # introspection? ( dev-libs/gobject-introspection )"
22 RDEPEND="dev-libs/icu:="
23 DEPEND="${RDEPEND}
24         dev-lang/perl"
25
26 DOCS=(
27         AUTHORS ReadMe.txt ReleaseNotes.txt TEST THANKS TODO
28         doc/{AddingOrModifyingComponents,UsingLibical}.txt
29 )
30
31 PATCHES=(
32         "${FILESDIR}/${P}-libical.pc-set-full-version.patch"
33         "${FILESDIR}/${P}-libical.pc-icu-remove-full-paths.patch"
34         "${FILESDIR}/${P}-libical.pc-icu-move-to-requires.patch"
35         "${FILESDIR}/${P}-libical.pc-fix-libdir-location.patch"
36         "${FILESDIR}/${P}-tests.patch" #bug 532296
37 )
38
39 src_configure() {
40         # See above, introspection is disabled for v2.0.0 at least.
41         #local mycmakeargs=(
42         #       -DGOBJECT_INTROSPECTION=$(usex introspection true false)
43         #)
44         use static-libs || mycmakeargs+=( -DSHARED_ONLY=ON )
45         cmake-utils_src_configure
46 }
47
48 src_test() {
49         local myctestargs=( -j1 )
50         cmake-utils_src_test
51 }
52
53 src_install() {
54         cmake-utils_src_install
55
56         if use examples; then
57                 rm examples/CMakeLists.txt || die
58                 dodoc -r examples
59         fi
60 }