sys-process/glances: revbump 3.1.4.1, add missing doc dep
[gentoo.git] / sci-visualization / spyview / spyview-2018.12.24.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 inherit autotools flag-o-matic
7
8 DESCRIPTION="2D and 3D data visualization and analysis program"
9 HOMEPAGE="https://github.com/gsteele13/spyview"
10
11 if [[ ${PV} == *9999* ]] ; then
12         inherit git-r3
13         EGIT_REPO_URI="https://github.com/gsteele13/spyview.git"
14 else
15         SRC_URI="https://github.com/gsteele13/spyview/archive/710b9ddb6aa00fada1a758d42b57b75f92bb32a7.tar.gz -> ${P}.tgz"
16         KEYWORDS="amd64 ~x86"
17 fi
18
19 LICENSE="GPL-3"
20 SLOT="0"
21 IUSE=""
22
23 COMMON_DEPEND="
24         >=dev-libs/boost-1.62.0:=
25         media-libs/netpbm
26         x11-libs/fltk:1[opengl]
27         app-text/ghostscript-gpl
28         virtual/glu
29 "
30
31 DEPEND="${COMMON_DEPEND}
32         sys-apps/groff"
33
34 RDEPEND="${COMMON_DEPEND}
35         sci-visualization/gnuplot"
36
37 src_unpack() {
38         if [[ ${PV} == *9999* ]] ; then
39                 git-r3_src_unpack
40                 S="${WORKDIR}/${P}/source"
41         else
42                 default
43                 mv -v "${WORKDIR}"/spyview-*/source "${S}" || die
44         fi
45 }
46
47 src_prepare() {
48         append-cflags $(fltk-config --cflags)
49         append-cxxflags $(fltk-config --cxxflags)
50
51         append-cxxflags -std=c++14
52
53         append-cppflags -I"${EPREFIX}"/usr/include/netpbm
54
55         # append-ldflags $(fltk-config --ldflags)
56         # this one leads to an insane amount of warnings
57         append-ldflags -L$(dirname $(fltk-config --libs))
58
59         while IFS="" read -d $'\0' -r file; do
60                 sed -i -e 's:-mwindows -mconsole::g' "$file" || die
61         done < <(find "${S}" -name Makefile.am -print0)
62
63         if [[ ${PV} == *9999* ]] ; then
64                 eapply_user
65         else
66                 default
67         fi
68         eautoreconf
69 }