caf03e64836013da92bc0c4a543d276d4c6dce3c
[gentoo.git] / app-text / libetonyek / libetonyek-0.1.6.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 EGIT_REPO_URI="git://anongit.freedesktop.org/git/libreoffice/libetonyek"
7 inherit autotools
8 [[ ${PV} == 9999 ]] && inherit git-r3
9
10 DESCRIPTION="Library parsing Apple Keynote presentations"
11 HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/libetonyek"
12 [[ ${PV} == 9999 ]] || SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz"
13
14 LICENSE="|| ( GPL-2+ LGPL-2.1 MPL-1.1 )"
15 SLOT="0"
16 [[ ${PV} == 9999 ]] || \
17 KEYWORDS="amd64 ~arm x86"
18 IUSE="doc static-libs test"
19
20 RDEPEND="
21         >=app-text/liblangtag-0.5
22         dev-libs/librevenge
23         dev-libs/libxml2
24         sys-libs/zlib
25 "
26 DEPEND="${RDEPEND}
27         dev-libs/boost
28         >=dev-util/mdds-1.2.0:1
29         media-libs/glm
30         sys-devel/libtool
31         virtual/pkgconfig
32         doc? ( app-doc/doxygen )
33         test? ( dev-util/cppunit )
34 "
35
36 PATCHES=(
37         "${FILESDIR}/${P}-mdds-1.2.patch" # patch taken from Debian
38         "${FILESDIR}/${P}-drop-test.patch" # bug 595022
39 )
40
41 pkg_pretend() {
42         if [[ $(gcc-major-version) -lt 4 ]] || {
43                 [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 8 ]]; }
44         then
45                 eerror "Compilation with gcc older than 4.8 is not supported"
46                 die "Too old gcc found."
47         fi
48 }
49
50 src_prepare() {
51         default
52         [[ -d m4 ]] || mkdir "m4"
53         eautoreconf
54 }
55
56 src_configure() {
57         econf \
58                 --disable-werror \
59                 $(use_with doc docs) \
60                 $(use_enable static-libs static) \
61                 $(use_enable test tests)
62 }
63
64 src_install() {
65         default
66         find "${D}" -name '*.la' -delete || die
67 }