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 | |
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')
-rw-r--r-- | sci-astronomy/astrometry/Manifest | 1 | ||||
-rw-r--r-- | sci-astronomy/astrometry/astrometry-0.72.ebuild | 115 | ||||
-rw-r--r-- | sci-astronomy/astrometry/files/astrometry-0.72-dynlink.patch | 92 |
3 files changed, 208 insertions, 0 deletions
diff --git a/sci-astronomy/astrometry/Manifest b/sci-astronomy/astrometry/Manifest index 8dfe102eac12..e1e4aa28ff03 100644 --- a/sci-astronomy/astrometry/Manifest +++ b/sci-astronomy/astrometry/Manifest @@ -1,2 +1,3 @@ DIST astrometry.net-0.67.tar.gz 10941863 SHA256 e351c81f7787550d42d45855db394a1702fd17c249ba934bdf4b6abf56281446 SHA512 f087e5a73a9881b1d4b1e4c205d45dc8b8663c304d8d1c1369a8427884df49fc8331fafeb5dc63648c2670b41a2626745568f6f11943bac56972db2d2bb11ddb WHIRLPOOL f4f71a54dd2694d0e98168e98e31846c7423c7cf593c0a629fa825e67b596ce3fa191719ef8cf3f52c1d0d641307e720176a977f28ffb1cffb0c60071f729af6 DIST astrometry.net-0.70.tar.gz 11195158 SHA256 e087b26b3f3821e63ba3c4d1f6a5cc342784c5ab938c05d59b75ba91b2866b6a SHA512 27e1dd27d69427bdff46613723423048959e447662126d25c8b2fbab571d09b834e4085e5a4a9a9f6e8122ff0868a1762a335086de8f674f49fdbc7374299409 WHIRLPOOL 8e8faf78913503ffa347bd2ce0bf0ca7931f3ee43c6191da098873853b970371be17c431d39edc9c95fd189b3058de7e81032c1f3440d4973b353dc5e4f1ca59 +DIST astrometry.net-0.72.tar.gz 11339766 SHA256 c9f3c2c70847d8ac835f4eb3cfccdcfe938ad8762acea7dd18acbf84c7e97cb6 SHA512 6fa63ea1075b267ebbe0a5aea4c66679b552350b206f098fb64f69f0e13fb9f8cf9c12e3fbc18942a444165cfd68251201dee9e18d6ebb01a2f16899675c70ff WHIRLPOOL 88c5095f8a345c5abaa85a37a353545f37e5d68238bb8f59ed9a764d876b1c158ede2be1840dace1709ff7c6b979e302418b0962a6e5d450c80861f973075866 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 +} diff --git a/sci-astronomy/astrometry/files/astrometry-0.72-dynlink.patch b/sci-astronomy/astrometry/files/astrometry-0.72-dynlink.patch new file mode 100644 index 000000000000..371a2129bd58 --- /dev/null +++ b/sci-astronomy/astrometry/files/astrometry-0.72-dynlink.patch @@ -0,0 +1,92 @@ +From: Ole Streicher <olebole@debian.org> +Date: Thu, 1 Dec 2016 21:18:56 +0100 +Subject: Dynamically link to libastrometry.so, when possible + +--- + blind/Makefile | 10 ++++------ + libkd/Makefile | 3 +-- + util/Makefile | 8 +++----- + 3 files changed, 8 insertions(+), 13 deletions(-) + +diff --git a/blind/Makefile b/blind/Makefile +index 33895df..6e7c55c 100644 +--- a/blind/Makefile ++++ b/blind/Makefile +@@ -43,9 +43,7 @@ LDFLAGS := $(LDFLAGS_DEF) + LDLIBS := $(LDLIBS_DEF) + LDLIBS += $(ANFILES_LIB) + +-SLIB := $(ENGINE_LIB) +-SLIB += $(CATS_SLIB) +-SLIB += $(ANFILES_SLIB) ++SLIB := $(ENGINE_SO) + + CAIRO_SLIB := $(COMMON)/cairoutils.o + CAIRO_SLIB += $(SLIB) +@@ -131,7 +129,7 @@ ENGINE_OBJS += new-wcs.o fits-guess-scale.o cut-table.o \ + resort-xylist.o + + BUILD_INDEX_OBJS := build-index.o uniformize-catalog.o startree2.o hpquads.o \ +- quad-builder.o quad-utils.o codefile.o codetree.o unpermute-stars.o \ ++ quad-builder.o codefile.o codetree.o unpermute-stars.o \ + unpermute-quads.o merge-index.o + ENGINE_OBJS += $(BUILD_INDEX_OBJS) + +@@ -147,8 +145,8 @@ $(ENGINE_LIB): $(ENGINE_OBJS) + $(AR) rc $@ $(ENGINE_OBJS) + $(RANLIB) $@ + +-$(ENGINE_SO): $(ENGINE_OBJS) $(SLIB) +- $(CC) $(LDFLAGS) $(SHAREDLIBFLAGS) -Wl,-soname,$@.0 -o $@.0 $^ $(LDLIBS) ++$(ENGINE_SO): $(ENGINE_LIB) $(CATS_SLIB) $(ANFILES_SLIB) ++ $(CC) $(LDFLAGS) $(SHAREDLIBFLAGS) -Wl,-soname,$@.0 -o $@.0 -Wl,--whole-archive $^ -Wl,--no-whole-archive $(LDLIBS) -lpthread + ln -s $@.0 $@ + + # old and miscellaneous executables that aren't part of the pipeline. +diff --git a/libkd/Makefile b/libkd/Makefile +index f535986..0442518 100644 +--- a/libkd/Makefile ++++ b/libkd/Makefile +@@ -90,8 +90,7 @@ py: pyspherematch + PYSPHEREMATCH_OBJ := pyspherematch.o + + spherematch_c$(PYTHON_SO_EXT): pyspherematch.c setup.py $(SLIB) +- LDFLAGS="$(LDFLAGS)" LDLIBS="$(LDLIBS)" \ +- SLIB="$(SLIB)" \ ++ LDFLAGS="$(LDFLAGS)" LDLIBS="-L../blind -lastrometry" \ + INC="$(INC)" \ + CFLAGS="$(CFLAGS)" \ + $(PYTHON) setup.py build_ext --inplace --force --build-temp . +diff --git a/util/Makefile b/util/Makefile +index f88df1b..0ecf716 100644 +--- a/util/Makefile ++++ b/util/Makefile +@@ -86,8 +86,7 @@ CFLAGS += -I. + + LDFLAGS += $(LDFLAGS_DEF) + +-LDLIBS := $(LDLIBS_DEF) +-LDLIBS += $(ANFILES_LIB) ++LDLIBS := $(LDLIBS_DEF) -lm + + SHAREDLIBFLAGS := $(SHAREDLIBFLAGS_DEF) + +@@ -122,8 +121,7 @@ ANUTILS_H := an-bool.h an-endian.h an-opts.h an-thread-pthreads.h \ + ANUTILS_H_PATH := $(addprefix $(INCLUDE_DIR)/,$(ANUTILS_H)) + + ifndef NO_QFITS +-ANUTILS_OBJ += fitsioutils.o sip_qfits.o fitstable.o fitsbin.o fitsfile.o \ +- tic.o ++ANUTILS_OBJ += fitsioutils.o sip_qfits.o fitstable.o fitsbin.o fitsfile.o + ANUTILS_DEPS += $(QFITS_LIB) + endif + +@@ -164,7 +162,7 @@ wcs-pv2sip: wcs-pv2sip.o $(ANUTILS_SLIB) + ALL_OBJ += wcs-pv2sip.o + + _util$(PYTHON_SO_EXT): util.i lanczos.i $(ANFILES_SLIB) +- LDFLAGS="$(LDFLAGS)" LDLIBS="$(LDLIBS)" SLIB="$(ANFILES_SLIB)" \ ++ LDFLAGS="$(LDFLAGS)" LDLIBS="-L../blind -lastrometry" \ + INC="$(ANFILES_INC)" CFLAGS="$(CFLAGS)" \ + $(PYTHON) setup.py build_ext -v --inplace --build-temp . + util.py: util.i lanczos.i |