1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 AUTOTOOLS_AUTO_DEPEND=no
10 DESCRIPTION="Extract catalogs of sources from astronomical FITS images"
11 HOMEPAGE="http://www.astromatic.net/software/sextractor"
12 SRC_URI="http://www.astromatic.net/download/${PN}/${P}.tar.gz"
13 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
18 IUSE="doc modelfit test threads"
19 RESTRICT="!test? ( test )"
23 modelfit? ( sci-libs/atlas[lapack,threads=] sci-libs/fftw:3.0 )"
25 modelfit? ( ${AUTOTOOLS_DEPEND} )"
27 REQUIRED_USE="test? ( modelfit )"
30 "${FILESDIR}/${P}-fix-format-errors.patch"
31 "${FILESDIR}/${P}-have-malloc.patch"
32 "${FILESDIR}/${P}-have-mmap.patch"
33 "${FILESDIR}/${P}-sigbus.patch"
39 local mycblas=atlcblas myclapack=atlclapack
41 [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptcblas.so ]] && \
43 [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptclapack.so ]] && \
47 -e "s/-lcblas/-l${mycblas}/g" \
48 -e "s/AC_CHECK_LIB(cblas/AC_CHECK_LIB(${mycblas}/g" \
49 -e "s/-llapack/-l${myclapack}/g" \
50 -e "s/AC_CHECK_LIB(lapack/AC_CHECK_LIB(${myclapack}/g" \
58 --with-atlas-incdir="${EPREFIX}/usr/include/atlas" \
59 $(use_enable modelfit model-fitting) \
65 CONFDIR=/usr/share/sextractor
68 use doc && dodoc doc/*
72 elog "SExtractor examples configuration files are located in"
73 elog "${EROOT%/}/${CONFDIR} and are not loaded anymore by default."