diff options
author | Mario Haustein <mario.haustein@hrz.tu-chemnitz.de> | 2022-12-14 23:43:29 +0100 |
---|---|---|
committer | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2023-01-29 17:29:41 +0100 |
commit | 7221fe6d2b5ca1124f8616cd99ef44b49230ae43 (patch) | |
tree | cf4a6a952552355699bccdf53807f5ce145f971b /sci-libs | |
parent | profiles/arch/amd64/x32: and also mask sci-geosciences/viking (diff) | |
download | gentoo-7221fe6d2b5ca1124f8616cd99ef44b49230ae43.tar.gz gentoo-7221fe6d2b5ca1124f8616cd99ef44b49230ae43.tar.bz2 gentoo-7221fe6d2b5ca1124f8616cd99ef44b49230ae43.zip |
sci-libs/cfitsio: add 4.2.0
Signed-off-by: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
Closes: https://github.com/gentoo/gentoo/pull/28666
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/cfitsio/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/cfitsio/cfitsio-4.2.0.ebuild | 87 | ||||
-rw-r--r-- | sci-libs/cfitsio/files/cfitsio-4.2.0-pkgconfig.patch | 19 | ||||
-rw-r--r-- | sci-libs/cfitsio/files/cfitsio-4.2.0-system-zlib.patch | 53 |
4 files changed, 160 insertions, 0 deletions
diff --git a/sci-libs/cfitsio/Manifest b/sci-libs/cfitsio/Manifest index 2482f16f036b..64031fa708e5 100644 --- a/sci-libs/cfitsio/Manifest +++ b/sci-libs/cfitsio/Manifest @@ -1,3 +1,4 @@ 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 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 |