diff options
author | Ludovic Courtès <ludovic.courtes@inria.fr> | 2020-03-22 16:48:14 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-03-22 16:49:47 +0100 |
commit | 23b39478977bd0812f861e24324915d18979aa70 (patch) | |
tree | b9f568ed34d5c2f7d76c766c9286a994373ff3a4 /gnu | |
parent | 9acacb71c958218fd69cf0fb9df0b439a980a0f2 (diff) | |
download | guix-23b39478977bd0812f861e24324915d18979aa70.tar.gz |
gnu: libchop: Build against libtirpc and related tools.
* gnu/packages/backup.scm (libchop)[source]: Add 'modules' and 'snippet'. [arguments]: Add #:configure-flags; add 'set-libtirpc-include-path' phase. [native-inputs]: Add RPCSVC-PROTO. [inputs]: Add LIBTIRPC.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/backup.scm | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index b18dbf30f0..4d24dff0a3 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -59,6 +59,7 @@ #:use-module (gnu packages linux) #:use-module (gnu packages mcrypt) #:use-module (gnu packages nettle) + #:use-module (gnu packages onc-rpc) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -470,10 +471,26 @@ rsnapshot uses hard links to deduplicate identical files.") (sha256 (base32 "0fpdyxww41ba52d98blvnf543xvirq1v9xz1i3x1gm9lzlzpmc2g")) - (patches (search-patches "diffutils-gets-undeclared.patch")))) + (patches (search-patches "diffutils-gets-undeclared.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Include all the libtirpc headers necessary to get the + ;; definitions of 'u_int', etc. + (substitute* '("src/block-server.c" + "include/chop/block-server.h" + "utils/chop-block-server.c") + (("#include <rpc/(.*)\\.h>" _ header) + (string-append "#include <rpc/types.h>\n" + "#include <rpc/rpc.h>\n" + "#include <rpc/" header ".h>\n"))) + #t)))) (build-system gnu-build-system) (arguments - '(#:phases (modify-phases %standard-phases + '(;; Link against libtirpc. + #:configure-flags '("LDFLAGS=-ltirpc -Wl,--as-needed") + + #:phases (modify-phases %standard-phases (add-before 'configure 'adjust-configure-script (lambda _ ;; Mimic upstream commit @@ -483,6 +500,15 @@ rsnapshot uses hard links to deduplicate identical files.") (string-append "GUILE=" middle "--variable bindir`/guile"))) #t)) + (add-before 'build 'set-libtirpc-include-path + (lambda* (#:key inputs #:allow-other-keys) + ;; Allow <rpc/rpc.h> & co. to be found. + (let ((libtirpc (assoc-ref inputs "libtirpc"))) + (setenv "CPATH" + (string-append (getenv "CPATH") + ":" libtirpc + "/include/tirpc")) + #t))) (add-before 'check 'skip-test (lambda _ ;; XXX: This test fails (1) because current GnuTLS no @@ -493,10 +519,12 @@ rsnapshot uses hard links to deduplicate identical files.") (native-inputs `(("guile" ,guile-2.0) ("gperf" ,gperf-3.0) ;see <https://bugs.gnu.org/32382> - ("pkg-config" ,pkg-config))) + ("pkg-config" ,pkg-config) + ("rpcsvc-proto" ,rpcsvc-proto))) ;for 'rpcgen' (inputs `(("guile" ,guile-2.0) ("util-linux" ,util-linux) + ("libtirpc" ,libtirpc) ("gnutls" ,gnutls) ("tdb" ,tdb) ("bdb" ,bdb) |