dev-libs/libical: stable 3.0.5 for sparc, bug #688490
[gentoo.git] / dev-libs / libical / libical-3.0.5.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{5,6,7} )
7 inherit cmake-utils python-any-r1
8
9 DESCRIPTION="An implementation of basic iCAL protocols"
10 HOMEPAGE="https://github.com/libical/libical"
11 SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
12
13 LICENSE="|| ( MPL-2.0 LGPL-2.1 )"
14 SLOT="0/3"
15 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"
16 IUSE="berkdb doc examples static-libs test"
17
18 BDEPEND="
19         dev-lang/perl
20         virtual/pkgconfig
21         doc? ( app-doc/doxygen )
22         test? ( ${PYTHON_DEPS} )
23 "
24 # TODO: disabled until useful
25 #       glib? (
26 #               dev-libs/glib:2
27 #               dev-libs/libxml2:2
28 #       )
29 #       introspection? ( dev-libs/gobject-introspection:= )
30 DEPEND="
31         dev-libs/icu:=
32         berkdb? ( sys-libs/db:= )
33 "
34 RDEPEND="${DEPEND}
35         sys-libs/timezone-data
36 "
37
38 DOCS=(
39         AUTHORS ReadMe.txt ReleaseNotes.txt TEST THANKS TODO
40         doc/{AddingOrModifyingComponents,UsingLibical}.txt
41 )
42
43 PATCHES=(
44         "${FILESDIR}/${PN}-3.0.4-tests.patch"
45         "${FILESDIR}/${P}-pkgconfig-libdir.patch"
46         "${FILESDIR}/${P}-fix-lots-of-params.patch"
47 )
48
49 pkg_setup() {
50         use test && python-any-r1_pkg_setup
51 }
52
53 src_prepare() {
54         cmake-utils_src_prepare
55         use examples || cmake_comment_add_subdirectory examples
56 }
57
58 src_configure() {
59         local mycmakeargs=(
60                 -DICAL_GLIB=OFF
61                 -DICAL_GLIB_VAPI=OFF
62                 -DGOBJECT_INTROSPECTION=OFF
63                 $(cmake-utils_use_find_package berkdb BDB)
64                 -DICAL_BUILD_DOCS=$(usex doc)
65                 -DSHARED_ONLY=$(usex !static-libs)
66         )
67 #       TODO: disabled until useful
68 #               -DICAL_GLIB=$(usex glib)
69 #               -DGOBJECT_INTROSPECTION=$(usex introspection)
70         cmake-utils_src_configure
71 }
72
73 src_compile() {
74         cmake-utils_src_compile
75         use doc && cmake-utils_src_compile docs
76 }
77
78 src_test() {
79         local myctestargs=(
80                 -E "(icalrecurtest|icalrecurtest-r)" # bug 660282
81         )
82
83         cmake-utils_src_test
84 }
85
86 src_install() {
87         use doc && HTML_DOCS=( "${BUILD_DIR}"/apidocs/html/. )
88
89         cmake-utils_src_install
90
91         if use examples; then
92                 rm examples/CMakeLists.txt || die
93                 dodoc -r examples
94         fi
95 }