public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andrew Ammerlaan" <andrewammerlaan@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/cfitsio/, sci-libs/cfitsio/files/
Date: Sun, 29 Jan 2023 16:31:27 +0000 (UTC)	[thread overview]
Message-ID: <1675009781.7221fe6d2b5ca1124f8616cd99ef44b49230ae43.andrewammerlaan@gentoo> (raw)

commit:     7221fe6d2b5ca1124f8616cd99ef44b49230ae43
Author:     Mario Haustein <mario.haustein <AT> hrz <DOT> tu-chemnitz <DOT> de>
AuthorDate: Wed Dec 14 22:43:29 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sun Jan 29 16:29:41 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7221fe6d

sci-libs/cfitsio: add 4.2.0

Signed-off-by: Mario Haustein <mario.haustein <AT> hrz.tu-chemnitz.de>
Closes: https://github.com/gentoo/gentoo/pull/28666
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 sci-libs/cfitsio/Manifest                          |  1 +
 sci-libs/cfitsio/cfitsio-4.2.0.ebuild              | 87 ++++++++++++++++++++++
 .../cfitsio/files/cfitsio-4.2.0-pkgconfig.patch    | 19 +++++
 .../cfitsio/files/cfitsio-4.2.0-system-zlib.patch  | 53 +++++++++++++
 4 files changed, 160 insertions(+)

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


             reply	other threads:[~2023-01-29 16:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-29 16:31 Andrew Ammerlaan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-06  8:33 [gentoo-commits] repo/gentoo:master commit in: sci-libs/cfitsio/, sci-libs/cfitsio/files/ Michał Górny
2024-06-19  4:36 Michał Górny
2022-06-10 10:18 Andrew Ammerlaan
2022-03-01 13:07 Andrew Ammerlaan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1675009781.7221fe6d2b5ca1124f8616cd99ef44b49230ae43.andrewammerlaan@gentoo \
    --to=andrewammerlaan@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox