public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cfitsio/files/, sci-libs/cfitsio/
@ 2021-01-02 20:31 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2021-01-02 20:31 UTC (permalink / raw
  To: gentoo-commits

commit:     1a78dc37e8d87a8d3bad4a9087843ec813f9f217
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  2 19:20:19 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Jan  2 20:30:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a78dc37

sci-libs/cfitsio: 3.490 version bump

Closes: https://bugs.gentoo.org/687860
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sci-libs/cfitsio/Manifest                          |  2 +-
 .../{cfitsio-3.480.ebuild => cfitsio-3.490.ebuild} | 35 +++++++------
 sci-libs/cfitsio/files/cfitsio-3.490-ldflags.patch | 14 +++++
 .../cfitsio/files/cfitsio-3.490-pkgconfig.patch    | 20 ++++++++
 .../cfitsio/files/cfitsio-3.490-system-zlib.patch  | 60 ++++++++++++++++++++++
 5 files changed, 114 insertions(+), 17 deletions(-)

diff --git a/sci-libs/cfitsio/Manifest b/sci-libs/cfitsio/Manifest
index d9d1cb2960a..d4be6d38173 100644
--- a/sci-libs/cfitsio/Manifest
+++ b/sci-libs/cfitsio/Manifest
@@ -1,3 +1,3 @@
 DIST cfitsio-3.360.tar.gz 4104894 BLAKE2B 7a84177c28679db5c27d0586cb6959a0663918a84d46ced9aea6ef7e6bdd32955946807efd4cd852e55128dbc887c4a2135b2eba26847b265011bfd6df049335 SHA512 158819b4a3a29c29a5f017283e2b20067420994e881d202dbf3ba199c9e564dc1e74f8be5ce84f78107126d2a8688cc55cc7ed284540ca647e44cdc3b0b02072
 DIST cfitsio-3.410.tar.gz 4194529 BLAKE2B 31250b9add5b6a85c919c33251d127117ceab81c2243e0b9f8bbe2ef0fd09c85a938b7525338bc718a9b3035efa3660ecffa17ec79e3e278c8014e727f23473b SHA512 cc1de2a4314e7c82bdd6855e11dea4e18dc4e7bcb27b0d15b884cbaeb4acd3b1e12dadd17ab83c7917570934913f89337035470ee4921e7b62409a81052d70cd
-DIST cfitsio-3.48.tar.gz 4928169 BLAKE2B 86e2af3f767c9572c07d1b81138973f81f0ad62a862fb2e457de363a552c17990aacd4f931f233f2cdbbe41c10dac3aa1bfb46220b34fc4407fea4ac01a46132 SHA512 08a13931726b0ee15bd4e2ad6dd4debb8268f3b0bc33adadec5c6a29295dd536bcccb3cc949721c6cebac6f43b6118e5e38332ac0ba8a07a43553416d8debae5
+DIST cfitsio-3.49.tar.gz 4934662 BLAKE2B ca8b701f0fec399d989efb61fdaa2bfbf49d0eea2d3ff47e156757c5a99bc77c23a1b91b4c91166696293c71c78210065dc48d0bb3c77039815f326d0ed55f0a SHA512 9836a4af3bbbfed1ea1b4c70b9d500ac485d7c3d8131eb8a25ee6ef6662f46ba52b5161c45c709ed9a601ff0e9ec36daa5650eaaf4f2cc7d6f4bb5640f10da15

diff --git a/sci-libs/cfitsio/cfitsio-3.480.ebuild b/sci-libs/cfitsio/cfitsio-3.490.ebuild
similarity index 70%
rename from sci-libs/cfitsio/cfitsio-3.480.ebuild
rename to sci-libs/cfitsio/cfitsio-3.490.ebuild
index 53eb483eab3..419ec07c908 100644
--- a/sci-libs/cfitsio/cfitsio-3.480.ebuild
+++ b/sci-libs/cfitsio/cfitsio-3.490.ebuild
@@ -1,38 +1,39 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
+MY_P="${PN}-${PV%0*}"
 inherit fortran-2 multilib-minimal
 
-# Upstream call this release 3.480, but drop the 0 in the tarball filename
-MY_PV="3.48"
-MY_P="${PN}-${MY_PV}"
-
 DESCRIPTION="C and Fortran library for manipulating FITS files"
 HOMEPAGE="https://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html"
 SRC_URI="http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
 
 LICENSE="ISC"
-SLOT="0/8"
+SLOT="0/9"
 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris"
-IUSE="bzip2 cpu_flags_x86_sse2 cpu_flags_x86_ssse3 curl"
+IUSE="bzip2 curl cpu_flags_x86_sse2 cpu_flags_x86_ssse3"
 
 BDEPEND="
 	sys-devel/bison
 	sys-devel/flex
 "
 RDEPEND="
-	net-misc/curl[${MULTILIB_USEDEP}]
 	sys-libs/zlib[${MULTILIB_USEDEP}]
 	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
+	curl? ( net-misc/curl[${MULTILIB_USEDEP}] )
 "
-DEPEND="
-	${RDEPEND}
+DEPEND="${RDEPEND}
 	dev-lang/cfortran
 "
 
-S="${WORKDIR}/${MY_P}"
+PATCHES=(
+	"${FILESDIR}/${P}-ldflags.patch"
+	"${FILESDIR}/${P}-system-zlib.patch"
+	"${FILESDIR}/${P}-pkgconfig.patch"
+)
 
 pkg_setup() {
 	fortran-2_pkg_setup
@@ -42,18 +43,20 @@ src_prepare() {
 	default
 
 	# Avoid internal cfortran
-	mv cfortran.h cfortran.h.disabled
+	mv cfortran.h cfortran.h.disabled || die
 	ln -s "${EPREFIX}"/usr/include/cfortran.h . || die
 
 	multilib_copy_sources
 }
 
 multilib_src_configure() {
-	ECONF_SOURCE="${S}" econf \
-		$(use_with bzip2) \
-		$(use_enable curl) \
-		$(use_enable cpu_flags_x86_sse2 sse2) \
+	local myeconfargs=(
+		$(use_with bzip2)
+		$(use_enable curl)
+		$(use_enable cpu_flags_x86_sse2 sse2)
 		$(use_enable cpu_flags_x86_ssse3 ssse3)
+	)
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
 }
 
 multilib_src_install_all() {

diff --git a/sci-libs/cfitsio/files/cfitsio-3.490-ldflags.patch b/sci-libs/cfitsio/files/cfitsio-3.490-ldflags.patch
new file mode 100644
index 00000000000..4b04fb9cc4f
--- /dev/null
+++ b/sci-libs/cfitsio/files/cfitsio-3.490-ldflags.patch
@@ -0,0 +1,14 @@
+diff -Naur a/configure b/configure
+--- a/configure	2018-05-09 21:16:00.000000000 +0200
++++ b/configure	2018-05-23 17:17:18.452431657 +0200
+@@ -4215,8 +4215,8 @@
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+-LDFLAGS="$CFLAGS"
+-LDFLAGS_BIN="$LDFLAGS"
++# LDFLAGS="$CFLAGS"
++LDFLAGS_BIN="$CFLAGS"
+ 
+ if test "x$FC" = "xnone" ; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: cfitsio: == Fortran compiler search has been overridden" >&5

diff --git a/sci-libs/cfitsio/files/cfitsio-3.490-pkgconfig.patch b/sci-libs/cfitsio/files/cfitsio-3.490-pkgconfig.patch
new file mode 100644
index 00000000000..37b47c7b820
--- /dev/null
+++ b/sci-libs/cfitsio/files/cfitsio-3.490-pkgconfig.patch
@@ -0,0 +1,20 @@
+diff -ur a/cfitsio.pc.in b/cfitsio.pc.in
+--- a/cfitsio.pc.in	2019-05-08 17:34:49.000000000 +0200
++++ b/cfitsio.pc.in	2019-08-01 15:56:52.064310329 +0200
+@@ -1,12 +1,12 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+-includedir=@includedir@
++includedir=@includedir@/cfitsio
+ 
+ Name: cfitsio
+ Description: FITS File Subroutine Library
+ URL: https://heasarc.gsfc.nasa.gov/fitsio/
+ Version: @CFITSIO_MAJOR@.@CFITSIO_MINOR@
+-Libs: -L${libdir} -lcfitsio
+-Libs.private: -lm @LIBS@
+-Cflags: -I${includedir}
++Libs: -L${libdir} -lcfitsio
++Libs.private: -lm -lz @LIBS@
++Cflags: -D_REENTRANT -I${includedir}

diff --git a/sci-libs/cfitsio/files/cfitsio-3.490-system-zlib.patch b/sci-libs/cfitsio/files/cfitsio-3.490-system-zlib.patch
new file mode 100644
index 00000000000..6ade40ce62f
--- /dev/null
+++ b/sci-libs/cfitsio/files/cfitsio-3.490-system-zlib.patch
@@ -0,0 +1,60 @@
+diff -ur a/Makefile.in b/Makefile.in
+--- a/Makefile.in	2019-05-08 17:34:50.000000000 +0200
++++ b/Makefile.in	2019-08-01 15:52:57.829760351 +0200
+@@ -68,9 +68,7 @@
+ 		pliocomp.c fits_hcompress.c fits_hdecompress.c \
+ 		simplerng.c @GSIFTP_SRC@
+ 
+-ZLIB_SOURCES =	zlib/adler32.c zlib/crc32.c zlib/deflate.c zlib/infback.c \
+-		zlib/inffast.c zlib/inflate.c zlib/inftrees.c zlib/trees.c \
+-		zlib/uncompr.c zlib/zcompress.c zlib/zuncompress.c zlib/zutil.c
++ZLIB_SOURCES = zlib/zcompress.c zlib/zuncompress.c
+ 
+ SOURCES = ${CORE_SOURCES} ${ZLIB_SOURCES} @F77_WRAPPERS@
+ 
+@@ -103,7 +101,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} $@; \
+@@ -140,28 +138,28 @@
+ 		${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}
+ 
+ eval:		# Rebuild eval_* files from flex/bison source
+ 		${FLEX} -t eval.l > eval_l.c1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/cfitsio/files/, sci-libs/cfitsio/
@ 2025-03-10  1:37 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-03-10  1:37 UTC (permalink / raw
  To: gentoo-commits

commit:     7ac36f22a5ee77e6516ba65ce6ef9dabb9825be1
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Sat Mar  1 09:27:14 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 10 01:36:31 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ac36f22

sci-libs/cfitsio: port to C23

Rename nullptr to ptr_to_null, as it points to null in string, not
is pointer that is null.

Closes: https://bugs.gentoo.org/943959
Closes: https://bugs.gentoo.org/944747
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/40826
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/cfitsio/cfitsio-4.5.0-r1.ebuild           | 73 ++++++++++++++++++++++
 .../files/cfitsio-4.5.0-rename-nullptr.patch       | 51 +++++++++++++++
 2 files changed, 124 insertions(+)

diff --git a/sci-libs/cfitsio/cfitsio-4.5.0-r1.ebuild b/sci-libs/cfitsio/cfitsio-4.5.0-r1.ebuild
new file mode 100644
index 000000000000..c50383b46670
--- /dev/null
+++ b/sci-libs/cfitsio/cfitsio-4.5.0-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib fortran-2
+
+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-r1"
+KEYWORDS="~alpha ~amd64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="bzip2 curl test tools"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+	app-alternatives/yacc
+	app-alternatives/lex
+"
+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}/${P}-rename-nullptr.patch" )
+
+pkg_setup() {
+	fortran-2_pkg_setup
+}
+
+src_prepare() {
+	cmake_src_prepare
+
+	# fix libdir
+	sed -e 's:lib/::' -i CMakeLists.txt || die
+
+	# Avoid internal cfortran
+	rm cfortran.h || die
+}
+
+multilib_src_configure() {
+	local libdir=$(get_libdir)
+	local mycmakeargs=(
+		# used for .pc file
+		-DLIB_SUFFIX=${libdir#lib}
+
+		-DUSE_BZIP2=$(usex bzip2)
+		-DUSE_CURL=$(usex curl)
+		-DUSE_PTHREADS=ON
+		# just appending CFLAGS
+		-DUSE_SSE2=OFF
+		-DUSE_SSSE3=OFF
+
+		-DTESTS=$(usex test)
+		-DUTILS=$(multilib_native_usex tools)
+	)
+	cmake_src_configure
+}
+
+multilib_src_install_all() {
+	dodoc README.md docs/*.pdf
+
+	docinto examples
+	dodoc utilities/{cookbook.{c,f},testprog.c,testf77.f,speed.c,smem.c}
+}

diff --git a/sci-libs/cfitsio/files/cfitsio-4.5.0-rename-nullptr.patch b/sci-libs/cfitsio/files/cfitsio-4.5.0-rename-nullptr.patch
new file mode 100644
index 000000000000..6281d7f7e324
--- /dev/null
+++ b/sci-libs/cfitsio/files/cfitsio-4.5.0-rename-nullptr.patch
@@ -0,0 +1,51 @@
+Nullptr is reserved keyword in C23. Rename to something that describes usage better
+https://bugs.gentoo.org/944747
+--- a/putcol.c
++++ b/putcol.c
+@@ -1226,7 +1226,7 @@
+     long rept, rowrept, width, tnull, naxes[9] = {1,1,1,1,1,1,1,1,1}, groups;
+     double zeros = 0.;
+     char message[FLEN_ERRMSG], keyname[FLEN_KEYWORD], nullstr[FLEN_VALUE];
+-    char **stringptr, *nullptr, *cptr;
++    char **stringptr, *ptr_to_null, *cptr;
+ 
+     if (*status > 0)
+         return(*status);
+@@ -2081,24 +2081,24 @@
+           {
+             stringptr = cols[jj].array;
+             dataptr = stringptr + 1;
+-            nullptr = *stringptr;
++            ptr_to_null = *stringptr;
+             nbytes = 2;
+           }
+           else
+           {
+             dataptr = (char *) cols[jj].array + col[jj].nullsize;
+-            nullptr = (char *) cols[jj].array;
++            ptr_to_null = (char *) cols[jj].array;
+             nbytes = col[jj].nullsize;
+           }
+ 
+-          if (memcmp(nullptr, &zeros, nbytes) ) 
++          if (memcmp(ptr_to_null, &zeros, nbytes) ) 
+           {
+             /* null value flag not zero; must check for and write nulls */
+             if (hdutype == IMAGE_HDU)   
+             {
+                 if (ffppn(cols[jj].fptr, cols[jj].datatype, 
+                       felement, cols[jj].repeat * ntodo, dataptr,
+-                      nullptr, &tstatus) > 0)
++                      ptr_to_null, &tstatus) > 0)
+                 break;
+             }
+             else
+@@ -2113,7 +2113,7 @@
+ 
+                 if (ffpcn(cols[jj].fptr, cols[jj].datatype, cols[jj].colnum, frow,
+                       felement, cols[jj].repeat * ntodo, dataptr,
+-                      nullptr, &tstatus) > 0)
++                      ptr_to_null, &tstatus) > 0)
+                 break;
+             }
+           }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-10  1:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10  1:37 [gentoo-commits] repo/gentoo:master commit in: sci-libs/cfitsio/files/, sci-libs/cfitsio/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2021-01-02 20:31 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox