commit:     ddb167f03450fcc9869a3a230894a700a19812b1
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 22 14:28:07 2018 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Apr 22 14:28:07 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddb167f0

sci-libs/hdf: Revbump that uses libtirpc, bug 630868

Patches by Bernd Feige. This still needs to be stabilized.

Bug: https://bugs.gentoo.org/630868
Package-Manager: Portage-2.3.31, Repoman-2.3.9

 .../hdf/files/hdf-4.2.13-fix-xdr-configure.patch   | 13 ++++
 sci-libs/hdf/files/hdf-4.2.13-linux-tirpc.patch    | 29 +++++++++
 sci-libs/hdf/hdf-4.2.13-r1.ebuild                  | 72 ++++++++++++++++++++++
 3 files changed, 114 insertions(+)

diff --git a/sci-libs/hdf/files/hdf-4.2.13-fix-xdr-configure.patch 
b/sci-libs/hdf/files/hdf-4.2.13-fix-xdr-configure.patch
new file mode 100644
index 00000000000..a4514ab267e
--- /dev/null
+++ b/sci-libs/hdf/files/hdf-4.2.13-fix-xdr-configure.patch
@@ -0,0 +1,13 @@
+Index: hdf-4.2.13/configure.ac
+===================================================================
+--- hdf-4.2.13.orig/configure.ac
++++ hdf-4.2.13/configure.ac
+@@ -676,7 +676,7 @@ case "$host" in
+   *) ;;
+ esac
+ 
+-if test "X$BUILD_XDR" != "Xyes"; then
++if test "X$BUILD_XDR" = "Xyes"; then
+     AC_TRY_LINK([
+     #include <rpc/types.h>
+     #include <rpc/xdr.h>], [xdr_int],

diff --git a/sci-libs/hdf/files/hdf-4.2.13-linux-tirpc.patch 
b/sci-libs/hdf/files/hdf-4.2.13-linux-tirpc.patch
new file mode 100644
index 00000000000..963388f6698
--- /dev/null
+++ b/sci-libs/hdf/files/hdf-4.2.13-linux-tirpc.patch
@@ -0,0 +1,29 @@
+Index: hdf-4.2.13/configure.ac
+===================================================================
+--- hdf-4.2.13.orig/configure.ac
++++ hdf-4.2.13/configure.ac
+@@ -673,6 +673,9 @@ case "$host" in
+   *-pc-cygwin*)
+     LIBS="$LIBS -ltirpc"
+     CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc"  ;;
++  *-pc-linux*)
++    LIBS="$LIBS -ltirpc"
++    CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc"  ;;
+   *) ;;
+ esac
+ 
+@@ -703,6 +706,14 @@ if test "X$BUILD_XDR" != "Xyes"; then
+       HAVE_RPC="yes"
+       AC_CHECK_HEADER([rpc.h],[:], [unset HAVE_RPC])
+       AC_CHECK_LIB([tirpc], [xdr_opaque],[:], [unset HAVE_RPC])
++      if test -z "$HAVE_RPC"; then
++        AC_MSG_ERROR([couldn't find tirpc library])
++      fi
++      ;;
++     *-pc-linux*)
++      HAVE_RPC="yes"
++      AC_CHECK_HEADER([rpc/rpc.h],[:], [unset HAVE_RPC])
++      AC_CHECK_LIB([tirpc], [xdr_opaque],[:], [unset HAVE_RPC])
+       if test -z "$HAVE_RPC"; then
+         AC_MSG_ERROR([couldn't find tirpc library])
+       fi

diff --git a/sci-libs/hdf/hdf-4.2.13-r1.ebuild 
b/sci-libs/hdf/hdf-4.2.13-r1.ebuild
new file mode 100644
index 00000000000..331ad8938e5
--- /dev/null
+++ b/sci-libs/hdf/hdf-4.2.13-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+FORTRAN_NEEDED=fortran
+
+inherit fortran-2 toolchain-funcs autotools flag-o-matic
+
+MYP=${P/_p/-patch}
+
+DESCRIPTION="General purpose library and format for storing scientific data"
+HOMEPAGE="http://www.hdfgroup.org/hdf4.html";
+SRC_URI="http://www.hdfgroup.org/ftp/HDF/HDF_Current/src/${MYP}.tar.bz2";
+
+SLOT="0"
+LICENSE="NCSA-HDF"
+KEYWORDS="~amd64 ~ia64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples fortran szip static-libs test"
+REQUIRED_USE="test? ( szip )"
+
+RDEPEND="
+       net-libs/libtirpc
+       sys-libs/zlib
+       virtual/jpeg:0
+       szip? ( virtual/szip )"
+DEPEND="${RDEPEND}
+       test? ( virtual/szip )"
+
+S="${WORKDIR}/${MYP}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-4.2.11-fix-szip-detection.patch
+       "${FILESDIR}"/${PN}-4.2.11-enable-fortran-shared.patch
+       "${FILESDIR}"/${PN}-4.2.13-fix-xdr-configure.patch
+       "${FILESDIR}"/${PN}-4.2.13-linux-tirpc.patch
+)
+
+src_prepare() {
+       default
+       sed -i -e 's/-R/-L/g' config/commence.am || die #rpath
+       eautoreconf
+       [[ $(tc-getFC) = *gfortran ]] && append-fflags -fno-range-check
+}
+
+src_configure() {
+       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
+       use static-libs || prune_libtool_files --all
+       dodoc release_notes/{RELEASE,HISTORY,bugs_fixed,misc_docs}.txt
+       cd "${ED}"usr
+       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
+}

Reply via email to