summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-astronomy/sofa_c/Manifest2
-rw-r--r--sci-astronomy/sofa_c/files/sofa_c-makefile.patch56
-rw-r--r--sci-astronomy/sofa_c/sofa_c-20150209a.ebuild (renamed from sci-astronomy/sofa_c/sofa_c-20120301a.ebuild)14
3 files changed, 33 insertions, 39 deletions
diff --git a/sci-astronomy/sofa_c/Manifest b/sci-astronomy/sofa_c/Manifest
index cead38fc4fe..078a0f3e879 100644
--- a/sci-astronomy/sofa_c/Manifest
+++ b/sci-astronomy/sofa_c/Manifest
@@ -1 +1 @@
-DIST sofa_c-20120301_a.tar.gz 1267551 SHA256 3534538b4abda067ef07f1aaef869f3b72ddc7f246447558b708d2968e63e66f SHA512 00da8e834e790922200c25b55cba3b48e49770cbada2271e4b7720f5170a422c9a47e6ebd1c51787256e88aaa656c347f21add14fbc353a9346d395ea3eda2c2 WHIRLPOOL d4f13d08b6ff1f67c808ba09858cd0f77664031ea466b71fc65f48f09bd216cd384db7660b574385d1c65ddcbdd5f894a2631335be557ffb29f1b8703d517a46
+DIST sofa_c-20150209_a.tar.gz 1685051 SHA256 b542c5e4ca42d91ada3c66e8d5b86eb9dec085bf1a07d058c01920c6c0b1174a SHA512 45524228db30c388315ce76c1d85db422fac09da3c3ed1442e362a6a2b4a10d27c19ea4a2d51c854280102a99706663622e0375b4afbf096b79877e7602fec4c WHIRLPOOL f4b084145cb3b9c2d722885ed89d2b8298d8fa4a21da25778852d76d20342331c3e7e2c6e28b3d0df04bc9bdf6fc921fe0e60f545ca91dcf69fe86316252006f
diff --git a/sci-astronomy/sofa_c/files/sofa_c-makefile.patch b/sci-astronomy/sofa_c/files/sofa_c-makefile.patch
index b992d401d3f..3a942e3bed9 100644
--- a/sci-astronomy/sofa_c/files/sofa_c-makefile.patch
+++ b/sci-astronomy/sofa_c/files/sofa_c-makefile.patch
@@ -1,5 +1,5 @@
---- makefile.orig 2013-05-22 20:51:58.398491342 +0000
-+++ makefile 2013-05-22 21:05:52.055466710 +0000
+--- src/makefile.orig
++++ src/makefile
@@ -49,7 +49,7 @@
# Specify the installation home directory.
@@ -9,7 +9,7 @@
# Specify the installation directory for the library.
-@@ -63,9 +63,10 @@
+@@ -63,9 +63,9 @@
# of your preferred C compiler (CCOMPC) and compilation flags (CFLAGF
# for functions, CFLAGX for executables) here.
@@ -17,17 +17,15 @@
-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)
-+
++CFLAGF = $(CPPFLAGS) -I. -c -fPIC $(CFLAGS)
++CFLAGX = $(CPPFLAGS) -I. $(CFLAGS)
#----YOU SHOULDN'T HAVE TO MODIFY ANYTHING BELOW THIS LINE---------
-@@ -80,6 +81,12 @@
+@@ -80,6 +80,11 @@
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
@@ -36,7 +34,7 @@
# Name the SOFA/C testbed in its source and target locations.
SOFA_TEST_NAME = t_sofa_c.c
-@@ -88,7 +95,7 @@
+@@ -88,7 +93,7 @@
# Name the SOFA/C includes in their source and target locations.
SOFA_INC_NAMES = sofa.h sofam.h
@@ -44,8 +42,8 @@
+SOFA_INC = $(SOFA_INC_NAMES:%=$(SOFA_INC_DIR)%)
# The list of SOFA/C library object files.
- SOFA_OBS = iauA2af.o \
-@@ -285,29 +292,32 @@
+
+@@ -321,28 +326,31 @@
#-----------------------------------------------------------------------
# Build (but do not install) the library.
@@ -63,22 +61,21 @@
+ 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)
+ uninstall:
+- - $(RM) $(SOFA_LIB) $(SOFA_INC)
++ - $(RM) $(SOFA_LIB) $(SOFA_SHLIB)* $(SOFA_INC)
# Test the build.
- check: $(SOFA_TEST_NAME) $(SOFA_INC_NAMES) $(SOFA_LIB_NAME)
+-check: $(SOFA_TEST_NAME) $(SOFA_INC_NAMES) $(SOFA_LIB_NAME)
- $(CCOMPC) $(CFLAGX) $(SOFA_TEST_NAME) $(SOFA_LIB_NAME) \
++check: $(SOFA_TEST_NAME) $(SOFA_INC_NAMES) $(SOFA_SHLIB_NAME)
+ $(CCOMPC) $(CFLAGX) $(SOFA_TEST_NAME) $(SOFA_SHLIB_NAME).0.0 \
-lm -o $(SOFA_TEST)
- ./$(SOFA_TEST)
-- rm -f $(SOFA_TEST)
-+ ln -s $(SOFA_SHLIB_NAME).0.0 $(SOFA_SHLIB_NAME).0
-+ LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):." ./$(SOFA_TEST)
-+ rm -f $(SOFA_TEST) $(SOFA_SHLIB_NAME).0
++ LD_LIBRARY_PATH="$${LD_LIBRARY_PATH}:." ./$(SOFA_TEST)
# Test the installed library.
-installcheck test: $(SOFA_TEST_NAME) $(SOFA_INC) $(SOFA_LIB)
@@ -86,27 +83,22 @@
$(CCOMPC) $(CFLAGX) $(SOFA_TEST_NAME) -I$(SOFA_INC_DIR) \
-L$(SOFA_LIB_DIR) -lsofa_c -lm -o $(SOFA_TEST)
./$(SOFA_TEST)
-@@ -315,11 +325,11 @@
+@@ -353,7 +361,7 @@
- # 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)
+ # Delete all generated binaries in the current directory.
+ realclean distclean : clean
+- - $(RM) $(SOFA_LIB_NAME) $(SOFA_TEST)
++ - $(RM) $(SOFA_LIB_NAME) $(SOFA_SHLIB_NAME)* $(SOFA_TEST)
# Create the installation directories if not already present.
$(INSTALL_DIRS):
-@@ -329,6 +339,10 @@
+@@ -363,6 +371,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 $?
-+
++ $(CC) $(LDFLAGS) -shared -Wl,-soname,$(SOFA_SHLIB_NAME).0 -lm $? -o $(SOFA_SHLIB_NAME).0.0
++ ln -sfn $(SOFA_SHLIB_NAME).0.0 $(SOFA_SHLIB_NAME).0
+
# Install the header files.
$(SOFA_INC) : $(INSTALL_DIRS) $(SOFA_INC_NAMES)
diff --git a/sci-astronomy/sofa_c/sofa_c-20120301a.ebuild b/sci-astronomy/sofa_c/sofa_c-20150209a.ebuild
index 55d0acfd522..39ee91a668d 100644
--- a/sci-astronomy/sofa_c/sofa_c-20120301a.ebuild
+++ b/sci-astronomy/sofa_c/sofa_c-20150209a.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
+EAPI=6
-inherit eutils flag-o-matic multilib
+inherit toolchain-funcs
YYYY=${PV:0:4}
MMDD=${PV:4:4}
@@ -22,16 +22,18 @@ IUSE="doc"
RDEPEND=""
DEPEND=""
+PATCHES=( "${FILESDIR}/${PN}-makefile.patch" )
+
S="${WORKDIR}/sofa/${MYPV}/c/src"
src_prepare() {
- epatch "${FILESDIR}"/${PN}-makefile.patch
+ default
sed -i -e "s:/lib:/$(get_libdir):" makefile || die
- replace-flags -O? -O1
+ tc-export CC
}
src_install() {
- emake DESTDIR="${ED}" -j1 install
+ emake DESTDIR="${ED}" install
cd ..
dodoc 00READ.ME
use doc && dodoc doc/*.lis doc/*.pdf