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 )"
22 modelfit? ( sci-libs/atlas[lapack,threads=] sci-libs/fftw:3.0 )"
24 modelfit? ( ${AUTOTOOLS_DEPEND} )"
26 REQUIRED_USE="test? ( modelfit )"
29 "${FILESDIR}/${P}-fix-format-errors.patch"
30 "${FILESDIR}/${P}-have-malloc.patch"
31 "${FILESDIR}/${P}-have-mmap.patch"
32 "${FILESDIR}/${P}-sigbus.patch"
38 local mycblas=atlcblas myclapack=atlclapack
40 [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptcblas.so ]] && \
42 [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptclapack.so ]] && \
46 -e "s/-lcblas/-l${mycblas}/g" \
47 -e "s/AC_CHECK_LIB(cblas/AC_CHECK_LIB(${mycblas}/g" \
48 -e "s/-llapack/-l${myclapack}/g" \
49 -e "s/AC_CHECK_LIB(lapack/AC_CHECK_LIB(${myclapack}/g" \
57 --with-atlas-incdir="${EPREFIX}/usr/include/atlas" \
58 $(use_enable modelfit model-fitting) \
64 CONFDIR=/usr/share/sextractor
67 use doc && dodoc doc/*
71 elog "SExtractor examples configuration files are located in"
72 elog "${EROOT%/}/${CONFDIR} and are not loaded anymore by default."