diff options
author | Sébastien Fabbro <bicatali@gentoo.org> | 2017-07-13 20:00:00 +0000 |
---|---|---|
committer | Sébastien Fabbro <bicatali@gentoo.org> | 2017-07-14 17:31:46 +0000 |
commit | 9bdc8b234834e623f4dfae3d13d636c25bdf69d3 (patch) | |
tree | 347af04d91bb087381536584005af2cac06ebeb3 /sci-astronomy/astrometry/astrometry-0.72.ebuild | |
parent | net-dns/unbound: Remove old versions (diff) | |
download | gentoo-9bdc8b234834e623f4dfae3d13d636c25bdf69d3.tar.gz gentoo-9bdc8b234834e623f4dfae3d13d636c25bdf69d3.tar.bz2 gentoo-9bdc8b234834e623f4dfae3d13d636c25bdf69d3.zip |
sci-astronomy/astrometry: version bump
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'sci-astronomy/astrometry/astrometry-0.72.ebuild')
-rw-r--r-- | sci-astronomy/astrometry/astrometry-0.72.ebuild | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/sci-astronomy/astrometry/astrometry-0.72.ebuild b/sci-astronomy/astrometry/astrometry-0.72.ebuild new file mode 100644 index 000000000000..0a59e2174f17 --- /dev/null +++ b/sci-astronomy/astrometry/astrometry-0.72.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# this could be a multiple python package +# but the way it is packaged makes it very time consuming. + +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="https://github.com/dstndstn/astrometry.net/releases/download/${PV}/${MYP}.tar.gz" + +LICENSE="BSD GPL-2 GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="examples" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + dev-python/astropy[${PYTHON_USEDEP}] + dev-python/fitsio[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + media-libs/libpng:0 + media-libs/netpbm + sci-astronomy/wcslib:0= + sci-libs/cfitsio:0= + sci-libs/gsl:0= + sys-libs/zlib:0= + virtual/jpeg:0 + x11-libs/cairo + ${PYTHON_DEPS}" +DEPEND="${RDEPEND} + dev-lang/swig:0 + virtual/pkgconfig" + +S="${WORKDIR}/${MYP}" + +PATCHES=( + "${FILESDIR}"/${PN}-0.67-soname.patch + "${FILESDIR}"/${PN}-0.67-qsortr.patch +) +# "${FILESDIR}"/${PN}-0.72-dynlink.patch + +src_prepare() { + default + # respect user compilation flags + sed -e '/-O3/d' \ + -e '/-fomit-frame-pointer/d' \ + -i util/makefile.common || die + # fix underlinking + sed -e "s|-lm|-lm $($(tc-getPKG_CONFIG) --libs wcslib gsl)|" \ + -i util/Makefile || die + export SYSTEM_GSL=yes +} + +src_compile() { + tc-export CC RANLIB AR + # fragile makefiles, build targets sequentially + emake + emake py + emake extra + emake report.txt +} + +src_test() { + emake test + local d + for d in util blind libkd; do + pushd ${d} > /dev/null + ./test || die "failed tests in ${d}" + popd ${d} > /dev/null + done +} + +ap_make() { + emake \ + INSTALL_DIR="${ED%/}/usr" \ + DATA_INSTALL_DIR="${ED%/}/usr/share/astrometry" \ + LIB_INSTALL_DIR="${ED%/}/usr/$(get_libdir)" \ + ETC_INSTALL_DIR="${ED%/}/etc" \ + MAN1_INSTALL_DIR="${ED%/}/usr/share/man/man1" \ + DOC_INSTALL_DIR="${ED%/}/usr/share/doc/${PF}" \ + EXAMPLE_INSTALL_DIR="${ED%/}/usr/share/doc/${PF}/examples" \ + PY_BASE_INSTALL_DIR="${ED%/}$(python_get_sitedir)/astrometry" \ + PY_BASE_LINK_DIR="../$(python_get_sitedir | sed -e 's|/usr/||')/astrometry" \ + FINAL_DIR="${EPREFIX%/}/usr" \ + DATA_FINAL_DIR="${EPREFIX%/}/usr/share/astrometry" \ + $@ +} + +src_install() { + ap_make install-core + ap_make -C util install + ap_make -C blind install-extra + + # remove duplicates and non installable libraries + # cfitsio + rm "${ED}"/usr/bin/{fitscopy,imcopy,listhead} || die + # cfitsio utilities + rm "${ED}"/usr/bin/{fitsverify,imarith,imstat,liststruc,modhead,tablist,tabmerge} || die + rm "${ED}"/usr/$(get_libdir)/lib*.a || die + rm "${ED}"/usr/share/doc/${PF}/LICENSE || die + + if use examples; then + docompress -x /usr/share/doc/${PF}/examples + else + rm -r "${ED}"/usr/share/doc/${PF}/examples || die + fi +} |