summaryrefslogtreecommitdiff
path: root/sci-libs/cfitsio
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/cfitsio')
-rw-r--r--sci-libs/cfitsio/Manifest4
-rw-r--r--sci-libs/cfitsio/cfitsio-4.2.0.ebuild87
-rw-r--r--sci-libs/cfitsio/files/cfitsio-4.2.0-pkgconfig.patch19
-rw-r--r--sci-libs/cfitsio/files/cfitsio-4.2.0-system-zlib.patch53
4 files changed, 163 insertions, 0 deletions
diff --git a/sci-libs/cfitsio/Manifest b/sci-libs/cfitsio/Manifest
index 8ca77194805b..5ea009d90490 100644
--- a/sci-libs/cfitsio/Manifest
+++ b/sci-libs/cfitsio/Manifest
@@ -5,11 +5,15 @@ AUX cfitsio-4.0.0-pkgconfig.patch 560 BLAKE2B ca784b063cddb88ae6665d205dd9190849
AUX cfitsio-4.0.0-system-zlib.patch 2406 BLAKE2B f17d54f549b4167d51eb073decd4924acad02c4239ea36fea78bd5c71a4f236d7285d669bd12c8e9de38468416e4262005bfd704ab5146353810bfd11c08036c SHA512 3d82bd4852619b1d10eb765f05e3dd03b8cc11dfac6f4eae48062b20b71e715c8eebe7c374fb83d38dfdb454fdb598a7b62a7d27f6517cc885d56189f4a0f2d7
AUX cfitsio-4.1.0-pkgconfig.patch 600 BLAKE2B 4cf6c9a10f3b43f85b0b7d63bad64affd4da8aefee0b70884c5d6df70adc069c638379a1101594eeefcae40a7bde1c0f6253b91ea3f01eacde4ed8b35a05b95f SHA512 1f5f6a31ad7fcee675958bc63a679052dbad002dd32ba480a47bbc6d54c224e5bc35c54d213c2b7ba60ce624f9efb943896ded2383a50d01575b3fe78ba0d9a0
AUX cfitsio-4.1.0-system-zlib.patch 2580 BLAKE2B 9c84cf98d1cfafa824c7122e1833927912af0993566750c06066426a08cdb66505ec62a5eab4018e7da7aed2ed55320018c0a0feb25c8a857dbcc4067f9cf49f SHA512 51d5c5edb6f19ad23f9ee91bfc84aba4b2aed4f53740e5721c1a9b68977549bcf00ac38c1dba0a073ce3b4525cc90239e9401de4d03702467efc72b0810dd69f
+AUX cfitsio-4.2.0-pkgconfig.patch 685 BLAKE2B a231cbaa3df98088248cf9064c00bab5c76398a88c4494c7e827e325627e6c3f74b1228bda1bc4cba1fd7a32916121095ee0a07c8a7fa18adfdf85815717ddb0 SHA512 7ce6e934d19cb08bac4002edcad2310e45d073abfece87db8b654b5d4b52930f382f5ef3713412311bf5bb32361a27cb9ee8ccdd012fb23ca3b2bcae9ea8a028
+AUX cfitsio-4.2.0-system-zlib.patch 2589 BLAKE2B 6dbba94f0a3779d18f92478c82a4ff19c6b1bcef7ce72b9a33623b483de8dc99f771f1e1d5868f87b4dd605de94eb3e6ffef53163a88f9300bd9e5a32ba5a2c0 SHA512 a27692620d0c21641d2e4e739c735daac78af200cf8002dd3cf411a7fc14189faca3e5988f00aca1028d06badd4a76353f27b56d40ea9966cb4c9be183f9176d
DIST cfitsio-3.49.tar.gz 4934662 BLAKE2B ca8b701f0fec399d989efb61fdaa2bfbf49d0eea2d3ff47e156757c5a99bc77c23a1b91b4c91166696293c71c78210065dc48d0bb3c77039815f326d0ed55f0a SHA512 9836a4af3bbbfed1ea1b4c70b9d500ac485d7c3d8131eb8a25ee6ef6662f46ba52b5161c45c709ed9a601ff0e9ec36daa5650eaaf4f2cc7d6f4bb5640f10da15
DIST cfitsio-4.0.0.tar.gz 4746177 BLAKE2B a43a21d29522cac84294e81ad5f0a45839c21c2fafcbde42504670e73757a41ebd91e42d086529df8139ce920446332f827b1abf027f8932ee73dd025103cd8e SHA512 a5b20bd6ad648450e99167f63813cc7523347aadfc9f85d2c0ed3ba7e4516b3bb6bc0851f209268f2cb045cdacc43a3da9e4506af4581f806ab9f4de248065fa
DIST cfitsio-4.1.0.tar.gz 4305184 BLAKE2B 1edfce2b44ab990ed834b22dfc734af632f8f1401b6616f0c4322a3c40117123e52ba191610a3393c077f4a5fccd7462bcb4749e715cf2e9abae08edb1f1f8eb SHA512 bbbe10e890e74a30a9806dd2bbf711b3b1f15502b210b222d2d57cc083495c3b66b44927e4680f989045187fb7075f7187e2805ddcb4753ce53c68c3442cc813
+DIST cfitsio-4.2.0.tar.gz 4356372 BLAKE2B 7f5e695a56105866b2457e0f1c2d74bfb2aa86bc53e4eeb39aa9b8e79b278e1184a610422bf43c341a9f3159a93b980bab1ec9084475189b08dfa080b59ec2af SHA512 41b51653370874f50a7a9fe7d5f61577a979ab9d146b8249afa407d3858cb4dce0581eba23093972b66f7d1042b9693b98ad9130ec67b3b44e94005e72d60853
EBUILD cfitsio-3.490.ebuild 1718 BLAKE2B 6b89bbad5bc1876148a9360d47931bc3a03a3475a7860a01c1a6ea8ecd87d117c8f10eeff492664c2c284877b7d613aec1e926b472840dd8023b15bd9b0bc17f SHA512 a046886cb8c0e6ede4581128323f1959d24c27713e45f3443a4bfda7fed80f4917f17071a06acf34c891abe07d089ea24f4774f5cb1448da348c823ade163a31
EBUILD cfitsio-4.0.0.ebuild 1677 BLAKE2B 63c18cc01c1c2037406c01e81d288a56537be3f39b72804306385005d664ac8077ef2db5225b7d585c84351ba6b7995dcbbc6da9dd4a90944acc25635dd56636 SHA512 3137d219a4c46b29f5930a965c10129b125af7887fcf1aed6e9f97e2b5903ef54b32a7984d034e4e98a4c44ab48cc7300c8508d3d0501f9df6575aaf9b10b8f0
EBUILD cfitsio-4.1.0-r1.ebuild 1899 BLAKE2B 2b650aeca35f4c0422c582d761774fa786e5a2615588196d8345f982dd860ab9b7ded096382e7a17064cba0961657cd0f829c3d98261047208963b84c7734156 SHA512 8f9cabd2a9a0099607c5c759c1a2be608168671ef878031a258edfc26b290d936b5a1ba6d9d35507fbb9fbb2de6b9a122b8c1f268841ae33429a9dc74e3ef5d2
EBUILD cfitsio-4.1.0.ebuild 1834 BLAKE2B 44e3449fb0f3b5548402b87c06dc657923db89f9548714ba0495b7f781e9efeed493cce75fce513f1fd6417d30845d00ea70b0f0b43e807648b0aeccda131da6 SHA512 2d63153560fc18da4558c629d3ca5904ad381d90fae2c3c799dc2d7f619d9300506f1b37a9f7322c9c8225c01f15502e03100edc7c329bca1878e27b84787391
+EBUILD cfitsio-4.2.0.ebuild 1900 BLAKE2B e53fa4a696bfb452e2bb08839c8c5f03ee70fdf9465be140eaa9f5c9e32a6e3ab27ef5a6659ad57871436bf1387e17b25680b5787c144d11172c6821825f71f5 SHA512 498992fea570c3a7b516f515d435ac90ebf1975aa06d1ec5bf4b0390b78cef1682d00540bd79ae8d15925b39af91535bc104acf0e419cdfc69ee5abeb9328884
MISC metadata.xml 883 BLAKE2B dca8a38862dcc5f445f40fc77f6979d1d1edcb902af811ce84ba8d41b5e704cdcd5e516b888cd53f6458c09beea06b339cf0c4148471a4fa9f1664ba76c2d2c6 SHA512 ca554514c74c3e96434243e40697f70328715c80e856916b90a3f514337b921968428bb368799322872bf9d32eef3e77f150f79a422a9aaf95a228edff9fc38b
diff --git a/sci-libs/cfitsio/cfitsio-4.2.0.ebuild b/sci-libs/cfitsio/cfitsio-4.2.0.ebuild
new file mode 100644
index 000000000000..f3ec0c5b3190
--- /dev/null
+++ b/sci-libs/cfitsio/cfitsio-4.2.0.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit fortran-2 multilib-minimal
+
+DESCRIPTION="C and Fortran library for manipulating FITS files"
+HOMEPAGE="https://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html"
+SRC_URI="https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/10"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris"
+IUSE="bzip2 curl threads tools cpu_flags_x86_sse2 cpu_flags_x86_ssse3"
+
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+"
+RDEPEND="
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
+ curl? ( net-misc/curl[${MULTILIB_USEDEP}] )
+"
+# Bug #803350
+DEPEND="${RDEPEND}
+ <dev-lang/cfortran-20110621
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.490-ldflags.patch"
+ "${FILESDIR}/${P}-system-zlib.patch"
+ "${FILESDIR}/${P}-pkgconfig.patch"
+)
+
+pkg_setup() {
+ fortran-2_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # Avoid internal cfortran
+ mv cfortran.h cfortran.h.disabled || die
+ ln -s "${EPREFIX}"/usr/include/cfortran.h . || die
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ $(use_with bzip2)
+ $(use_enable curl)
+ $(use_enable threads reentrant)
+ $(use_enable cpu_flags_x86_sse2 sse2)
+ $(use_enable cpu_flags_x86_ssse3 ssse3)
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ default
+
+ if use tools ; then
+ emake utils
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc README docs/changes.txt
+
+ dodoc docs/{quick,cfitsio,fpackguide}.pdf
+ dodoc docs/fitsio.pdf
+
+ docinto examples
+ dodoc cookbook.c testprog.c speed.c smem.c
+ dodoc cookbook.f testf77.f
+
+ # https://bugs.gentoo.org/855191
+ if use tools; then
+ rm "${ED}/usr/bin/smem" || die
+ fi
+
+ # Remove static libs
+ find "${ED}" -name '*.a' -delete || die
+}
diff --git a/sci-libs/cfitsio/files/cfitsio-4.2.0-pkgconfig.patch b/sci-libs/cfitsio/files/cfitsio-4.2.0-pkgconfig.patch
new file mode 100644
index 000000000000..9ec614616552
--- /dev/null
+++ b/sci-libs/cfitsio/files/cfitsio-4.2.0-pkgconfig.patch
@@ -0,0 +1,19 @@
+diff -Naur a/cfitsio.pc.cmake b/cfitsio.pc.cmake
+--- a/cfitsio.pc.cmake 2022-10-31 19:40:23.000000000 +0100
++++ b/cfitsio.pc.cmake 2022-12-14 23:35:53.572102437 +0100
+@@ -1,12 +1,12 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=@CMAKE_INSTALL_PREFIX@
+ libdir=@LIB_DESTINATION@
+-includedir=@INCLUDE_INSTALL_DIR@
++includedir=@INCLUDE_INSTALL_DIR@/cfitsio
+
+ Name: cfitsio
+ Description: FITS File Subroutine Library
+ URL: https://heasarc.gsfc.nasa.gov/fitsio/
+ Version: @CFITSIO_MAJOR@.@CFITSIO_MINOR@.@CFITSIO_MICRO@
+ Libs: -L${libdir} -lcfitsio
+-Libs.private: @PKG_CONFIG_LIBS@ -lm
+-Cflags: -I${includedir}
++Libs.private: @PKG_CONFIG_LIBS@ -lm -z
++Cflags: -D_REENTRANT -I${includedir}
diff --git a/sci-libs/cfitsio/files/cfitsio-4.2.0-system-zlib.patch b/sci-libs/cfitsio/files/cfitsio-4.2.0-system-zlib.patch
new file mode 100644
index 000000000000..fab375507f83
--- /dev/null
+++ b/sci-libs/cfitsio/files/cfitsio-4.2.0-system-zlib.patch
@@ -0,0 +1,53 @@
+diff -Naur a/Makefile.in b/Makefile.in
+--- a/Makefile.in 2022-10-31 19:40:23.000000000 +0100
++++ b/Makefile.in 2022-12-14 23:37:10.785099554 +0100
+@@ -102,7 +102,7 @@
+ shared: lib${PACKAGE}${SHLIB_SUFFIX}
+
+ lib${PACKAGE}${SHLIB_SUFFIX}: ${OBJECTS}
+- ${SHLIB_LD} ${LDFLAGS} -o ${CFITSIO_SHLIB} ${OBJECTS} -lm ${LIBS_CURL} ${LIBS}
++ ${SHLIB_LD} ${LDFLAGS} -o ${CFITSIO_SHLIB} ${OBJECTS} -lm -lz -lbz2 ${LIBS_CURL} ${LIBS}
+ @if [ "x${CFITSIO_SHLIB_SONAME}" != x ]; then \
+ ln -sf ${CFITSIO_SHLIB} ${CFITSIO_SHLIB_SONAME}; \
+ ln -sf ${CFITSIO_SHLIB_SONAME} $@; \
+@@ -142,31 +142,31 @@
+ ${CC} -c ${CFLAGS} ${CPPFLAGS} ${SSE_FLAGS} ${DEFS} $<
+
+ smem: smem.o lib${PACKAGE}.a ${OBJECTS}
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz
+
+ testprog: testprog.o lib${PACKAGE}.a ${OBJECTS}
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS}
+
+ fpack: fpack.o fpackutil.o lib${PACKAGE}.a ${OBJECTS}
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm ${LIBS}
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm -lz ${LIBS}
+
+ funpack: funpack.o fpackutil.o lib${PACKAGE}.a ${OBJECTS}
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm ${LIBS}
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm -lz ${LIBS}
+
+ fitscopy: fitscopy.o lib${PACKAGE}.a ${OBJECTS}
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS}
+
+ speed: speed.o lib${PACKAGE}.a ${OBJECTS}
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS}
+
+ imcopy: imcopy.o lib${PACKAGE}.a ${OBJECTS}
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS}
+
+ cookbook: cookbook.o lib${PACKAGE}.a ${OBJECTS}
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS}
+
+ testf77: testf77.o lib${PACKAGE}.a ${OBJECTS}
+- ${FC} ${LDFLAGS_BIN} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS}
++ ${FC} ${LDFLAGS_BIN} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS}
+
+ # Tested with bison 3.8 and flex 2.6.4
+ eval: # Rebuild eval_* files from flex/bison source