summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2013-04-23 15:57:06 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2013-04-23 15:57:06 +0000
commitda2a83a1ba6763ca30b528d385f1120ca3b6c3e9 (patch)
treef44afd5f22a64211d46f91317b49c825352f27ea /sci-astronomy
parentAdded SOFA license (diff)
downloadgentoo-2-da2a83a1ba6763ca30b528d385f1120ca3b6c3e9.tar.gz
gentoo-2-da2a83a1ba6763ca30b528d385f1120ca3b6c3e9.tar.bz2
gentoo-2-da2a83a1ba6763ca30b528d385f1120ca3b6c3e9.zip
Initial import
(Portage version: 2.2.01.21890-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/sofa_c/ChangeLog9
-rw-r--r--sci-astronomy/sofa_c/files/sofa_c-makefile.patch102
-rw-r--r--sci-astronomy/sofa_c/metadata.xml23
-rw-r--r--sci-astronomy/sofa_c/sofa_c-20120301a.ebuild38
4 files changed, 172 insertions, 0 deletions
diff --git a/sci-astronomy/sofa_c/ChangeLog b/sci-astronomy/sofa_c/ChangeLog
new file mode 100644
index 000000000000..9ef4e33f4a5e
--- /dev/null
+++ b/sci-astronomy/sofa_c/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for sci-astronomy/sofa_c
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/sofa_c/ChangeLog,v 1.1 2013/04/23 15:57:06 bicatali Exp $
+
+*sofa_c-20120301a (23 Apr 2013)
+
+ 23 Apr 2013; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/sofa_c-makefile.patch, +metadata.xml, +sofa_c-20120301a.ebuild:
+ Initial import
diff --git a/sci-astronomy/sofa_c/files/sofa_c-makefile.patch b/sci-astronomy/sofa_c/files/sofa_c-makefile.patch
new file mode 100644
index 000000000000..e0f0cb26af0b
--- /dev/null
+++ b/sci-astronomy/sofa_c/files/sofa_c-makefile.patch
@@ -0,0 +1,102 @@
+--- makefile.orig 2013-04-23 08:51:44.357363792 -0700
++++ makefile 2013-04-23 08:52:06.663480924 -0700
+@@ -49,7 +49,7 @@
+
+ # Specify the installation home directory.
+
+-INSTALL_DIR = $(HOME)
++INSTALL_DIR = $(DESTDIR)/usr
+
+ # Specify the installation directory for the library.
+
+@@ -63,9 +63,10 @@
+ # of your preferred C compiler (CCOMPC) and compilation flags (CFLAGF
+ # for functions, CFLAGX for executables) here.
+
+-CCOMPC = gcc
+-CFLAGF = -c -pedantic -Wall -W -O
+-CFLAGX = -pedantic -Wall -W -O
++CCOMPC = $(CC)
++CFLAGF = -c -pedantic -Wall -W -fPIC $(CFLAGS)
++CFLAGX = -pedantic -Wall -W $(CFLAGS)
++
+
+ #----YOU SHOULDN'T HAVE TO MODIFY ANYTHING BELOW THIS LINE---------
+
+@@ -80,6 +81,12 @@
+ SOFA_LIB_NAME = libsofa_c.a
+ SOFA_LIB = $(SOFA_LIB_DIR)$(SOFA_LIB_NAME)
+
++
++# Name the SOFA/C library in its source and target locations.
++
++SOFA_SHLIB_NAME = libsofa_c.so
++SOFA_SHLIB = $(SOFA_LIB_DIR)$(SOFA_SHLIB_NAME)
++
+ # Name the SOFA/C testbed in its source and target locations.
+
+ SOFA_TEST_NAME = t_sofa_c.c
+@@ -285,29 +292,31 @@
+ #-----------------------------------------------------------------------
+
+ # Build (but do not install) the library.
+-all : $(SOFA_LIB_NAME)
++all : $(SOFA_SHLIB_NAME)
+ -@ echo ""
+ -@ echo "*** Now type 'make test'" \
+ " to install the library and run tests ***"
+ -@ echo ""
+
+ # Install the library and header files.
+-install $(SOFA_LIB) : $(INSTALL_DIRS) $(SOFA_LIB_NAME) $(SOFA_INC)
+- cp $(SOFA_LIB_NAME) $(SOFA_LIB_DIR)
++install: $(INSTALL_DIRS) $(SOFA_SHLIB_NAME) $(SOFA_INC)
++ cp $(SOFA_SHLIB_NAME).0.0 $(SOFA_LIB_DIR)
++ ln -s $(SOFA_SHLIB_NAME).0.0 $(SOFA_SHLIB).0
++ ln -s $(SOFA_SHLIB_NAME).0 $(SOFA_SHLIB)
+
+ # Deinstall the library and header files.
+ deinstall:
+- rm -f $(SOFA_LIB) $(SOFA_INC)
++ rm -f $(SOFA_LIB) $(SOFA_SHLIB)* $(SOFA_INC)
+
+ # Test the build.
+ check: $(SOFA_TEST_NAME) $(SOFA_INC_NAMES) $(SOFA_LIB_NAME)
+- $(CCOMPC) $(CFLAGX) $(SOFA_TEST_NAME) $(SOFA_LIB_NAME) \
++ $(CCOMPC) $(CFLAGX) $(SOFA_TEST_NAME) $(SOFA_SHLIB_NAME).0.0 \
+ -lm -o $(SOFA_TEST)
+- ./$(SOFA_TEST)
++ LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(SOFA_LIB_DIR) ./$(SOFA_TEST)
+ rm -f $(SOFA_TEST)
+
+ # Test the installed library.
+-installcheck test: $(SOFA_TEST_NAME) $(SOFA_INC) $(SOFA_LIB)
++installcheck: $(SOFA_TEST_NAME) $(SOFA_INC) $(SOFA_LIB)
+ $(CCOMPC) $(CFLAGX) $(SOFA_TEST_NAME) -I$(SOFA_INC_DIR) \
+ -L$(SOFA_LIB_DIR) -lsofa_c -lm -o $(SOFA_TEST)
+ ./$(SOFA_TEST)
+@@ -315,11 +324,11 @@
+
+ # Local clean up.
+ clean realclean:
+- rm -f $(SOFA_OBS) $(SOFA_LIB_NAME)
++ rm -f $(SOFA_OBS) $(SOFA_LIB_NAME) $(SOFA_SHLIB_NAME)
+
+ # Clean up and deinstall.
+ distclean:
+- rm -f $(SOFA_OBS) $(SOFA_LIB_NAME) $(SOFA_INC) $(SOFA_LIB)
++ rm -f $(SOFA_OBS) $(SOFA_LIB_NAME) $(SOFA_INC) $(SOFA_LIB) $(SOFA_SHLIB_NAME)
+
+ # Create the installation directories if not already present.
+ $(INSTALL_DIRS):
+@@ -329,6 +338,10 @@
+ $(SOFA_LIB_NAME): $(SOFA_OBS)
+ ar ru $(SOFA_LIB_NAME) $?
+
++$(SOFA_SHLIB_NAME): $(SOFA_OBS)
++ $(CC) $(LDFLAGS) -shared -Wl,-soname,$(SOFA_SHLIB_NAME).0 -lm -o $(SOFA_SHLIB_NAME).0.0 $?
++
++
+ # Install the header files.
+ $(SOFA_INC) : $(INSTALL_DIRS) $(SOFA_INC_NAMES)
+ cp $(SOFA_INC_NAMES) $(SOFA_INC_DIR)
diff --git a/sci-astronomy/sofa_c/metadata.xml b/sci-astronomy/sofa_c/metadata.xml
new file mode 100644
index 000000000000..17260472bb98
--- /dev/null
+++ b/sci-astronomy/sofa_c/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci-astronomy</herd>
+<longdescription lang="en">
+ This is a suite of vector/matrix routines and various utilities that
+ underpin the astronomy algorithms, which include routines for the
+ following:
+ * Calendars
+ * Time Scales
+ * Earth rotation and sidereal time
+ * Ephemerides (medium precision)
+ * Geocentric/geodetic transformations
+ * Precession, nutation, polar motion
+ * Star space motion
+ * Star catalogue conversion
+ This is the ANSI C version of the library.
+ The International Astronomical Union's SOFA service has the task of
+ establishing and maintaining an accessible and authoritative set of
+ algorithms and procedures that implement standard models used in
+ fundamental astronomy.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-astronomy/sofa_c/sofa_c-20120301a.ebuild b/sci-astronomy/sofa_c/sofa_c-20120301a.ebuild
new file mode 100644
index 000000000000..f10a1ee114c9
--- /dev/null
+++ b/sci-astronomy/sofa_c/sofa_c-20120301a.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/sofa_c/sofa_c-20120301a.ebuild,v 1.1 2013/04/23 15:57:06 bicatali Exp $
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib
+
+YYYY=${PV:0:4}
+MMDD=${PV:4:4}
+MYPV=${YYYY}${MMDD}_${PV:8:1}
+
+DESCRIPTION="Library for algorithms for models in fundamental astronomy"
+HOMEPAGE=" http://www.iausofa.org/current_C.html"
+SRC_URI="http://www.iausofa.org/${YYYY}_${MMDD}_C/${PN}-${MYPV}.tar.gz"
+
+LICENSE="SOFA"
+SLOT=0
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc"
+
+RDEPEND=""
+DEPEND=""
+
+S="${WORKDIR}/sofa/${MYPV}/c/src"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-makefile.patch
+ sed -i -e "s:/lib:/$(get_libdir):" makefile || die
+ replace-flags -O? -O1
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install
+ cd ..
+ dodoc 00READ.ME
+ use doc && dodoc doc/*.lis doc/*.pdf
+}