[bug#33308,v2,1/2] gnu: mash: Fix build with capnproto 0.7.

Message ID 20181126190433.25295-1-mail@cbaines.net
State Accepted
Commit 9718265eecf8e463405954886be71c4dbd52358a
Headers show
Series [bug#33308,v2,1/2] gnu: mash: Fix build with capnproto 0.7. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Christopher Baines Nov. 26, 2018, 7:04 p.m. UTC
I'm looking to upgrade capnproto, and mash fails to build with 0.7. Therefore,
tweak the compilation to allow it to build with 0.7. The package also builds
with the current version of capnproto. I got the idea of changing the c++
version from here [1].

1: https://github.com/marbl/Mash/issues/98

* gnu/packages/bioinformatics.scm (mash)[arguments]: Add new use-c++14 phase.
---
 gnu/packages/bioinformatics.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

Patch

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 782af294e0..571d85aed7 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -4018,6 +4018,14 @@  sequences).")
                             "src/mash/CommandScreen.cpp")
                (("^#include \"kseq\\.h\"")
                 "#include \"htslib/kseq.h\""))
+             #t))
+         (add-after 'fix-includes 'use-c++14
+           (lambda _
+             ;; capnproto 0.7 requires c++14 to build
+             (substitute* "configure.ac"
+               (("c\\+\\+11") "c++14"))
+             (substitute* "Makefile.in"
+               (("c\\+\\+11") "c++14"))
              #t)))))
     (native-inputs
      `(("autoconf" ,autoconf)