diff options
Diffstat (limited to 'sci-astronomy/astrometry/astrometry-0.64.ebuild')
-rw-r--r-- | sci-astronomy/astrometry/astrometry-0.64.ebuild | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/sci-astronomy/astrometry/astrometry-0.64.ebuild b/sci-astronomy/astrometry/astrometry-0.64.ebuild new file mode 100644 index 0000000..c39537c --- /dev/null +++ b/sci-astronomy/astrometry/astrometry-0.64.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit eutils toolchain-funcs python-single-r1 + +MYP=${PN}.net-${PV} + +DESCRIPTION="Automated astrometric calibration programs and service" +HOMEPAGE="http://astrometry.net/" +SRC_URI="${HOMEPAGE}/downloads/${MYP}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="examples extra python" + +RDEPEND=" + dev-python/numpy[${PYTHON_USEDEP}] + sci-astronomy/wcslib + sci-libs/cfitsio + sci-libs/gsl + sys-libs/zlib + virtual/pyfits[${PYTHON_USEDEP}] + extra? ( + media-libs/libpng:0 + media-libs/netpbm + virtual/jpeg:0 + x11-libs/cairo )" +DEPEND="${RDEPEND} + dev-lang/swig:0 + virtual/pkgconfig" + +S="${WORKDIR}/${MYP}" + +src_prepare() { + epatch "${FILESDIR}"/0.64-as-needed.patch + epatch "${FILESDIR}"/0.64-respect-user-flags.patch + python_fix_shebang "${S}" + sed "s|python setup-util.py|${EPYTHON} setup-util.py|" "${S}"/util/Makefile -i || die + sed "s|python setup.py|${EPYTHON} setup.py|" "${S}"/{libkd,sdss,blind}/Makefile -i || die + sed "s|python -c|${EPYTHON} -c|" "${S}"/blind/Makefile -i || die + sed "s|python -V|${EPYTHON} -V|" "${S}"/Makefile -i || die +} + +src_compile() { + emake \ + CC=$(tc-getCC) \ + RANLIB=$(tc-getRANLIB) \ + AR=$(tc-getAR) \ + all report.txt + if use extra; then + emake \ + CC=$(tc-getCC) \ + RANLIB=$(tc-getRANLIB) \ + AR=$(tc-getAR) \ + extra + fi + + if use python; then + emake \ + CC=$(tc-getCC) \ + RANLIB=$(tc-getRANLIB) \ + AR=$(tc-getAR) \ + py + fi +} + +src_install() { + export INSTALL_DIR="${ED}"/usr + export DATA_INSTALL_DIR="${INSTALL_DIR}"/share/"${PN}"/data + export BIN_INSTALL_DIR="${INSTALL_DIR}"/bin + export INCLUDE_INSTALL_DIR="${INSTALL_DIR}"/include/"${PN}" + export LIB_INSTALL_DIR="${INSTALL_DIR}"/lib + python_export python2.7 + export PY_BASE_INSTALL_DIR="${LIB_INSTALL_DIR}"/"${EPYTHON}"/"${PN}" + export PY_BASE_LINK_DIR=../lib/"${EPYTHON}"/"${PN}" + export ETC_INSTALL_DIR="${INSTALL_DIR}"/share/"${PN}"/etc + export DOC_INSTALL_DIR="${INSTALL_DIR}"/share/doc/"${PF}" + export UPS_INSTALL_DIR="${DOC_INSTALL_DIR}"/ups + export EXAMPLES_INSTALL_DIR="${DOC_INSTALL_DIR}"/examples + + emake install-core + use extra && emake -C blind install-extra + + # remove cfitsio duplicates + rm ${INSTALL_DIR}/bin/{fitscopy,imcopy,listhead} || die +}
\ No newline at end of file |