summaryrefslogtreecommitdiff
path: root/sci-astronomy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-01 00:07:06 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-01 00:07:06 +0100
commit1551fe56fd6ba43a94509cffc61b6bf854b7ac9f (patch)
treebe99b6ceb874878a108d68c641b476a2df076517 /sci-astronomy
parent0e2a727aba684f1a44cc0402a3f77d242140681b (diff)
gentoo auto-resync : 01:06:2024 - 00:07:06
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/Manifest.gzbin6677 -> 6677 bytes
-rw-r--r--sci-astronomy/sofa_c/Manifest3
-rw-r--r--sci-astronomy/sofa_c/files/sofa_c-20231011-makefile.patch105
-rw-r--r--sci-astronomy/sofa_c/sofa_c-20231011.ebuild37
4 files changed, 145 insertions, 0 deletions
diff --git a/sci-astronomy/Manifest.gz b/sci-astronomy/Manifest.gz
index 8d7eb3d56bd2..8f445bd0cb97 100644
--- a/sci-astronomy/Manifest.gz
+++ b/sci-astronomy/Manifest.gz
Binary files differ
diff --git a/sci-astronomy/sofa_c/Manifest b/sci-astronomy/sofa_c/Manifest
index dde02655fe5f..2f49810b8adb 100644
--- a/sci-astronomy/sofa_c/Manifest
+++ b/sci-astronomy/sofa_c/Manifest
@@ -1,4 +1,7 @@
+AUX sofa_c-20231011-makefile.patch 3335 BLAKE2B 6db237a3684ca2cf4661e03756c9b7443b21546b2d7019e4342e3e37c4e23b3087f0322ccc860b171c7cf1aef777d9a04665752a5270f0336e5d6c6359a16648 SHA512 8ae7ec5051069ba3fe5317fcefdb5d5deffbb8cfa6f80ee285e8eab095d35866d0ad26e8205626e0482dddef9db290c8310857b91ae178814898bd918b94066c
AUX sofa_c-makefile.patch 3345 BLAKE2B 4d137b742018c5b589d2dc2c834d3171c5caeb1778061cf0de07755cbc246d8bed1eb1d59f225813de77da25ea9d155192f2d4d6080316e2343c895173d6f064 SHA512 a38248d3912ef68aecbc2ed1b28181378b2c92a470b1447865f1cf9d9475f7fbc584ff1bcf7184e563f298b72b0284c81e4b905757208459cebb9b7cb4dbc26b
DIST sofa_c-20170420.tar.gz 1780577 BLAKE2B 80912027893957345e080f02eed059f764970bbf6b89d6979c355a65d6d144edc8073b6a6436d11d36009eab05f5d9ccad0270a7feef117e576055be6d8489d5 SHA512 f2dd806243e3aec51ea03a54e10e533d4c3c1a69d032d5f3ddd7cd823a75aeed8033491c91366813b8d8e5c0b66e0fd582e6ede03aa7b136311fdd7a4ebf20d3
+DIST sofa_c-20231011.tar.gz 3055571 BLAKE2B 4a2771599af61f06cab76c83af8d8bac321258bd2145f7558be9a7afed3b5cefc13bea2a24d05f9a7481409e617f807f4e29173d87ab58a403808d43aae477a5 SHA512 8e7d67f7ac7a285a96160c96d16b1921ccb7a9324b83280b1594efcbbd7eb78c4d41898c1e5acfa5081842e4aeee15a96572d21b466bfda7ef7582c58624d376
EBUILD sofa_c-20170420.ebuild 793 BLAKE2B a9559a01443926fef98c7acf2b861227d455414173397f1288581e8290a4d9829effb656f8cfa5fec47dac47c6b220c60a3e666bef95994394810c9ef6040dfb SHA512 250743503aee1951afa017502c801f6dcd9b901c8db82abe61c70ebe170e26f553dc48d885455906d8e40b47203fc2d7778555ea80b725375ff1507b90126065
+EBUILD sofa_c-20231011.ebuild 753 BLAKE2B 0c75f0ed0dc7aa4a215bc7549799f0c9a8a36d29ee9f5d514297a08054bebc3da99e642d46482b79bfea603eed59d8917e063f046cd9b08896a055ddd1178d75 SHA512 b731e3f9108e928b3a5b6f3564b2211a0d225a97910e0adaad570ffce2946b0dca6b14d701c45c61095e2982e18979e97bc82860a09de8c73e8c73652265f004
MISC metadata.xml 977 BLAKE2B 1389565e20033490916bf9736c74d539ec0ac890a1cad5d7c579e203207a1d03cd0e5bb10a25f06767bd15da2afd90dd40e2b55982964f1b88649c51b1c4cae5 SHA512 255e0513f247fae86a7227afbc18d2b0269cef2f6648562572db48ca5a2501dfb7743c40ea7b91562a18c4ca312a10f3cf7b104c9cc25dfa986c3371a0247238
diff --git a/sci-astronomy/sofa_c/files/sofa_c-20231011-makefile.patch b/sci-astronomy/sofa_c/files/sofa_c-20231011-makefile.patch
new file mode 100644
index 000000000000..9e923db1604a
--- /dev/null
+++ b/sci-astronomy/sofa_c/files/sofa_c-20231011-makefile.patch
@@ -0,0 +1,105 @@
+--- a/makefile
++++ b/makefile
+@@ -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,9 @@
+ # of your preferred C compiler (CCOMPC) and compilation flags (CFLAGF
+ # for functions, CFLAGX for executables) here.
+
+-CCOMPC = gcc
+-CFLAGF = -c -pedantic -Wall -O
+-CFLAGX = -pedantic -Wall -O
++CCOMPC = $(CC)
++CFLAGF = $(CPPFLAGS) -I. -c -fPIC $(CFLAGS)
++CFLAGX = $(CPPFLAGS) -I. $(CFLAGS)
+
+ #----YOU SHOULDN'T HAVE TO MODIFY ANYTHING BELOW THIS LINE---------
+
+@@ -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
++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
+@@ -88,7 +93,7 @@
+ # Name the SOFA/C includes in their source and target locations.
+
+ SOFA_INC_NAMES = sofa.h sofam.h
+-SOFA_INC = $(SOFA_INC_DIR)sofa.h $(SOFA_INC_DIR)sofam.h
++SOFA_INC = $(SOFA_INC_NAMES:%=$(SOFA_INC_DIR)%)
+
+ # The list of SOFA/C library object files.
+
+@@ -347,28 +352,30 @@
+ #-----------------------------------------------------------------------
+
+ # 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.
+ 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)
+- $(CCOMPC) $(CFLAGX) $(SOFA_TEST_NAME) $(SOFA_LIB_NAME) \
+- -I. -lm -o $(SOFA_TEST)
+- ./$(SOFA_TEST)
++check: $(SOFA_TEST_NAME) $(SOFA_INC_NAMES) $(SOFA_SHLIB_NAME)
++ $(CCOMPC) $(CFLAGX) $(SOFA_TEST_NAME) $(SOFA_SHLIB_NAME).0.0 \
++ -lm -o $(SOFA_TEST)
++ LD_LIBRARY_PATH="$${LD_LIBRARY_PATH}:." ./$(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)
+@@ -379,7 +386,7 @@
+
+ # 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):
+@@ -389,6 +396,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
++ ln -sfn $(SOFA_SHLIB_NAME).0.0 $(SOFA_SHLIB_NAME).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/sofa_c-20231011.ebuild b/sci-astronomy/sofa_c/sofa_c-20231011.ebuild
new file mode 100644
index 000000000000..fc542d499085
--- /dev/null
+++ b/sci-astronomy/sofa_c/sofa_c-20231011.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+YYYY=${PV:0:4}
+MMDD=${PV:4:4}
+MYPV=${YYYY}${MMDD}
+
+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"
+S="${WORKDIR}/sofa/${MYPV}/c/src"
+
+LICENSE="SOFA"
+SLOT=0
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-makefile.patch
+)
+
+src_prepare() {
+ default
+ sed -e "s:/lib:/$(get_libdir):" -i makefile || die
+ tc-export CC
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install
+ cd ..
+ dodoc 00READ.ME
+ use doc && dodoc doc/*.lis doc/*.pdf
+}