dev-libs/glib: x86 stable (bug #677430)
[gentoo.git] / sci-astronomy / skycat / skycat-3.1.2-r2.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit autotools flag-o-matic
6
7 DESCRIPTION="ESO astronomical image visualizer with catalog access"
8 HOMEPAGE="http://archive.eso.org/skycat"
9 SRC_URI="http://archive.eso.org/cms/tools-documentation/skycat-download/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13
14 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
15 IUSE="threads"
16
17 DEPEND="x11-libs/libXext
18         >=dev-tcltk/tclx-2.4
19         >=dev-tcltk/blt-2.4
20         >=dev-tcltk/itcl-3.3
21         >=dev-tcltk/iwidgets-4.0.1
22         >=dev-tcltk/tkimg-1.3
23         sci-libs/cfitsio
24         sci-astronomy/wcstools"
25 RDEPEND="${DEPEND}"
26
27 PATCHES=(
28         "${FILESDIR}"/${P}-m4.patch # fix buggy tcl.m4 for bash3 and add soname
29         "${FILESDIR}"/${P}-makefile-qa.patch
30         "${FILESDIR}"/${PN}-3.0.2-systemlibs.patch # use system libs
31         "${FILESDIR}"/${PN}-3.0.2-tk8.5.patch # need fix for tk-8.5
32 )
33
34 src_prepare() {
35         default
36         rm -fr astrotcl/{cfitsio,libwcs} \
37                 || die "Failed to remove included libs"
38         # prefix it
39         sed -i \
40                 -e "s:/usr:${EPREFIX}/usr:g" \
41                 */configure.in */aclocal.m4 || die
42         local f
43         for f in configure.in */configure.in ; do
44                 mv "$f" "${f/.in/.ac}" || die
45         done
46         eautoreconf
47 }
48
49 src_configure() {
50         append-cppflags -DUSE_INTERP_RESULT  # 514604
51         econf $(use_enable threads) --enable-merge
52 }
53
54 src_install() {
55         default
56         local d f
57         for d in tclutil astrotcl rtd cat skycat; do
58                 for f in README CHANGES VERSION; do
59                         newdoc ${f} ${f}.${d}
60                 done
61         done
62 }