1 |
commit: 0ddca19456af9c3dfeecf1e4f1ea8cf87763d6ed |
2 |
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 1 13:07:04 2022 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 1 13:07:14 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ddca194 |
7 |
|
8 |
sci-libs/cfitsio: add version 4.0.0 |
9 |
|
10 |
Co-authored-by: Samuel Bauer <samuel.bauer <AT> yahoo.fr> |
11 |
Closes: https://bugs.gentoo.org/828444 |
12 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
13 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
14 |
|
15 |
sci-libs/cfitsio/Manifest | 1 + |
16 |
sci-libs/cfitsio/cfitsio-4.0.0.ebuild | 73 ++++++++++++++++++++++ |
17 |
.../cfitsio/files/cfitsio-4.0.0-pkgconfig.patch | 20 ++++++ |
18 |
.../cfitsio/files/cfitsio-4.0.0-system-zlib.patch | 50 +++++++++++++++ |
19 |
4 files changed, 144 insertions(+) |
20 |
|
21 |
diff --git a/sci-libs/cfitsio/Manifest b/sci-libs/cfitsio/Manifest |
22 |
index 470fffa01b2d..e716f04e6788 100644 |
23 |
--- a/sci-libs/cfitsio/Manifest |
24 |
+++ b/sci-libs/cfitsio/Manifest |
25 |
@@ -1 +1,2 @@ |
26 |
DIST cfitsio-3.49.tar.gz 4934662 BLAKE2B ca8b701f0fec399d989efb61fdaa2bfbf49d0eea2d3ff47e156757c5a99bc77c23a1b91b4c91166696293c71c78210065dc48d0bb3c77039815f326d0ed55f0a SHA512 9836a4af3bbbfed1ea1b4c70b9d500ac485d7c3d8131eb8a25ee6ef6662f46ba52b5161c45c709ed9a601ff0e9ec36daa5650eaaf4f2cc7d6f4bb5640f10da15 |
27 |
+DIST cfitsio-4.0.0.tar.gz 4746177 BLAKE2B a43a21d29522cac84294e81ad5f0a45839c21c2fafcbde42504670e73757a41ebd91e42d086529df8139ce920446332f827b1abf027f8932ee73dd025103cd8e SHA512 a5b20bd6ad648450e99167f63813cc7523347aadfc9f85d2c0ed3ba7e4516b3bb6bc0851f209268f2cb045cdacc43a3da9e4506af4581f806ab9f4de248065fa |
28 |
|
29 |
diff --git a/sci-libs/cfitsio/cfitsio-4.0.0.ebuild b/sci-libs/cfitsio/cfitsio-4.0.0.ebuild |
30 |
new file mode 100644 |
31 |
index 000000000000..33e1c7b7b075 |
32 |
--- /dev/null |
33 |
+++ b/sci-libs/cfitsio/cfitsio-4.0.0.ebuild |
34 |
@@ -0,0 +1,73 @@ |
35 |
+# Copyright 1999-2022 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=8 |
39 |
+ |
40 |
+inherit fortran-2 multilib-minimal |
41 |
+ |
42 |
+DESCRIPTION="C and Fortran library for manipulating FITS files" |
43 |
+HOMEPAGE="https://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html" |
44 |
+SRC_URI="https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/${P}.tar.gz" |
45 |
+ |
46 |
+LICENSE="ISC" |
47 |
+SLOT="0/9" |
48 |
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris" |
49 |
+IUSE="bzip2 curl cpu_flags_x86_sse2 cpu_flags_x86_ssse3" |
50 |
+ |
51 |
+BDEPEND=" |
52 |
+ sys-devel/bison |
53 |
+ sys-devel/flex |
54 |
+" |
55 |
+RDEPEND=" |
56 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
57 |
+ bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] ) |
58 |
+ curl? ( net-misc/curl[${MULTILIB_USEDEP}] ) |
59 |
+" |
60 |
+# Bug #803350 |
61 |
+DEPEND="${RDEPEND} |
62 |
+ <dev-lang/cfortran-20110621 |
63 |
+" |
64 |
+ |
65 |
+PATCHES=( |
66 |
+ "${FILESDIR}/${PN}-3.490-ldflags.patch" |
67 |
+ "${FILESDIR}/${P}-system-zlib.patch" |
68 |
+ "${FILESDIR}/${P}-pkgconfig.patch" |
69 |
+) |
70 |
+ |
71 |
+pkg_setup() { |
72 |
+ fortran-2_pkg_setup |
73 |
+} |
74 |
+ |
75 |
+src_prepare() { |
76 |
+ default |
77 |
+ |
78 |
+ # Avoid internal cfortran |
79 |
+ mv cfortran.h cfortran.h.disabled || die |
80 |
+ ln -s "${EPREFIX}"/usr/include/cfortran.h . || die |
81 |
+ |
82 |
+ multilib_copy_sources |
83 |
+} |
84 |
+ |
85 |
+multilib_src_configure() { |
86 |
+ local myeconfargs=( |
87 |
+ $(use_with bzip2) |
88 |
+ $(use_enable curl) |
89 |
+ $(use_enable cpu_flags_x86_sse2 sse2) |
90 |
+ $(use_enable cpu_flags_x86_ssse3 ssse3) |
91 |
+ ) |
92 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
93 |
+} |
94 |
+ |
95 |
+multilib_src_install_all() { |
96 |
+ dodoc README docs/changes.txt |
97 |
+ |
98 |
+ dodoc docs/{quick,cfitsio,fpackguide}.pdf |
99 |
+ dodoc docs/fitsio.pdf |
100 |
+ |
101 |
+ docinto examples |
102 |
+ dodoc cookbook.c testprog.c speed.c smem.c |
103 |
+ dodoc cookbook.f testf77.f |
104 |
+ |
105 |
+ # Remove static libs |
106 |
+ find "${ED}" -name '*.a' -delete || die |
107 |
+} |
108 |
|
109 |
diff --git a/sci-libs/cfitsio/files/cfitsio-4.0.0-pkgconfig.patch b/sci-libs/cfitsio/files/cfitsio-4.0.0-pkgconfig.patch |
110 |
new file mode 100644 |
111 |
index 000000000000..4d743f2d32d9 |
112 |
--- /dev/null |
113 |
+++ b/sci-libs/cfitsio/files/cfitsio-4.0.0-pkgconfig.patch |
114 |
@@ -0,0 +1,20 @@ |
115 |
+diff --git a/cfitsio.pc.in b/cfitsio.pc.in |
116 |
+index 7cc25c6..95fb9d0 100644 |
117 |
+--- a/cfitsio.pc.in |
118 |
++++ b/cfitsio.pc.in |
119 |
+@@ -1,12 +1,12 @@ |
120 |
+ prefix=@prefix@ |
121 |
+ exec_prefix=@exec_prefix@ |
122 |
+ libdir=@libdir@ |
123 |
+-includedir=@includedir@ |
124 |
++includedir=@includedir@/cfitsio |
125 |
+ |
126 |
+ Name: cfitsio |
127 |
+ Description: FITS File Subroutine Library |
128 |
+ URL: https://heasarc.gsfc.nasa.gov/fitsio/ |
129 |
+ Version: @CFITSIO_MAJOR@.@CFITSIO_MINOR@.@CFITSIO_MICRO@ |
130 |
+ Libs: -L${libdir} -lcfitsio |
131 |
+-Libs.private: -lm @LIBS@ |
132 |
+-Cflags: -I${includedir} |
133 |
++Libs.private: -lm -lz @LIBS@ |
134 |
++Cflags: -D_REENTRANT -I${includedir} |
135 |
|
136 |
diff --git a/sci-libs/cfitsio/files/cfitsio-4.0.0-system-zlib.patch b/sci-libs/cfitsio/files/cfitsio-4.0.0-system-zlib.patch |
137 |
new file mode 100644 |
138 |
index 000000000000..f26f3d431505 |
139 |
--- /dev/null |
140 |
+++ b/sci-libs/cfitsio/files/cfitsio-4.0.0-system-zlib.patch |
141 |
@@ -0,0 +1,50 @@ |
142 |
+diff --git a/Makefile.in b/Makefile.in |
143 |
+index d607eec..b646458 100644 |
144 |
+--- a/Makefile.in |
145 |
++++ b/Makefile.in |
146 |
+@@ -102,7 +102,7 @@ lib${PACKAGE}.a: ${OBJECTS} |
147 |
+ shared: lib${PACKAGE}${SHLIB_SUFFIX} |
148 |
+ |
149 |
+ lib${PACKAGE}${SHLIB_SUFFIX}: ${OBJECTS} |
150 |
+- ${SHLIB_LD} ${LDFLAGS} -o ${CFITSIO_SHLIB} ${OBJECTS} -lm ${LIBS_CURL} ${LIBS} |
151 |
++ ${SHLIB_LD} ${LDFLAGS} -o ${CFITSIO_SHLIB} ${OBJECTS} -lm -lz -lbz2 ${LIBS_CURL} ${LIBS} |
152 |
+ @if [ "x${CFITSIO_SHLIB_SONAME}" != x ]; then \ |
153 |
+ ln -sf ${CFITSIO_SHLIB} ${CFITSIO_SHLIB_SONAME}; \ |
154 |
+ ln -sf ${CFITSIO_SHLIB_SONAME} $@; \ |
155 |
+@@ -140,28 +140,28 @@ swapproc.o: swapproc.c |
156 |
+ ${CC} -c ${CFLAGS} ${CPPFLAGS} ${SSE_FLAGS} ${DEFS} $< |
157 |
+ |
158 |
+ smem: smem.o lib${PACKAGE}.a ${OBJECTS} |
159 |
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm |
160 |
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz |
161 |
+ |
162 |
+ testprog: testprog.o lib${PACKAGE}.a ${OBJECTS} |
163 |
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS} |
164 |
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS} |
165 |
+ |
166 |
+ fpack: fpack.o fpackutil.o lib${PACKAGE}.a ${OBJECTS} |
167 |
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm ${LIBS} |
168 |
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm -lz ${LIBS} |
169 |
+ |
170 |
+ funpack: funpack.o fpackutil.o lib${PACKAGE}.a ${OBJECTS} |
171 |
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm ${LIBS} |
172 |
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o fpackutil.o -L. -l${PACKAGE} -lm -lz ${LIBS} |
173 |
+ |
174 |
+ fitscopy: fitscopy.o lib${PACKAGE}.a ${OBJECTS} |
175 |
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS} |
176 |
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS} |
177 |
+ |
178 |
+ speed: speed.o lib${PACKAGE}.a ${OBJECTS} |
179 |
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS} |
180 |
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS} |
181 |
+ |
182 |
+ imcopy: imcopy.o lib${PACKAGE}.a ${OBJECTS} |
183 |
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS} |
184 |
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS} |
185 |
+ |
186 |
+ cookbook: cookbook.o lib${PACKAGE}.a ${OBJECTS} |
187 |
+- ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm ${LIBS} |
188 |
++ ${CC} ${LDFLAGS_BIN} ${DEFS} -o $@ ${@}.o -L. -l${PACKAGE} -lm -lz ${LIBS} |
189 |
+ |
190 |
+ eval: # Rebuild eval_* files from flex/bison source |
191 |
+ ${FLEX} -t eval.l > eval_l.c1 |