Archived
1
0
Fork 0

gnu: ncbi-vdb: Ensure that vdb-sqlite is installed.

The most important change here is the addition of the 'install-libs phase.
All other changes are just the result of switching to G-expressions.

* gnu/packages/bioinformatics.scm (ncbi-vdb)[arguments]: Add 'install-libs
phase; use G-expression; drop trailing #T from build phases.
[inputs]: Drop package labels.
This commit is contained in:
Ricardo Wurmus 2023-05-12 21:51:41 +02:00
parent 263f235cd0
commit 8ba3bf6564
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -7561,99 +7561,99 @@ simultaneously.")
"0m8hlxscidsfqm9x9fyi62q6lpf1dv5115kgjjgnrkl49q9c27m6")))) "0m8hlxscidsfqm9x9fyi62q6lpf1dv5115kgjjgnrkl49q9c27m6"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:parallel-build? #f ; not supported (list
#:tests? #f ; no "check" target #:parallel-build? #f ; not supported
#:make-flags '("HAVE_HDF5=1") #:tests? #f ; no "check" target
#:phases #:make-flags '(list "HAVE_HDF5=1")
(modify-phases %standard-phases #:phases
(add-after 'unpack 'make-files-writable #~(modify-phases %standard-phases
(lambda _ (for-each make-file-writable (find-files "." ".*")) #t)) #;
(add-before 'configure 'set-perl-search-path (add-after 'unpack 'make-files-writable
(lambda _ (lambda _ (for-each make-file-writable (find-files "." ".*"))))
;; Work around "dotless @INC" build failure. (add-before 'configure 'set-perl-search-path
(setenv "PERL5LIB" (lambda _
(string-append (getcwd) "/setup:" ;; Work around "dotless @INC" build failure.
(getenv "PERL5LIB"))) (setenv "PERL5LIB"
#t)) (string-append (getcwd) "/setup:"
;; See https://github.com/ncbi/ncbi-vdb/issues/14 (getenv "PERL5LIB")))))
(add-after 'unpack 'patch-krypto-flags ;; See https://github.com/ncbi/ncbi-vdb/issues/14
(lambda _ (add-after 'unpack 'patch-krypto-flags
(substitute* "libs/krypto/Makefile" (lambda _
(("-Wa,-march=generic64\\+aes") "") (substitute* "libs/krypto/Makefile"
(("-Wa,-march=generic64\\+sse4") "")) (("-Wa,-march=generic64\\+aes") "")
#t)) (("-Wa,-march=generic64\\+sse4") ""))))
(replace 'configure (replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda _
(let ((out (assoc-ref outputs "out"))) ;; Override include path for libmagic
;; Override include path for libmagic (substitute* "setup/package.prl"
(substitute* "setup/package.prl" (("name => 'magic', Include => '/usr/include'")
(("name => 'magic', Include => '/usr/include'") (string-append "name=> 'magic', Include => '"
(string-append "name=> 'magic', Include => '" #$(this-package-input "file")
(assoc-ref inputs "libmagic") "/include" "'")))
"/include" "'")))
;; Install kdf5 library (needed by sra-tools) ;; Install kdf5 library (needed by sra-tools)
(substitute* "build/Makefile.install" (substitute* "build/Makefile.install"
(("LIBRARIES_TO_INSTALL =") (("LIBRARIES_TO_INSTALL =")
"LIBRARIES_TO_INSTALL = kdf5.$(VERSION_LIBX) kdf5.$(VERSION_SHLX)")) "LIBRARIES_TO_INSTALL = kdf5.$(VERSION_LIBX) kdf5.$(VERSION_SHLX)"))
(substitute* "build/Makefile.env" (substitute* "build/Makefile.env"
(("CFLAGS =" prefix) (("CFLAGS =" prefix)
(string-append prefix "-msse2 "))) (string-append prefix "-msse2 ")))
;; Override search path for ngs-java ;; Override search path for ngs-java
(substitute* "setup/package.prl" (substitute* "setup/package.prl"
(("/usr/local/ngs/ngs-java") (("/usr/local/ngs/ngs-java")
(assoc-ref inputs "java-ngs"))) #$(this-package-input "java-ngs")))
;; The 'configure' script doesn't recognize things like ;; The 'configure' script doesn't recognize things like
;; '--enable-fast-install'. ;; '--enable-fast-install'.
(invoke "./configure" (invoke "./configure"
(string-append "--build-prefix=" (getcwd) "/build") (string-append "--build-prefix=" (getcwd) "/build")
(string-append "--prefix=" (assoc-ref outputs "out")) (string-append "--prefix=" #$output)
(string-append "--debug") (string-append "--debug")
(string-append "--with-xml2-prefix=" (string-append "--with-xml2-prefix="
(assoc-ref inputs "libxml2")) #$(this-package-input "libxml2"))
(string-append "--with-ngs-sdk-prefix=" (string-append "--with-ngs-sdk-prefix="
(assoc-ref inputs "ngs-sdk")) #$(this-package-input "ngs-sdk"))
(string-append "--with-hdf5-prefix=" (string-append "--with-hdf5-prefix="
(assoc-ref inputs "hdf5"))) #$(this-package-input "hdf5")))))
#t))) (add-after 'install 'install-interfaces
(add-after 'install 'install-interfaces (lambda _
(lambda* (#:key outputs #:allow-other-keys) ;; Install interface libraries. On i686 the interface libraries
;; Install interface libraries. On i686 the interface libraries ;; are installed to "linux/gcc/i386", so we need to use the Linux
;; are installed to "linux/gcc/i386", so we need to use the Linux ;; architecture name ("i386") instead of the target system prefix
;; architecture name ("i386") instead of the target system prefix ;; ("i686").
;; ("i686"). (mkdir (string-append #$output "/ilib"))
(mkdir (string-append (assoc-ref outputs "out") "/ilib")) (copy-recursively (string-append
(copy-recursively (string-append "build/ncbi-vdb/linux/gcc/"
"build/ncbi-vdb/linux/gcc/" #$(platform-linux-architecture
,(platform-linux-architecture (lookup-platform-by-target-or-system
(lookup-platform-by-target-or-system (or (%current-target-system)
(or (%current-target-system) (%current-system))))
(%current-system)))) "/rel/ilib")
"/rel/ilib") (string-append #$output "/ilib"))
(string-append (assoc-ref outputs "out") ;; Install interface headers
"/ilib")) (copy-recursively "interfaces"
;; Install interface headers (string-append #$output "/include"))))
(copy-recursively "interfaces" (add-after 'install-interfaces 'install-libs
(string-append (assoc-ref outputs "out") (lambda _
"/include")) (copy-recursively (string-append
#t)) "build/ncbi-vdb/linux/gcc/"
;; These files are needed by sra-tools. #$(platform-linux-architecture
(add-after 'install 'install-configuration-files (lookup-platform-by-target-or-system
(lambda* (#:key outputs #:allow-other-keys) (or (%current-target-system)
(let ((target (string-append (assoc-ref outputs "out") "/kfg"))) (%current-system))))
(mkdir target) "/rel/lib")
(install-file "libs/kfg/default.kfg" target) (string-append #$output "/lib"))))
(install-file "libs/kfg/certs.kfg" target)) ;; These files are needed by sra-tools.
#t))))) (add-after 'install 'install-configuration-files
(lambda _
(let ((target (string-append #$output "/kfg")))
(mkdir target)
(install-file "libs/kfg/default.kfg" target)
(install-file "libs/kfg/certs.kfg" target)))))))
(inputs (inputs
`(("libxml2" ,libxml2) (list file hdf5 java-ngs libxml2 ngs-sdk ))
("ngs-sdk" ,ngs-sdk)
("java-ngs" ,java-ngs)
("libmagic" ,file)
("hdf5" ,hdf5)))
(native-inputs (list perl)) (native-inputs (list perl))
;; NCBI-VDB requires SSE capability. ;; NCBI-VDB requires SSE capability.
(supported-systems '("i686-linux" "x86_64-linux")) (supported-systems '("i686-linux" "x86_64-linux"))