gnome-base/gnome-extra-apps: amd64 stable wrt bug #717144
[gentoo.git] / sci-libs / libqalculate / libqalculate-2.8.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 DESCRIPTION="A modern multi-purpose calculator library"
7 HOMEPAGE="https://qalculate.github.io/"
8 SRC_URI="https://github.com/Qalculate/${PN}/releases/download/v${PV}/${P}.tar.gz"
9
10 LICENSE="GPL-2"
11 SLOT="0/20"
12 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
13 IUSE="curl icu gnuplot readline static-libs"
14
15 COMMON_DEPEND="
16         dev-libs/gmp:0=
17         dev-libs/libxml2:2
18         dev-libs/mpfr:0=
19         virtual/libiconv
20         curl? ( net-misc/curl )
21         icu? ( dev-libs/icu:= )
22         readline? ( sys-libs/readline:0= )"
23 DEPEND="${COMMON_DEPEND}
24         dev-util/intltool
25         sys-devel/gettext
26         virtual/pkgconfig"
27 RDEPEND="${COMMON_DEPEND}
28         gnuplot? ( >=sci-visualization/gnuplot-3.7 )"
29
30 src_prepare() {
31         default
32
33         cat >po/POTFILES.skip <<-EOF
34         # Required by make check
35         data/currencies.xml.in
36         data/datasets.xml.in
37         data/elements.xml.in
38         data/functions.xml.in
39         data/planets.xml.in
40         data/units.xml.in
41         data/variables.xml.in
42         src/defs2doc.cc
43         EOF
44 }
45
46 src_configure() {
47         econf \
48                 $(use_enable static-libs static) \
49                 $(use_with curl libcurl) \
50                 $(use_with icu) \
51                 $(use_with readline)
52 }
53
54 src_install() {
55         # docs/reference/Makefile.am -> referencedir=
56         emake \
57                 DESTDIR="${D}" \
58                 referencedir="${EPREFIX}/usr/share/doc/${PF}/html" \
59                 install
60
61         dodoc AUTHORS ChangeLog NEWS README* TODO
62
63         find "${ED}" -name '*.la' -delete || die
64 }