public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-astronomy/astrometry/files/, sci-astronomy/astrometry/
@ 2016-03-01 22:47 Sebastien Fabbro
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastien Fabbro @ 2016-03-01 22:47 UTC (permalink / raw
  To: gentoo-commits

commit:     3190a49bb37f43eafde10e486a83f083ff1c1771
Author:     Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  1 23:07:49 2016 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Tue Mar  1 23:42:56 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3190a49b

sci-astronomy/astrometry: Initial import (major bump from science overlay)

Package-Manager: portage-2.2.27

 sci-astronomy/astrometry/Manifest                  |   1 +
 sci-astronomy/astrometry/astrometry-0.67.ebuild    | 105 +++++++++++++++++++++
 .../astrometry/files/astrometry-0.67-dynlink.patch |  78 +++++++++++++++
 .../astrometry/files/astrometry-0.67-soname.patch  |  25 +++++
 sci-astronomy/astrometry/metadata.xml              |  18 ++++
 5 files changed, 227 insertions(+)

diff --git a/sci-astronomy/astrometry/Manifest b/sci-astronomy/astrometry/Manifest
new file mode 100644
index 0000000..e29b4f7
--- /dev/null
+++ b/sci-astronomy/astrometry/Manifest
@@ -0,0 +1 @@
+DIST astrometry.net-0.67.tar.gz 10941863 SHA256 e351c81f7787550d42d45855db394a1702fd17c249ba934bdf4b6abf56281446 SHA512 f087e5a73a9881b1d4b1e4c205d45dc8b8663c304d8d1c1369a8427884df49fc8331fafeb5dc63648c2670b41a2626745568f6f11943bac56972db2d2bb11ddb WHIRLPOOL f4f71a54dd2694d0e98168e98e31846c7423c7cf593c0a629fa825e67b596ce3fa191719ef8cf3f52c1d0d641307e720176a977f28ffb1cffb0c60071f729af6

diff --git a/sci-astronomy/astrometry/astrometry-0.67.ebuild b/sci-astronomy/astrometry/astrometry-0.67.ebuild
new file mode 100644
index 0000000..df51244
--- /dev/null
+++ b/sci-astronomy/astrometry/astrometry-0.67.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+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="BSD GPL-2 GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples extra"
+
+RDEPEND="
+	dev-python/numpy[${PYTHON_USEDEP}]
+	sci-astronomy/wcslib:0=
+	sci-libs/cfitsio:0=
+	sci-libs/gsl:0=
+	sys-libs/zlib:0=
+	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}"
+
+PATCHES=(
+	"${FILESDIR}/${P}-soname.patch"
+	"${FILESDIR}/${P}-dynlink.patch"
+)
+
+src_prepare() {
+	default
+	# fix python scripts
+	python_fix_shebang "${S}"
+	sed -e "s|python setup-util.py|${EPYTHON} setup-util.py|" -i util/Makefile || die
+	sed -e "s|python setup.py|${EPYTHON} setup.py|" -i {libkd,sdss,blind}/Makefile || die
+	sed -e "s|python -c|${EPYTHON} -c|" -i blind/Makefile || die
+	sed -e "s|python <<EOF|${EPYTHON} <<EOF|" -i util/simplexy.c || die
+	sed -e "s|python -V|${EPYTHON} -V|" -i Makefile || die
+	# respect use compilation flags
+	sed -e '/-O3/d' -e '/-fomit-frame-pointer/d' -i util/makefile.common || die
+	# as-needed
+	sed -e "s|-lm|$(pkg-config --libs wcslib gsl)|" -i util/Makefile || die
+	export SYSTEM_GSL=yes
+}
+
+src_compile() {
+	tc-export CC RANLIB AR
+	emake
+	emake py
+	use extra && 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" \
+		FINAL_DIR="${EPREFIX}usr" \
+		DATA_FINAL_DIR="${EPREFIX}usr/share/astrometry" \
+		$@
+}
+
+src_install() {
+	ap_make install-core
+	ap_make -C util install
+	use extra && ap_make -C blind install-extra
+
+	# remove cfitsio duplicates and non installable libraries
+	rm "${ED}"/usr/bin/{fitscopy,imcopy,listhead} || die
+	rm "${ED}"/usr/$(get_libdir)/lib*.a || die
+
+	# remove license file
+	rm "${ED}"/usr/share/doc/${PF}/LICENSE || die
+	use examples || rm -r "${ED}"/usr/share/doc/${PF}/examples
+}

diff --git a/sci-astronomy/astrometry/files/astrometry-0.67-dynlink.patch b/sci-astronomy/astrometry/files/astrometry-0.67-dynlink.patch
new file mode 100644
index 0000000..64b87c0
--- /dev/null
+++ b/sci-astronomy/astrometry/files/astrometry-0.67-dynlink.patch
@@ -0,0 +1,78 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Dynamically link to libastrometry.so, when possible
+--- a/blind/Makefile
++++ b/blind/Makefile
+@@ -43,9 +43,7 @@
+ 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 @@
+ 	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 @@
+ 	$(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.
+--- a/util/Makefile
++++ b/util/Makefile
+@@ -86,8 +86,7 @@
+ 
+ LDFLAGS += $(LDFLAGS_DEF)
+ 
+-LDLIBS := $(LDLIBS_DEF)
+-LDLIBS += $(ANFILES_LIB)
++LDLIBS := $(LDLIBS_DEF) -lm
+ 
+ SHAREDLIBFLAGS := $(SHAREDLIBFLAGS_DEF)
+ 
+@@ -122,8 +121,7 @@
+ 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 @@
+ 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
+--- a/libkd/Makefile
++++ b/libkd/Makefile
+@@ -90,8 +90,7 @@
+ 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/sci-astronomy/astrometry/files/astrometry-0.67-soname.patch b/sci-astronomy/astrometry/files/astrometry-0.67-soname.patch
new file mode 100644
index 0000000..595dd79
--- /dev/null
+++ b/sci-astronomy/astrometry/files/astrometry-0.67-soname.patch
@@ -0,0 +1,25 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Add SONAME to libastrometry.so
+--- a/blind/Makefile
++++ b/blind/Makefile
+@@ -148,7 +148,8 @@
+ 	$(RANLIB) $@
+ 
+ $(ENGINE_SO): $(ENGINE_OBJS) $(SLIB)
+-	$(CC) $(LDFLAGS) $(SHAREDLIBFLAGS) -o $@ $^ $(LDLIBS)
++	$(CC) $(LDFLAGS) $(SHAREDLIBFLAGS) -Wl,-soname,$@.0 -o $@.0 $^ $(LDLIBS)
++	ln -s  $@.0 $@
+ 
+ # old and miscellaneous executables that aren't part of the pipeline.
+ OLDEXECS := plotquads rawstartree checkquads
+@@ -233,8 +234,8 @@
+ 	done
+ 	mkdir -p '$(LIB_INSTALL_DIR)'
+ 	@for x in $(INSTALL_LIB); do \
+-		echo cp $$x '$(LIB_INSTALL_DIR)'; \
+-		cp $$x '$(LIB_INSTALL_DIR)'; \
++		echo cp -d $$x* '$(LIB_INSTALL_DIR)'; \
++		cp -d $$x* '$(LIB_INSTALL_DIR)'; \
+ 	done
+ 	mkdir -p '$(PY_INSTALL_DIR)'
+ 	@for x in $(PYTHON_INSTALL); do \

diff --git a/sci-astronomy/astrometry/metadata.xml b/sci-astronomy/astrometry/metadata.xml
new file mode 100644
index 0000000..a08f005
--- /dev/null
+++ b/sci-astronomy/astrometry/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="project">
+    <email>sci-astronomy@gentoo.org</email>
+    <name>Gentoo Astronomy Project</name>
+  </maintainer>
+  <longdescription lang="en">
+  If you have astronomical imaging of the sky with celestial
+  coordinates you do not know—or do not trust—then Astrometry.net is
+  for you. Input an image and we'll give you back astrometric
+  calibration meta-data, plus lists of known objects falling inside
+  the field of view.
+</longdescription>
+  <use>
+    <flag name="extra">Add extra tools for astrometry.net, specifically for plots</flag>
+  </use>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-astronomy/astrometry/files/, sci-astronomy/astrometry/
@ 2016-11-17 17:28 Sebastien Fabbro
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastien Fabbro @ 2016-11-17 17:28 UTC (permalink / raw
  To: gentoo-commits

commit:     80af1e25462e8f08484b82b17d9e67ac5a9c4712
Author:     Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 17 00:33:05 2016 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Thu Nov 17 17:26:47 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80af1e25

sci-astronomy/astrometry: fixed a few issues and cleanup
* missing slashes in configuration  (bug #595024)
* QA implicit declarations (bug #595162)
* download page and upstream release metadata
* remove extra USE flag, it needs graphics in all cases (bug #595160)

Package-Manager: portage-2.3.2

 ...ry-0.67-r1.ebuild => astrometry-0.67-r2.ebuild} | 50 +++++++++++-----------
 .../astrometry/files/astrometry-0.67-qsortr.patch  | 10 +++++
 sci-astronomy/astrometry/metadata.xml              |  6 +--
 3 files changed, 38 insertions(+), 28 deletions(-)

diff --git a/sci-astronomy/astrometry/astrometry-0.67-r1.ebuild b/sci-astronomy/astrometry/astrometry-0.67-r2.ebuild
similarity index 65%
rename from sci-astronomy/astrometry/astrometry-0.67-r1.ebuild
rename to sci-astronomy/astrometry/astrometry-0.67-r2.ebuild
index f46ffd0..d3149dc 100644
--- a/sci-astronomy/astrometry/astrometry-0.67-r1.ebuild
+++ b/sci-astronomy/astrometry/astrometry-0.67-r2.ebuild
@@ -12,25 +12,24 @@ MYP=${PN}.net-${PV}
 
 DESCRIPTION="Automated astrometric calibration programs and service"
 HOMEPAGE="http://astrometry.net/"
-SRC_URI="${HOMEPAGE}/downloads/${MYP}.tar.gz"
+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 extra"
+IUSE="examples"
 
 RDEPEND="
 	dev-python/astropy[${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=
-	extra? (
-		media-libs/libpng:0
-		media-libs/netpbm
-		virtual/jpeg:0
-		x11-libs/cairo )"
+	virtual/jpeg:0
+	x11-libs/cairo"
 DEPEND="${RDEPEND}
 	dev-lang/swig:0
 	virtual/pkgconfig"
@@ -38,8 +37,9 @@ DEPEND="${RDEPEND}
 S="${WORKDIR}/${MYP}"
 
 PATCHES=(
-	"${FILESDIR}/${P}-soname.patch"
-	"${FILESDIR}/${P}-dynlink.patch"
+	"${FILESDIR}"/${P}-soname.patch
+	"${FILESDIR}"/${P}-dynlink.patch
+	"${FILESDIR}"/${P}-qsortr.patch
 )
 
 src_prepare() {
@@ -54,15 +54,16 @@ src_prepare() {
 	# respect use compilation flags
 	sed -e '/-O3/d' -e '/-fomit-frame-pointer/d' -i util/makefile.common || die
 	# as-needed
-	sed -e "s|-lm|$(pkg-config --libs wcslib gsl)|" -i util/Makefile || die
+	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
-	use extra && emake extra
+	emake extra
 	emake report.txt
 }
 
@@ -78,30 +79,29 @@ src_test() {
 
 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" \
+		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" \
+		FINAL_DIR="${EPREFIX%/}/usr" \
+		DATA_FINAL_DIR="${EPREFIX%/}/usr/share/astrometry" \
 		$@
 }
 
 src_install() {
 	ap_make install-core
 	ap_make -C util install
-	use extra && ap_make -C blind install-extra
+	ap_make -C blind install-extra
 
-	# remove cfitsio duplicates and non installable libraries
+	# remove duplicates and non installable libraries
 	rm "${ED}"/usr/bin/{fitscopy,imcopy,listhead} || die
 	rm "${ED}"/usr/$(get_libdir)/lib*.a || die
-
-	# remove license file
 	rm "${ED}"/usr/share/doc/${PF}/LICENSE || die
+
 	use examples || rm -r "${ED}"/usr/share/doc/${PF}/examples
 }

diff --git a/sci-astronomy/astrometry/files/astrometry-0.67-qsortr.patch b/sci-astronomy/astrometry/files/astrometry-0.67-qsortr.patch
new file mode 100644
index 00000000..6a78688
--- /dev/null
+++ b/sci-astronomy/astrometry/files/astrometry-0.67-qsortr.patch
@@ -0,0 +1,10 @@
+--- a/util/test_qsort_r.c	2016-11-17 00:21:29.211561563 +0000
++++ b/util/test_qsort_r.c	2016-11-17 00:21:43.281493095 +0000
+@@ -5,6 +5,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
+ 
+ #include "cutest.h"
+ 

diff --git a/sci-astronomy/astrometry/metadata.xml b/sci-astronomy/astrometry/metadata.xml
index a08f005..2e74835 100644
--- a/sci-astronomy/astrometry/metadata.xml
+++ b/sci-astronomy/astrometry/metadata.xml
@@ -12,7 +12,7 @@
   calibration meta-data, plus lists of known objects falling inside
   the field of view.
 </longdescription>
-  <use>
-    <flag name="extra">Add extra tools for astrometry.net, specifically for plots</flag>
-  </use>
+<upstream>
+  <remote-id type="github">dstndstn/astrometry.net</remote-id>
+</upstream>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-17 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-17 17:28 [gentoo-commits] repo/gentoo:master commit in: sci-astronomy/astrometry/files/, sci-astronomy/astrometry/ Sebastien Fabbro
  -- strict thread matches above, loose matches on Subject: below --
2016-03-01 22:47 Sebastien Fabbro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox