You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
1.6 KiB
72 lines
1.6 KiB
8 years ago
|
# Copyright 1999-2017 Gentoo Foundation
|
||
12 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
9 years ago
|
EAPI=6
|
||
12 years ago
|
|
||
|
FORTRAN_NEEDED=fortran
|
||
|
|
||
9 years ago
|
inherit fortran-2
|
||
12 years ago
|
|
||
|
DESCRIPTION="Astronomical World Coordinate System transformations library"
|
||
|
HOMEPAGE="http://www.atnf.csiro.au/people/mcalabre/WCS/"
|
||
|
SRC_URI="ftp://ftp.atnf.csiro.au/pub/software/${PN}/${P}.tar.bz2"
|
||
|
|
||
9 years ago
|
SLOT="0/5"
|
||
12 years ago
|
LICENSE="LGPL-3"
|
||
|
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||
9 years ago
|
IUSE="doc fortran fits pgplot static-libs +tools"
|
||
12 years ago
|
|
||
12 years ago
|
RDEPEND="
|
||
11 years ago
|
fits? ( sci-libs/cfitsio:0= )
|
||
|
pgplot? ( sci-libs/pgplot:0= )"
|
||
12 years ago
|
DEPEND="${RDEPEND}
|
||
12 years ago
|
sys-devel/flex
|
||
|
virtual/pkgconfig"
|
||
12 years ago
|
|
||
|
src_configure() {
|
||
11 years ago
|
local myconf=(
|
||
|
--docdir="${EPREFIX}"/usr/share/doc/${PF}
|
||
9 years ago
|
--htmldir="${EPREFIX}"/usr/share/doc/${PF}
|
||
11 years ago
|
$(use_enable fortran)
|
||
9 years ago
|
$(use_enable tools utils)
|
||
11 years ago
|
)
|
||
12 years ago
|
# hacks because cfitsio and pgplot directories are hard-coded
|
||
|
if use fits; then
|
||
|
myconf+=(
|
||
11 years ago
|
--with-cfitsioinc="${EPREFIX}/usr/include"
|
||
|
--with-cfitsiolib="${EPREFIX}/usr/$(get_libdir)"
|
||
12 years ago
|
)
|
||
|
else
|
||
|
myconf+=( --without-cfitsio )
|
||
|
fi
|
||
|
if use pgplot; then
|
||
|
myconf+=(
|
||
11 years ago
|
--with-pgplotinc="${EPREFIX}/usr/include"
|
||
|
--with-pgplotlib="${EPREFIX}/usr/$(get_libdir)"
|
||
12 years ago
|
)
|
||
|
else
|
||
|
myconf+=( --without-pgplot )
|
||
|
fi
|
||
11 years ago
|
econf ${myconf[@]}
|
||
9 years ago
|
sed -i -e 's/COPYING\*//' GNUmakefile || die
|
||
12 years ago
|
}
|
||
|
|
||
|
src_compile() {
|
||
11 years ago
|
# nasty makefile, debugging means probably full rewrite
|
||
12 years ago
|
emake -j1
|
||
|
}
|
||
|
|
||
|
src_test() {
|
||
|
emake -j1 check
|
||
|
}
|
||
|
|
||
|
src_install () {
|
||
|
default
|
||
9 years ago
|
# static libs share the same symbols as shared (i.e. compiled with PIC)
|
||
12 years ago
|
# so they are not compiled twice
|
||
|
use static-libs || rm "${ED}"/usr/$(get_libdir)/lib*.a
|
||
11 years ago
|
use doc || rm -r \
|
||
|
"${ED}"/usr/share/doc/${PF}/html \
|
||
12 years ago
|
"${ED}"/usr/share/doc/${PF}/*.pdf
|
||
|
}
|