Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/cfitsio/
Date: Sun, 03 Jul 2022 09:02:06
Message-Id: 1656838906.f230930432261e86b1379a475260922fbce3eec9.andrewammerlaan@gentoo
1 commit: f230930432261e86b1379a475260922fbce3eec9
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Thu Jun 30 02:28:05 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 3 09:01:46 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2309304
7
8 sci-libs/cfitsio: remove smem binary
9
10 Closes: https://bugs.gentoo.org/855191
11 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
12 Closes: https://github.com/gentoo/gentoo/pull/26159
13 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
14
15 sci-libs/cfitsio/cfitsio-4.1.0-r1.ebuild | 87 ++++++++++++++++++++++++++++++++
16 1 file changed, 87 insertions(+)
17
18 diff --git a/sci-libs/cfitsio/cfitsio-4.1.0-r1.ebuild b/sci-libs/cfitsio/cfitsio-4.1.0-r1.ebuild
19 new file mode 100644
20 index 000000000000..e3858e96e7cc
21 --- /dev/null
22 +++ b/sci-libs/cfitsio/cfitsio-4.1.0-r1.ebuild
23 @@ -0,0 +1,87 @@
24 +# Copyright 1999-2022 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=8
28 +
29 +inherit fortran-2 multilib-minimal
30 +
31 +DESCRIPTION="C and Fortran library for manipulating FITS files"
32 +HOMEPAGE="https://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html"
33 +SRC_URI="https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/${P}.tar.gz"
34 +
35 +LICENSE="ISC"
36 +SLOT="0/9"
37 +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris"
38 +IUSE="bzip2 curl threads tools cpu_flags_x86_sse2 cpu_flags_x86_ssse3"
39 +
40 +BDEPEND="
41 + sys-devel/bison
42 + sys-devel/flex
43 +"
44 +RDEPEND="
45 + sys-libs/zlib[${MULTILIB_USEDEP}]
46 + bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
47 + curl? ( net-misc/curl[${MULTILIB_USEDEP}] )
48 +"
49 +# Bug #803350
50 +DEPEND="${RDEPEND}
51 + <dev-lang/cfortran-20110621
52 +"
53 +
54 +PATCHES=(
55 + "${FILESDIR}/${PN}-3.490-ldflags.patch"
56 + "${FILESDIR}/${P}-system-zlib.patch"
57 + "${FILESDIR}/${P}-pkgconfig.patch"
58 +)
59 +
60 +pkg_setup() {
61 + fortran-2_pkg_setup
62 +}
63 +
64 +src_prepare() {
65 + default
66 +
67 + # Avoid internal cfortran
68 + mv cfortran.h cfortran.h.disabled || die
69 + ln -s "${EPREFIX}"/usr/include/cfortran.h . || die
70 +
71 + multilib_copy_sources
72 +}
73 +
74 +multilib_src_configure() {
75 + local myeconfargs=(
76 + $(use_with bzip2)
77 + $(use_enable curl)
78 + $(use_enable threads reentrant)
79 + $(use_enable cpu_flags_x86_sse2 sse2)
80 + $(use_enable cpu_flags_x86_ssse3 ssse3)
81 + )
82 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
83 +}
84 +
85 +multilib_src_compile() {
86 + default
87 +
88 + if use tools ; then
89 + emake utils
90 + fi
91 +}
92 +
93 +multilib_src_install_all() {
94 + dodoc README docs/changes.txt
95 +
96 + dodoc docs/{quick,cfitsio,fpackguide}.pdf
97 + dodoc docs/fitsio.pdf
98 +
99 + docinto examples
100 + dodoc cookbook.c testprog.c speed.c smem.c
101 + dodoc cookbook.f testf77.f
102 +
103 + # https://bugs.gentoo.org/855191
104 + if use tools; then
105 + rm "${ED}/usr/bin/smem" || die
106 + fi
107 +
108 + # Remove static libs
109 + find "${ED}" -name '*.a' -delete || die
110 +}