1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{4,5,6} )
7 inherit cmake-utils python-any-r1
9 DESCRIPTION="An implementation of basic iCAL protocols"
10 HOMEPAGE="https://github.com/libical/libical"
11 SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
13 LICENSE="|| ( MPL-2.0 LGPL-2.1 )"
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"
18 # TODO: disabled until useful
23 # introspection? ( dev-libs/gobject-introspection:= )
26 berkdb? ( sys-libs/db:= )
28 DEPEND="${COMMON_DEPEND}
30 doc? ( app-doc/doxygen )
31 test? ( ${PYTHON_DEPS} )
33 RDEPEND="${COMMON_DEPEND}
34 sys-libs/timezone-data
38 AUTHORS ReadMe.txt ReleaseNotes.txt TEST THANKS TODO
39 doc/{AddingOrModifyingComponents,UsingLibical}.txt
42 PATCHES=( "${FILESDIR}/${P}-pkgconfig-libdir.patch" )
45 use test && python-any-r1_pkg_setup
49 cmake-utils_src_prepare
51 use doc || cmake_comment_add_subdirectory doc
52 use examples || cmake_comment_add_subdirectory examples
58 -DGOBJECT_INTROSPECTION=OFF
59 $(cmake-utils_use_find_package berkdb BDB)
60 -DSHARED_ONLY=$(usex !static-libs)
62 # TODO: disabled until useful
63 # -DICAL_GLIB=$(usex glib)
64 # -DGOBJECT_INTROSPECTION=$(usex introspection)
65 cmake-utils_src_configure
69 cmake-utils_src_compile
70 use doc && cmake-utils_src_compile docs
74 local myctestargs=( -j1 )
79 use doc && HTML_DOCS=( "${BUILD_DIR}"/apidocs/html/. )
81 cmake-utils_src_install
84 rm examples/CMakeLists.txt || die