guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: hdf4: Build with libtirpc.


From: guix-commits
Subject: 01/02: gnu: hdf4: Build with libtirpc.
Date: Wed, 4 Sep 2019 07:21:39 -0400 (EDT)

mbakke pushed a commit to branch core-updates
in repository guix.

commit bd3d71cb16de546b534be7a3d03880922f6a1c07
Author: Marius Bakke <address@hidden>
Date:   Tue Sep 3 13:15:30 2019 +0200

    gnu: hdf4: Build with libtirpc.
    
    * gnu/packages/patches/hdf4-tirpc.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/maths.scm (hdf4)[source](patches): Use it.
    [inputs]: Add LIBTIRPC.
    [arguments]: Adjust #:configure-flags accordingly.
---
 gnu/local.mk                          |  1 +
 gnu/packages/maths.scm                | 12 +++++++++---
 gnu/packages/patches/hdf4-tirpc.patch | 33 +++++++++++++++++++++++++++++++++
 3 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index fe47653..b404727 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -944,6 +944,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/hdf4-architectures.patch                \
   %D%/packages/patches/hdf4-reproducibility.patch              \
   %D%/packages/patches/hdf4-shared-fortran.patch               \
+  %D%/packages/patches/hdf4-tirpc.patch                        \
   %D%/packages/patches/hdf5-config-date.patch                  \
   %D%/packages/patches/hdf5-mpi-deprecations.patch             \
   %D%/packages/patches/hdf5-1.8-mpi-deprecations.patch         \
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 38bb812..9e515fd 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -100,6 +100,7 @@
   #:use-module (gnu packages mpi)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages netpbm)
+  #:use-module (gnu packages onc-rpc)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages perl)
@@ -684,7 +685,8 @@ computations.")
         (base32 "1wz0586zh91pqb95wvr0pbh71a8rz358fdj6n2ksp85x2cis9lsm"))
        (patches (search-patches "hdf4-architectures.patch"
                                 "hdf4-reproducibility.patch"
-                                "hdf4-shared-fortran.patch"))))
+                                "hdf4-shared-fortran.patch"
+                                "hdf4-tirpc.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("gfortran" ,gfortran)
@@ -692,10 +694,14 @@ computations.")
        ("flex" ,flex)))
     (inputs
      `(("zlib" ,zlib)
-       ("libjpeg" ,libjpeg)))
+       ("libjpeg" ,libjpeg)
+       ("libtirpc" ,libtirpc)))
     (arguments
      `(#:parallel-tests? #f
-       #:configure-flags '("--enable-shared")
+       #:configure-flags (list "--enable-shared"
+                               (string-append "CPPFLAGS=-I"
+                                              (assoc-ref %build-inputs 
"libtirpc")
+                                              "/include/tirpc"))
        #:phases
        (modify-phases %standard-phases
          ;; This is inspired by two of Debian's patches.
diff --git a/gnu/packages/patches/hdf4-tirpc.patch 
b/gnu/packages/patches/hdf4-tirpc.patch
new file mode 100644
index 0000000..3f436e3
--- /dev/null
+++ b/gnu/packages/patches/hdf4-tirpc.patch
@@ -0,0 +1,33 @@
+Build with libtirpc on all architectures because glibc no longer provides
+SunRPC support.
+
+diff --git a/configure b/configure
+--- a/configure
++++ b/configure
+@@ -23635,10 +23635,13 @@
+   *-pc-cygwin*)
+     LIBS="$LIBS -ltirpc"
+     CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc"  ;;
++  *-linux-gnu)
++    LIBS="$LIBS -ltirpc"
++    CPPFLAGS="$CPPFLAGS"  ;;
+   *) ;;
+ esac
+ 
+-if test "X$BUILD_XDR" != "Xyes"; then
++if test "X$BUILD_XDR" = "Xyes"; then
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+@@ -23693,9 +23696,9 @@
+   ## but we need to make sure that it is present on the system. Do that here,
+   ## The SunRPC of the glibc has been replaced by a TI-RPC (Transport 
Independent RPC) library for IPv6 support
+   case "$host" in
+-    *-pc-cygwin*)
++    *)
+       HAVE_RPC="yes"
+-      ac_fn_c_check_header_mongrel "$LINENO" "rpc.h" "ac_cv_header_rpc_h" 
"$ac_includes_default"
++      ac_fn_c_check_header_mongrel "$LINENO" "rpc/rpc.h" "ac_cv_header_rpc_h" 
"$ac_includes_default"
+ if test "x$ac_cv_header_rpc_h" = xyes; then :
+   :
+ else



reply via email to

[Prev in Thread] Current Thread [Next in Thread]