|
From: | Ben Woodcroft |
Subject: | Re: [PATCH 3/3] gnu: Add khmer. |
Date: | Sat, 18 Jun 2016 09:41:46 +1000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
On 17/06/16 17:23, Leo Famulari wrote:
On Fri, Jun 17, 2016 at 11:23:21AM +1000, Ben Woodcroft wrote:+ (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'set-pathsThis phase deletes bundled libraries and then copies one of the libraries back in from another package (murmur-hash). Can khmer refer to murmur-hash without it being bundled at all?
By changing the Makefile or similar so that it refers to a 'murmur-hash' shared library? Maybe, but I don't think SMHasher creates one of these.
If you mean just referring to the code as it is in murmur-hash, then we'd have to change the Makefile so that it refers to that code. I figured copying the code in achieves the same thing with less effort on our part.
+ (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Delete bundled libraries. + (delete-file-recursively "third-party/zlib") + (delete-file-recursively "third-party/bzip2") + ;; Replace bundled seqan. + (let* ((seqan-all "third-party/seqan") + (seqan-include (string-append + seqan-all "/core/include/seqan"))) + (delete-file-recursively seqan-all) + (mkdir-p seqan-include) + (rmdir seqan-include)Here it makes the directory seqan-include and then removes it. Should it be reversed? Would it be simpler to delete the directory and then use copy-recursively, which I don't think requires mkdir-p?
The issue is that there are other (unused) files in 'third-part/seqan' that aren't useful code, and I wanted to be sure to delete all the bundle before starting the build. How about the slightly simplified
+ (let* ((seqan-all "third-party/seqan") + (seqan-include (string-append + seqan-all "/core/include"))) + (delete-file-recursively seqan-all) + (mkdir-p seqan-include) + (copy-file (string-append (assoc-ref inputs "seqan") + "/include/seqan") + (string-append seqan-include "/seqan")))It would be better if I knew a way of copying directory into another directory, like an "install-directory".
+ (copy-file (string-append (assoc-ref inputs "seqan") + "/include/seqan") + seqan-include)) + ;; Replace bundled MurmurHash. + (let ((smhasher "third-party/smhasher/")) + (delete-file-recursively smhasher) + (mkdir smhasher) + (for-each + (lambda (file) + (copy-file + (string-append + (assoc-ref inputs "murmur-hash") "/include/" file) + (string-append smhasher file))) + (list "MurmurHash3.cpp" "MurmurHash3.h")) + (rename-file + (string-append smhasher "MurmurHash3.cpp") + (string-append smhasher "MurmurHash3.cc"))) + (setenv "CC" "gcc")I think this variable setting should be in its own phase.
OK. ben
[Prev in Thread] | Current Thread | [Next in Thread] |