summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2021-06-10 16:43:18 +0200
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2021-06-10 16:43:41 +0200
commitc483b68977abd67da3b10c13b6d4da9656ddecf4 (patch)
tree0bcf20066846a316901002a85469b594545f6679 /sci-libs
parentapp-emulation/libvirt: fix systemd unit file for libvirt 7.0.0 (diff)
downloadgentoo-c483b68977abd67da3b10c13b6d4da9656ddecf4.tar.gz
gentoo-c483b68977abd67da3b10c13b6d4da9656ddecf4.tar.bz2
gentoo-c483b68977abd67da3b10c13b6d4da9656ddecf4.zip
sci-libs/hdf: add version 4.2.15
Closes: https://bugs.gentoo.org/771648 Package-Manager: Portage-3.0.19, Repoman-3.0.3 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/hdf/Manifest1
-rw-r--r--sci-libs/hdf/files/hdf-4.2.15-enable-fortran-shared.patch37
-rw-r--r--sci-libs/hdf/files/hdf-4.2.15-fix-rpch-location.patch13
-rw-r--r--sci-libs/hdf/hdf-4.2.15.ebuild77
4 files changed, 128 insertions, 0 deletions
diff --git a/sci-libs/hdf/Manifest b/sci-libs/hdf/Manifest
index e10b0af4e450..ffbb29281d6e 100644
--- a/sci-libs/hdf/Manifest
+++ b/sci-libs/hdf/Manifest
@@ -1 +1,2 @@
DIST hdf-4.2.13.tar.bz2 3616255 BLAKE2B 3b20f018849b64aebc0e5fa53516f65f6e181b421c3842a033c2ec5586c262f18cb0be5c2a146bdecd9ae7580963817face2a21458852756f5b7072b7e6d5899 SHA512 d7be2b3650255590b72db4a6931325ec0af256db4b846cfe886c76bf24034901b2ba7a7e546566f426d265b1793287ea3f95d8fbd818a3d018fa6813a4541657
+DIST hdf-4.2.15.tar.bz2 3647900 BLAKE2B b1d60ee880563bf64ae6eae4c66f86afe55f4c512f06c84c154de30034fa7a65cfa2b9bd68fbf8a055bb42b57215455ac8967f2a73ec88b361750aa07e0da5e6 SHA512 7d4037800ef8950ed74f225355ef5458444bed26fc189fbbd2ce7d36009998013ac1f6ba5d4e60834acf8f6f73550357238745acc35e162679919400a48191e9
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
new file mode 100644
index 000000000000..8c6a1c9f8681
--- /dev/null
+++ b/sci-libs/hdf/files/hdf-4.2.15-enable-fortran-shared.patch
@@ -0,0 +1,37 @@
+diff --git a/configure.ac b/configure.ac
+index 0014f85..5601a1c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -290,20 +290,6 @@ fi
+ ## Build static libraries by default. Furthermore, fortran shared libraries
+ ## are unsupported. Disallow a user from enabling both shared libraries and
+ ## fortran.
+-if test "X${enable_shared}" != "Xyes"; then
+- enable_shared="no"
+-fi
+-
+-if test "X${enable_shared}" = "Xyes"; then
+- if test "X${BUILD_FORTRAN}" = "Xyes"; then
+- AC_MSG_ERROR([Cannot build shared fortran libraries. Please configure with --disable-fortran flag.])
+- fi
+-fi
+-
+-AC_PROG_INSTALL
+-AC_PROG_LN_S
+-
+-AC_CHECK_PROGS([AR], [ar xar], [:], [$PATH])
+
+ AC_CHECK_PROGS([YACC], ['bison -y' byacc yacc], [none], [])
+
+@@ -948,11 +934,6 @@ done
+ ## ------------------------------------------------------------------------
+ ## Check to see if libtool has enabled shared libraries. Set a conditional
+ ## as some Makefiles will build based on availability of shared libraries.
+-if (./libtool --features | grep '^enable shared libraries' > /dev/null); then
+- enable_shared=yes
+-else
+- enable_shared=no
+-fi
+
+ ## ------------------------------------------------------------------------
+ ## Specify shared library extension the host machine should recognize.
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
new file mode 100644
index 000000000000..a373649e2ab4
--- /dev/null
+++ b/sci-libs/hdf/files/hdf-4.2.15-fix-rpch-location.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index 5601a1c..df03984 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -693,7 +693,7 @@ if test "X$BUILD_XDR" != "Xyes"; then
+ if test -z "$HAVE_OLDRPC" ; then
+ LIBS="$LIBS -ltirpc"
+ CPPFLAGS="$SYSCPPFLAGS -I/usr/include/tirpc"
+- AC_CHECK_HEADER([rpc/rpc.h],[:], [unset HAVE_TIRPC])
++ AC_CHECK_HEADER([tirpc/rpc/rpc.h],[:], [unset HAVE_TIRPC])
+ if test -z "$HAVE_TIRPC" ; then
+ CPPFLAGS="$SYSCPPFLAGS"
+ AC_MSG_ERROR([couldn't find rpc headers])
diff --git a/sci-libs/hdf/hdf-4.2.15.ebuild b/sci-libs/hdf/hdf-4.2.15.ebuild
new file mode 100644
index 000000000000..b2ff7488868a
--- /dev/null
+++ b/sci-libs/hdf/hdf-4.2.15.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+FORTRAN_NEEDED=fortran
+
+inherit fortran-2 toolchain-funcs autotools flag-o-matic
+
+DESCRIPTION="General purpose library and format for storing scientific data"
+HOMEPAGE="https://www.hdfgroup.org/hdf4.html"
+SRC_URI="https://support.hdfgroup.org/ftp/HDF/releases/${PN^^}${PV}/src/${P}.tar.bz2"
+
+SLOT="0"
+LICENSE="NCSA-HDF"
+KEYWORDS="~amd64 ~ia64 ~ppc -sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples fortran szip static-libs test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="test? ( szip )"
+
+RDEPEND="
+ net-libs/libtirpc
+ sys-libs/zlib
+ virtual/jpeg:0
+ szip? ( virtual/szip )"
+DEPEND="${RDEPEND}
+ test? ( virtual/szip )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.2.15-enable-fortran-shared.patch
+ "${FILESDIR}"/${PN}-4.2.15-fix-rpch-location.patch
+)
+
+src_prepare() {
+ default
+ sed -i -e 's/-R/-L/g' config/commence.am || die #rpath
+ eautoreconf
+}
+
+src_configure() {
+ [[ $(tc-getFC) = *gfortran ]] && append-fflags -fno-range-check
+ # GCC 10 workaround
+ # bug #723014
+ append-fflags $(test-flags-FC -fallow-argument-mismatch)
+
+ econf \
+ --enable-shared \
+ --enable-production=gentoo \
+ --disable-netcdf \
+ $(use_enable fortran) \
+ $(use_enable static-libs static) \
+ $(use_with szip szlib) \
+ CC="$(tc-getCC)"
+}
+
+src_install() {
+ default
+
+ if ! use static-libs; then
+ find "${ED}" -name '*.la' -delete || die
+ fi
+
+ dodoc release_notes/{RELEASE,HISTORY,bugs_fixed,misc_docs}.txt
+
+ cd "${ED}/usr" || die
+ if use examples; then
+ mv share/hdf4_examples share/doc/${PF}/examples || die
+ docompress -x /usr/share/doc/${PF}/examples
+ else
+ rm -r share/hdf4_examples || die
+ fi
+
+ mv bin/ncgen{,-hdf} || die
+ mv bin/ncdump{,-hdf} || die
+ mv share/man/man1/ncgen{,-hdf}.1 || die
+ mv share/man/man1/ncdump{,-hdf}.1 || die
+}