1 |
commit: c483b68977abd67da3b10c13b6d4da9656ddecf4 |
2 |
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 10 14:43:18 2021 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 10 14:43:41 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c483b689 |
7 |
|
8 |
sci-libs/hdf: add version 4.2.15 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/771648 |
11 |
Package-Manager: Portage-3.0.19, Repoman-3.0.3 |
12 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
13 |
|
14 |
sci-libs/hdf/Manifest | 1 + |
15 |
.../files/hdf-4.2.15-enable-fortran-shared.patch | 37 +++++++++++ |
16 |
.../hdf/files/hdf-4.2.15-fix-rpch-location.patch | 13 ++++ |
17 |
sci-libs/hdf/hdf-4.2.15.ebuild | 77 ++++++++++++++++++++++ |
18 |
4 files changed, 128 insertions(+) |
19 |
|
20 |
diff --git a/sci-libs/hdf/Manifest b/sci-libs/hdf/Manifest |
21 |
index e10b0af4e45..ffbb29281d6 100644 |
22 |
--- a/sci-libs/hdf/Manifest |
23 |
+++ b/sci-libs/hdf/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST hdf-4.2.13.tar.bz2 3616255 BLAKE2B 3b20f018849b64aebc0e5fa53516f65f6e181b421c3842a033c2ec5586c262f18cb0be5c2a146bdecd9ae7580963817face2a21458852756f5b7072b7e6d5899 SHA512 d7be2b3650255590b72db4a6931325ec0af256db4b846cfe886c76bf24034901b2ba7a7e546566f426d265b1793287ea3f95d8fbd818a3d018fa6813a4541657 |
26 |
+DIST hdf-4.2.15.tar.bz2 3647900 BLAKE2B b1d60ee880563bf64ae6eae4c66f86afe55f4c512f06c84c154de30034fa7a65cfa2b9bd68fbf8a055bb42b57215455ac8967f2a73ec88b361750aa07e0da5e6 SHA512 7d4037800ef8950ed74f225355ef5458444bed26fc189fbbd2ce7d36009998013ac1f6ba5d4e60834acf8f6f73550357238745acc35e162679919400a48191e9 |
27 |
|
28 |
diff --git a/sci-libs/hdf/files/hdf-4.2.15-enable-fortran-shared.patch b/sci-libs/hdf/files/hdf-4.2.15-enable-fortran-shared.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..8c6a1c9f868 |
31 |
--- /dev/null |
32 |
+++ b/sci-libs/hdf/files/hdf-4.2.15-enable-fortran-shared.patch |
33 |
@@ -0,0 +1,37 @@ |
34 |
+diff --git a/configure.ac b/configure.ac |
35 |
+index 0014f85..5601a1c 100644 |
36 |
+--- a/configure.ac |
37 |
++++ b/configure.ac |
38 |
+@@ -290,20 +290,6 @@ fi |
39 |
+ ## Build static libraries by default. Furthermore, fortran shared libraries |
40 |
+ ## are unsupported. Disallow a user from enabling both shared libraries and |
41 |
+ ## fortran. |
42 |
+-if test "X${enable_shared}" != "Xyes"; then |
43 |
+- enable_shared="no" |
44 |
+-fi |
45 |
+- |
46 |
+-if test "X${enable_shared}" = "Xyes"; then |
47 |
+- if test "X${BUILD_FORTRAN}" = "Xyes"; then |
48 |
+- AC_MSG_ERROR([Cannot build shared fortran libraries. Please configure with --disable-fortran flag.]) |
49 |
+- fi |
50 |
+-fi |
51 |
+- |
52 |
+-AC_PROG_INSTALL |
53 |
+-AC_PROG_LN_S |
54 |
+- |
55 |
+-AC_CHECK_PROGS([AR], [ar xar], [:], [$PATH]) |
56 |
+ |
57 |
+ AC_CHECK_PROGS([YACC], ['bison -y' byacc yacc], [none], []) |
58 |
+ |
59 |
+@@ -948,11 +934,6 @@ done |
60 |
+ ## ------------------------------------------------------------------------ |
61 |
+ ## Check to see if libtool has enabled shared libraries. Set a conditional |
62 |
+ ## as some Makefiles will build based on availability of shared libraries. |
63 |
+-if (./libtool --features | grep '^enable shared libraries' > /dev/null); then |
64 |
+- enable_shared=yes |
65 |
+-else |
66 |
+- enable_shared=no |
67 |
+-fi |
68 |
+ |
69 |
+ ## ------------------------------------------------------------------------ |
70 |
+ ## Specify shared library extension the host machine should recognize. |
71 |
|
72 |
diff --git a/sci-libs/hdf/files/hdf-4.2.15-fix-rpch-location.patch b/sci-libs/hdf/files/hdf-4.2.15-fix-rpch-location.patch |
73 |
new file mode 100644 |
74 |
index 00000000000..a373649e2ab |
75 |
--- /dev/null |
76 |
+++ b/sci-libs/hdf/files/hdf-4.2.15-fix-rpch-location.patch |
77 |
@@ -0,0 +1,13 @@ |
78 |
+diff --git a/configure.ac b/configure.ac |
79 |
+index 5601a1c..df03984 100644 |
80 |
+--- a/configure.ac |
81 |
++++ b/configure.ac |
82 |
+@@ -693,7 +693,7 @@ if test "X$BUILD_XDR" != "Xyes"; then |
83 |
+ if test -z "$HAVE_OLDRPC" ; then |
84 |
+ LIBS="$LIBS -ltirpc" |
85 |
+ CPPFLAGS="$SYSCPPFLAGS -I/usr/include/tirpc" |
86 |
+- AC_CHECK_HEADER([rpc/rpc.h],[:], [unset HAVE_TIRPC]) |
87 |
++ AC_CHECK_HEADER([tirpc/rpc/rpc.h],[:], [unset HAVE_TIRPC]) |
88 |
+ if test -z "$HAVE_TIRPC" ; then |
89 |
+ CPPFLAGS="$SYSCPPFLAGS" |
90 |
+ AC_MSG_ERROR([couldn't find rpc headers]) |
91 |
|
92 |
diff --git a/sci-libs/hdf/hdf-4.2.15.ebuild b/sci-libs/hdf/hdf-4.2.15.ebuild |
93 |
new file mode 100644 |
94 |
index 00000000000..b2ff7488868 |
95 |
--- /dev/null |
96 |
+++ b/sci-libs/hdf/hdf-4.2.15.ebuild |
97 |
@@ -0,0 +1,77 @@ |
98 |
+# Copyright 1999-2021 Gentoo Authors |
99 |
+# Distributed under the terms of the GNU General Public License v2 |
100 |
+ |
101 |
+EAPI=7 |
102 |
+ |
103 |
+FORTRAN_NEEDED=fortran |
104 |
+ |
105 |
+inherit fortran-2 toolchain-funcs autotools flag-o-matic |
106 |
+ |
107 |
+DESCRIPTION="General purpose library and format for storing scientific data" |
108 |
+HOMEPAGE="https://www.hdfgroup.org/hdf4.html" |
109 |
+SRC_URI="https://support.hdfgroup.org/ftp/HDF/releases/${PN^^}${PV}/src/${P}.tar.bz2" |
110 |
+ |
111 |
+SLOT="0" |
112 |
+LICENSE="NCSA-HDF" |
113 |
+KEYWORDS="~amd64 ~ia64 ~ppc -sparc ~x86 ~amd64-linux ~x86-linux" |
114 |
+IUSE="examples fortran szip static-libs test" |
115 |
+RESTRICT="!test? ( test )" |
116 |
+REQUIRED_USE="test? ( szip )" |
117 |
+ |
118 |
+RDEPEND=" |
119 |
+ net-libs/libtirpc |
120 |
+ sys-libs/zlib |
121 |
+ virtual/jpeg:0 |
122 |
+ szip? ( virtual/szip )" |
123 |
+DEPEND="${RDEPEND} |
124 |
+ test? ( virtual/szip )" |
125 |
+ |
126 |
+PATCHES=( |
127 |
+ "${FILESDIR}"/${PN}-4.2.15-enable-fortran-shared.patch |
128 |
+ "${FILESDIR}"/${PN}-4.2.15-fix-rpch-location.patch |
129 |
+) |
130 |
+ |
131 |
+src_prepare() { |
132 |
+ default |
133 |
+ sed -i -e 's/-R/-L/g' config/commence.am || die #rpath |
134 |
+ eautoreconf |
135 |
+} |
136 |
+ |
137 |
+src_configure() { |
138 |
+ [[ $(tc-getFC) = *gfortran ]] && append-fflags -fno-range-check |
139 |
+ # GCC 10 workaround |
140 |
+ # bug #723014 |
141 |
+ append-fflags $(test-flags-FC -fallow-argument-mismatch) |
142 |
+ |
143 |
+ econf \ |
144 |
+ --enable-shared \ |
145 |
+ --enable-production=gentoo \ |
146 |
+ --disable-netcdf \ |
147 |
+ $(use_enable fortran) \ |
148 |
+ $(use_enable static-libs static) \ |
149 |
+ $(use_with szip szlib) \ |
150 |
+ CC="$(tc-getCC)" |
151 |
+} |
152 |
+ |
153 |
+src_install() { |
154 |
+ default |
155 |
+ |
156 |
+ if ! use static-libs; then |
157 |
+ find "${ED}" -name '*.la' -delete || die |
158 |
+ fi |
159 |
+ |
160 |
+ dodoc release_notes/{RELEASE,HISTORY,bugs_fixed,misc_docs}.txt |
161 |
+ |
162 |
+ cd "${ED}/usr" || die |
163 |
+ if use examples; then |
164 |
+ mv share/hdf4_examples share/doc/${PF}/examples || die |
165 |
+ docompress -x /usr/share/doc/${PF}/examples |
166 |
+ else |
167 |
+ rm -r share/hdf4_examples || die |
168 |
+ fi |
169 |
+ |
170 |
+ mv bin/ncgen{,-hdf} || die |
171 |
+ mv bin/ncdump{,-hdf} || die |
172 |
+ mv share/man/man1/ncgen{,-hdf}.1 || die |
173 |
+ mv share/man/man1/ncdump{,-hdf}.1 || die |
174 |
+} |