1 |
commit: 84b1a3a4e4fb165d9a76d53ebc4b24de5568ae83 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 8 04:17:14 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 8 04:19:34 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84b1a3a4 |
7 |
|
8 |
sci-libs/hdf: support additional architectures |
9 |
|
10 |
Pull in patches from Fedora [0] and Debian [1] with some simple rebasing |
11 |
(added riscv, hppa, sparc64 by cherry-picking extra bits too). |
12 |
|
13 |
All references included in the respective patches within |
14 |
the patch tarball too. |
15 |
|
16 |
This should, in total, give us: |
17 |
- hppa |
18 |
- sparc{,64} |
19 |
- arm |
20 |
- arm64 |
21 |
- ppc |
22 |
- ppc64(le?) |
23 |
- s390 |
24 |
|
25 |
[0] https://src.fedoraproject.org/rpms/hdf/tree/rawhide |
26 |
[1] https://sources.debian.org/patches/libhdf4/4.2.15-4/ |
27 |
|
28 |
Bug: https://bugs.gentoo.org/664856 |
29 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
30 |
|
31 |
sci-libs/hdf/Manifest | 1 + |
32 |
sci-libs/hdf/hdf-4.2.15-r1.ebuild | 82 +++++++++++++++++++++++++++++++++++++++ |
33 |
2 files changed, 83 insertions(+) |
34 |
|
35 |
diff --git a/sci-libs/hdf/Manifest b/sci-libs/hdf/Manifest |
36 |
index ffbb29281d6e..74b9e9dfb5b1 100644 |
37 |
--- a/sci-libs/hdf/Manifest |
38 |
+++ b/sci-libs/hdf/Manifest |
39 |
@@ -1,2 +1,3 @@ |
40 |
DIST hdf-4.2.13.tar.bz2 3616255 BLAKE2B 3b20f018849b64aebc0e5fa53516f65f6e181b421c3842a033c2ec5586c262f18cb0be5c2a146bdecd9ae7580963817face2a21458852756f5b7072b7e6d5899 SHA512 d7be2b3650255590b72db4a6931325ec0af256db4b846cfe886c76bf24034901b2ba7a7e546566f426d265b1793287ea3f95d8fbd818a3d018fa6813a4541657 |
41 |
+DIST hdf-4.2.15-arch-patches.tar.bz2 7012 BLAKE2B 58fd8ac608856fff95bd385aa01062820a7b58c6b89d9733709449ad20cedb691e1bcaeb314b0d846068af5a30cdf46740ce5d02f54be144c8e292b3c5db55d1 SHA512 c86a9aee2b0e388793f84bcaf2900f498ba481a00e8a3b50bb70b30f5a9631c6abfa99dc17fb9a7af13b47f50742cf40a69d5e79b515f22072eaae72656c3bda |
42 |
DIST hdf-4.2.15.tar.bz2 3647900 BLAKE2B b1d60ee880563bf64ae6eae4c66f86afe55f4c512f06c84c154de30034fa7a65cfa2b9bd68fbf8a055bb42b57215455ac8967f2a73ec88b361750aa07e0da5e6 SHA512 7d4037800ef8950ed74f225355ef5458444bed26fc189fbbd2ce7d36009998013ac1f6ba5d4e60834acf8f6f73550357238745acc35e162679919400a48191e9 |
43 |
|
44 |
diff --git a/sci-libs/hdf/hdf-4.2.15-r1.ebuild b/sci-libs/hdf/hdf-4.2.15-r1.ebuild |
45 |
new file mode 100644 |
46 |
index 000000000000..2c9f240f5c3e |
47 |
--- /dev/null |
48 |
+++ b/sci-libs/hdf/hdf-4.2.15-r1.ebuild |
49 |
@@ -0,0 +1,82 @@ |
50 |
+# Copyright 1999-2021 Gentoo Authors |
51 |
+# Distributed under the terms of the GNU General Public License v2 |
52 |
+ |
53 |
+EAPI=7 |
54 |
+ |
55 |
+FORTRAN_NEEDED=fortran |
56 |
+ |
57 |
+inherit fortran-2 toolchain-funcs autotools flag-o-matic |
58 |
+ |
59 |
+DESCRIPTION="General purpose library and format for storing scientific data" |
60 |
+HOMEPAGE="https://www.hdfgroup.org/hdf4.html" |
61 |
+SRC_URI="https://support.hdfgroup.org/ftp/HDF/releases/${PN^^}${PV}/src/${P}.tar.bz2" |
62 |
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-4.2.15-arch-patches.tar.bz2" |
63 |
+ |
64 |
+LICENSE="NCSA-HDF" |
65 |
+SLOT="0" |
66 |
+KEYWORDS="~amd64 ~ia64 ~ppc -riscv ~x86 ~amd64-linux ~x86-linux" |
67 |
+IUSE="examples fortran szip static-libs test" |
68 |
+RESTRICT="!test? ( test )" |
69 |
+REQUIRED_USE="test? ( szip )" |
70 |
+ |
71 |
+RDEPEND="net-libs/libtirpc:= |
72 |
+ sys-libs/zlib |
73 |
+ virtual/jpeg:0 |
74 |
+ szip? ( virtual/szip )" |
75 |
+DEPEND="${RDEPEND} |
76 |
+ test? ( virtual/szip )" |
77 |
+ |
78 |
+PATCHES=( |
79 |
+ "${FILESDIR}"/${PN}-4.2.15-enable-fortran-shared.patch |
80 |
+ "${FILESDIR}"/${PN}-4.2.15-fix-rpch-location.patch |
81 |
+ |
82 |
+ # May need to extend these for more arches in future. |
83 |
+ # bug #664856 |
84 |
+ "${FILESDIR}"/${PN}-4.2.15-arch-patches/ |
85 |
+) |
86 |
+ |
87 |
+src_prepare() { |
88 |
+ default |
89 |
+ |
90 |
+ sed -i -e 's/-R/-L/g' config/commence.am || die #rpath |
91 |
+ eautoreconf |
92 |
+} |
93 |
+ |
94 |
+src_configure() { |
95 |
+ [[ $(tc-getFC) = *gfortran ]] && append-fflags -fno-range-check |
96 |
+ # GCC 10 workaround |
97 |
+ # bug #723014 |
98 |
+ append-fflags $(test-flags-FC -fallow-argument-mismatch) |
99 |
+ |
100 |
+ econf \ |
101 |
+ --enable-shared \ |
102 |
+ --enable-production=gentoo \ |
103 |
+ --disable-netcdf \ |
104 |
+ $(use_enable fortran) \ |
105 |
+ $(use_enable static-libs static) \ |
106 |
+ $(use_with szip szlib) \ |
107 |
+ CC="$(tc-getCC)" |
108 |
+} |
109 |
+ |
110 |
+src_install() { |
111 |
+ default |
112 |
+ |
113 |
+ if ! use static-libs; then |
114 |
+ find "${ED}" -name '*.la' -delete || die |
115 |
+ fi |
116 |
+ |
117 |
+ dodoc release_notes/{RELEASE,HISTORY,bugs_fixed,misc_docs}.txt |
118 |
+ |
119 |
+ cd "${ED}/usr" || die |
120 |
+ if use examples; then |
121 |
+ mv share/hdf4_examples share/doc/${PF}/examples || die |
122 |
+ docompress -x /usr/share/doc/${PF}/examples |
123 |
+ else |
124 |
+ rm -r share/hdf4_examples || die |
125 |
+ fi |
126 |
+ |
127 |
+ mv bin/ncgen{,-hdf} || die |
128 |
+ mv bin/ncdump{,-hdf} || die |
129 |
+ mv share/man/man1/ncgen{,-hdf}.1 || die |
130 |
+ mv share/man/man1/ncdump{,-hdf}.1 || die |
131 |
+} |