gnu: vcflib: Update to 1.0.2.
* gnu/packages/bioinformatics.scm (vcflib): Update to 1.0.2. [source]: Download using git-fetch. Remove patch. Update snippet to use packaged libraries. [build-system]: Switch to cmake-build-system. [inputs]: Add bzip2. [native-inputs]: Add package-source of fsom. [arguments]: Delete custom 'set-flags, 'install phases. Don't delete 'configure phase. Adjust 'unpack-submodule-sources phase. * gnu/packages/patches/vcflib-use-shared-libraries.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it.master
parent
db30d6eada
commit
93309e25c7
|
@ -1703,7 +1703,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/vboot-utils-fix-format-load-address.patch \
|
%D%/packages/patches/vboot-utils-fix-format-load-address.patch \
|
||||||
%D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \
|
%D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \
|
||||||
%D%/packages/patches/vboot-utils-skip-test-workbuf.patch \
|
%D%/packages/patches/vboot-utils-skip-test-workbuf.patch \
|
||||||
%D%/packages/patches/vcflib-use-shared-libraries.patch \
|
|
||||||
%D%/packages/patches/vigra-python-compat.patch \
|
%D%/packages/patches/vigra-python-compat.patch \
|
||||||
%D%/packages/patches/vinagre-newer-freerdp.patch \
|
%D%/packages/patches/vinagre-newer-freerdp.patch \
|
||||||
%D%/packages/patches/vinagre-newer-rdp-parameters.patch \
|
%D%/packages/patches/vinagre-newer-rdp-parameters.patch \
|
||||||
|
|
|
@ -14923,32 +14923,44 @@ library automatically handles index file generation and use.")
|
||||||
(define-public vcflib
|
(define-public vcflib
|
||||||
(package
|
(package
|
||||||
(name "vcflib")
|
(name "vcflib")
|
||||||
(version "1.0.1")
|
(version "1.0.2")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method git-fetch)
|
||||||
(uri (string-append "https://github.com/vcflib/vcflib/releases/"
|
(uri (git-reference
|
||||||
"download/v" version
|
(url "https://github.com/vcflib/vcflib")
|
||||||
"/vcflib-" version "-src.tar.gz"))
|
(commit (string-append "v" version))))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "14zzrg8hg8cq9cvq2wdvp21j7nmxxkjrbagw2apd2yqv2kyx42lm"))
|
(base32 "1k1z3876kbzifj1sqfzsf3lgb4rw779hvkg6ryxbyq5bc2paj9kh"))
|
||||||
(patches (search-patches "vcflib-use-shared-libraries.patch"))
|
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet
|
(snippet
|
||||||
`(begin
|
'(begin
|
||||||
|
(substitute* "CMakeLists.txt"
|
||||||
|
((".*fastahack.*") "")
|
||||||
|
((".*smithwaterman.*") "")
|
||||||
|
(("(pkg_check_modules\\(TABIXPP)" text)
|
||||||
|
(string-append
|
||||||
|
"pkg_check_modules(FASTAHACK REQUIRED fastahack)\n"
|
||||||
|
"pkg_check_modules(SMITHWATERMAN REQUIRED smithwaterman)\n"
|
||||||
|
text))
|
||||||
|
(("\\$\\{TABIXPP_LIBRARIES\\}" text)
|
||||||
|
(string-append "${FASTAHACK_LIBRARIES} "
|
||||||
|
"${SMITHWATERMAN_LIBRARIES} "
|
||||||
|
text)))
|
||||||
(substitute* (find-files "." "\\.(h|c)(pp)?$")
|
(substitute* (find-files "." "\\.(h|c)(pp)?$")
|
||||||
(("\"SmithWatermanGotoh.h\"") "<smithwaterman/SmithWatermanGotoh.h>")
|
(("\"SmithWatermanGotoh.h\"") "<smithwaterman/SmithWatermanGotoh.h>")
|
||||||
(("\"convert.h\"") "<smithwaterman/convert.h>")
|
(("\"convert.h\"") "<smithwaterman/convert.h>")
|
||||||
(("\"disorder.h\"") "<smithwaterman/disorder.h>")
|
(("\"disorder.h\"") "<smithwaterman/disorder.h>")
|
||||||
(("\"tabix.hpp\"") "<tabix.hpp>")
|
(("Fasta.h") "fastahack/Fasta.h"))
|
||||||
(("\"Fasta.h\"") "<fastahack/Fasta.h>"))
|
|
||||||
(for-each delete-file-recursively
|
(for-each delete-file-recursively
|
||||||
'("fastahack" "filevercmp" "fsom" "googletest" "intervaltree"
|
'("fastahack" "filevercmp" "fsom" "googletest" "intervaltree"
|
||||||
"libVCFH" "multichoose" "smithwaterman" "tabixpp"))
|
"libVCFH" "multichoose" "smithwaterman"))
|
||||||
#t))))
|
#t))))
|
||||||
(build-system gnu-build-system)
|
(build-system cmake-build-system)
|
||||||
(inputs
|
(inputs
|
||||||
`(("htslib" ,htslib)
|
`(("bzip2" ,bzip2)
|
||||||
|
("htslib" ,htslib)
|
||||||
("fastahack" ,fastahack)
|
("fastahack" ,fastahack)
|
||||||
("perl" ,perl)
|
("perl" ,perl)
|
||||||
("python" ,python)
|
("python" ,python)
|
||||||
|
@ -14961,22 +14973,13 @@ library automatically handles index file generation and use.")
|
||||||
;; Submodules.
|
;; Submodules.
|
||||||
;; This package builds against the .o files so we need to extract the source.
|
;; This package builds against the .o files so we need to extract the source.
|
||||||
("filevercmp-src" ,(package-source filevercmp))
|
("filevercmp-src" ,(package-source filevercmp))
|
||||||
|
("fsom-src" ,(package-source fsom))
|
||||||
("intervaltree-src" ,(package-source intervaltree))
|
("intervaltree-src" ,(package-source intervaltree))
|
||||||
("multichoose-src" ,(package-source multichoose))))
|
("multichoose-src" ,(package-source multichoose))))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; no tests
|
`(#:tests? #f ; no tests
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'set-flags
|
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
|
||||||
(substitute* "Makefile"
|
|
||||||
(("LDFLAGS =")
|
|
||||||
(string-append "LDFLAGS = -Wl,-rpath="
|
|
||||||
(assoc-ref outputs "out") "/lib ")))
|
|
||||||
(substitute* "filevercmp/Makefile"
|
|
||||||
(("-c") "-c -fPIC"))
|
|
||||||
#t))
|
|
||||||
(delete 'configure)
|
|
||||||
(add-after 'unpack 'unpack-submodule-sources
|
(add-after 'unpack 'unpack-submodule-sources
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let ((unpack (lambda (source target)
|
(let ((unpack (lambda (source target)
|
||||||
|
@ -14989,39 +14992,10 @@ library automatically handles index file generation and use.")
|
||||||
"--strip-components=1"))))))
|
"--strip-components=1"))))))
|
||||||
(and
|
(and
|
||||||
(unpack "filevercmp-src" "filevercmp")
|
(unpack "filevercmp-src" "filevercmp")
|
||||||
|
(unpack "fsom-src" "fsom")
|
||||||
(unpack "intervaltree-src" "intervaltree")
|
(unpack "intervaltree-src" "intervaltree")
|
||||||
(unpack "multichoose-src" "multichoose")))))
|
(unpack "multichoose-src" "multichoose"))
|
||||||
(replace 'install
|
#t))))))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
|
||||||
(bin (string-append out "/bin"))
|
|
||||||
(lib (string-append out "/lib")))
|
|
||||||
(for-each (lambda (file)
|
|
||||||
(install-file file bin))
|
|
||||||
(find-files "bin" ".*"))
|
|
||||||
(install-file "libvcflib.so" lib)
|
|
||||||
(install-file "libvcflib.a" lib)
|
|
||||||
(for-each
|
|
||||||
(lambda (file)
|
|
||||||
(install-file file (string-append out "/include")))
|
|
||||||
(find-files "include" "\\.h(pp)?$"))
|
|
||||||
(mkdir-p (string-append lib "/pkgconfig"))
|
|
||||||
(with-output-to-file (string-append lib "/pkgconfig/vcflib.pc")
|
|
||||||
(lambda _
|
|
||||||
(format #t "prefix=~a~@
|
|
||||||
exec_prefix=${prefix}~@
|
|
||||||
libdir=${exec_prefix}/lib~@
|
|
||||||
includedir=${prefix}/include~@
|
|
||||||
~@
|
|
||||||
~@
|
|
||||||
Name: libvcflib~@
|
|
||||||
Version: ~a~@
|
|
||||||
Requires: smithwaterman, fastahack~@
|
|
||||||
Description: C++ library for parsing and manipulating VCF files~@
|
|
||||||
Libs: -L${libdir} -lvcflib~@
|
|
||||||
Cflags: -I${includedir}~%"
|
|
||||||
out ,version))))
|
|
||||||
#t)))))
|
|
||||||
(home-page "https://github.com/vcflib/vcflib/")
|
(home-page "https://github.com/vcflib/vcflib/")
|
||||||
(synopsis "Library for parsing and manipulating VCF files")
|
(synopsis "Library for parsing and manipulating VCF files")
|
||||||
(description "Vcflib provides methods to manipulate and interpret
|
(description "Vcflib provides methods to manipulate and interpret
|
||||||
|
|
|
@ -1,135 +0,0 @@
|
||||||
This patch is a combination of many of the patches from Debian:
|
|
||||||
https://sources.debian.org/src/libvcflib/1.0.1+dfsg-3/debian/patches/
|
|
||||||
|
|
||||||
---
|
|
||||||
Makefile | 63 +++++++++++---------------------------------------------
|
|
||||||
1 file changed, 12 insertions(+), 51 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index 6b13350..be85f22 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -114,43 +114,25 @@ BIN_SOURCES = src/vcfecho.cpp \
|
|
||||||
src/vcfnull2ref.cpp \
|
|
||||||
src/vcfinfosummarize.cpp
|
|
||||||
|
|
||||||
-# when we can figure out how to build on mac
|
|
||||||
-# src/vcfsom.cpp
|
|
||||||
-
|
|
||||||
#BINS = $(BIN_SOURCES:.cpp=)
|
|
||||||
BINS = $(addprefix $(BIN_DIR)/,$(notdir $(BIN_SOURCES:.cpp=)))
|
|
||||||
SHORTBINS = $(notdir $(BIN_SOURCES:.cpp=))
|
|
||||||
|
|
||||||
-TABIX = tabixpp/tabix.o
|
|
||||||
-FASTAHACK = fastahack/Fasta.o
|
|
||||||
-SMITHWATERMAN = smithwaterman/SmithWatermanGotoh.o
|
|
||||||
-REPEATS = smithwaterman/Repeats.o
|
|
||||||
-INDELALLELE = smithwaterman/IndelAllele.o
|
|
||||||
-DISORDER = smithwaterman/disorder.o
|
|
||||||
-LEFTALIGN = smithwaterman/LeftAlign.o
|
|
||||||
-FSOM = fsom/fsom.o
|
|
||||||
FILEVERCMP = filevercmp/filevercmp.o
|
|
||||||
|
|
||||||
-# Work out how to find htslib
|
|
||||||
-# Use the one we ship in tabixpp unless told otherwise by the environment
|
|
||||||
-HTS_LIB ?= $(VCF_LIB_LOCAL)/tabixpp/htslib/libhts.a
|
|
||||||
-HTS_INCLUDES ?= -I$(VCF_LIB_LOCAL)/tabixpp/htslib
|
|
||||||
-HTS_LDFLAGS ?= -L$(VCF_LIB_LOCAL)/tabixpp/htslib -lhts -lbz2 -lm -lz -llzma -pthread
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-INCLUDES = $(HTS_INCLUDES) -I$(INC_DIR)
|
|
||||||
-LDFLAGS = -L$(LIB_DIR) -lvcflib $(HTS_LDFLAGS) -lpthread -lz -lm -llzma -lbz2
|
|
||||||
+INCLUDES = -I$(INC_DIR) $(shell pkg-config --cflags htslib fastahack smithwaterman tabixpp)
|
|
||||||
+LDFLAGS = -L$(LIB_DIR) -lvcflib -lpthread -lz -lstdc++ -lm -llzma -lbz2 $(shell pkg-config --libs htslib fastahack smithwaterman tabixpp)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-all: $(OBJECTS) $(BINS) scriptToBin
|
|
||||||
+all: $(OBJECTS) $(BINS) scriptToBin libvcflib.a
|
|
||||||
|
|
||||||
scriptToBin: $(BINS)
|
|
||||||
$(CP) scripts/* $(BIN_DIR)
|
|
||||||
|
|
||||||
GIT_VERSION += $(shell git describe --abbrev=4 --dirty --always)
|
|
||||||
|
|
||||||
-CXXFLAGS = -Ofast -D_FILE_OFFSET_BITS=64 -std=c++0x
|
|
||||||
+CXXFLAGS = -Ofast -D_FILE_OFFSET_BITS=64 -std=c++0x -fPIC
|
|
||||||
#CXXFLAGS = -O2
|
|
||||||
#CXXFLAGS = -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual
|
|
||||||
|
|
||||||
@@ -168,7 +150,7 @@ profiling:
|
|
||||||
gprof:
|
|
||||||
$(MAKE) CXXFLAGS="$(CXXFLAGS) -pg" all
|
|
||||||
|
|
||||||
-$(OBJECTS): $(SOURCES) $(HEADERS) $(TABIX) multichoose pre $(SMITHWATERMAN) $(FILEVERCMP) $(FASTAHACK)
|
|
||||||
+$(OBJECTS): $(SOURCES) $(HEADERS) multichoose pre $(FILEVERCMP)
|
|
||||||
$(CXX) -c -o $@ src/$(*F).cpp $(INCLUDES) $(LDFLAGS) $(CXXFLAGS) && $(CP) src/*.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/
|
|
||||||
|
|
||||||
multichoose: pre
|
|
||||||
@@ -177,39 +159,22 @@ multichoose: pre
|
|
||||||
intervaltree: pre
|
|
||||||
cd intervaltree && $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/
|
|
||||||
|
|
||||||
-$(TABIX): pre
|
|
||||||
- cd tabixpp && INCLUDES="$(HTS_INCLUDES)" LIBPATH="-L. $(HTS_LDFLAGS)" HTSLIB="$(HTS_LIB)" $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/
|
|
||||||
-
|
|
||||||
-$(SMITHWATERMAN): pre
|
|
||||||
- cd smithwaterman && $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ && $(CP) *.o $(VCF_LIB_LOCAL)/$(OBJ_DIR)/
|
|
||||||
-
|
|
||||||
-$(DISORDER): $(SMITHWATERMAN)
|
|
||||||
-
|
|
||||||
-$(REPEATS): $(SMITHWATERMAN)
|
|
||||||
-
|
|
||||||
-$(LEFTALIGN): $(SMITHWATERMAN)
|
|
||||||
-
|
|
||||||
-$(INDELALLELE): $(SMITHWATERMAN)
|
|
||||||
-
|
|
||||||
-$(FASTAHACK): pre
|
|
||||||
- cd fastahack && $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ && $(CP) Fasta.o $(VCF_LIB_LOCAL)/$(OBJ_DIR)/
|
|
||||||
-
|
|
||||||
-#$(FSOM):
|
|
||||||
-# cd fsom && $(CXX) $(CXXFLAGS) -c fsom.c -lm
|
|
||||||
-
|
|
||||||
$(FILEVERCMP): pre
|
|
||||||
cd filevercmp && make && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ && $(CP) *.o $(VCF_LIB_LOCAL)/$(INC_DIR)/
|
|
||||||
|
|
||||||
$(SHORTBINS): pre
|
|
||||||
$(MAKE) $(BIN_DIR)/$@
|
|
||||||
|
|
||||||
-$(BINS): $(BIN_SOURCES) libvcflib.a $(OBJECTS) $(SMITHWATERMAN) $(FASTAHACK) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) pre intervaltree
|
|
||||||
+$(BINS): $(BIN_SOURCES) libvcflib.so $(OBJECTS) $(SSW) $(FILEVERCMP) pre intervaltree
|
|
||||||
$(CXX) src/$(notdir $@).cpp -o $@ $(INCLUDES) $(LDFLAGS) $(CXXFLAGS) -DVERSION=\"$(GIT_VERSION)\"
|
|
||||||
|
|
||||||
-libvcflib.a: $(OBJECTS) $(SMITHWATERMAN) $(REPEATS) $(FASTAHACK) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) $(TABIX) pre
|
|
||||||
- ar rs libvcflib.a $(OBJECTS) smithwaterman/sw.o $(FASTAHACK) $(SSW) $(FILEVERCMP) $(TABIX)
|
|
||||||
+libvcflib.a: $(OBJECTS) $(SSW) $(FILEVERCMP) pre
|
|
||||||
+ ar rs libvcflib.a $(OBJECTS) $(SSW) $(FILEVERCMP)
|
|
||||||
$(CP) libvcflib.a $(LIB_DIR)
|
|
||||||
|
|
||||||
+libvcflib.so: $(OBJECTS) $(SSW) $(FILEVERCMP) pre
|
|
||||||
+ $(CXX) -shared -o libvcflib.so $(OBJECTS) $(SSW) $(FILEVERCMP)
|
|
||||||
+ $(CP) libvcflib.so $(LIB_DIR)
|
|
||||||
|
|
||||||
test: $(BINS)
|
|
||||||
@prove -Itests/lib -w tests/*.t
|
|
||||||
@@ -230,16 +195,12 @@ clean:
|
|
||||||
$(RM) $(BINS) $(OBJECTS)
|
|
||||||
$(RM) ssw_cpp.o ssw.o
|
|
||||||
$(RM) libvcflib.a
|
|
||||||
+ $(RM) libvcflib.so
|
|
||||||
$(RM) -r $(BIN_DIR)
|
|
||||||
$(RM) -r $(LIB_DIR)
|
|
||||||
$(RM) -r $(INC_DIR)
|
|
||||||
$(RM) -r $(OBJ_DIR)
|
|
||||||
- $(MAKE) clean -C tabixpp
|
|
||||||
- $(MAKE) clean -C smithwaterman
|
|
||||||
- $(MAKE) clean -C fastahack
|
|
||||||
$(MAKE) clean -C multichoose
|
|
||||||
- $(MAKE) clean -C fsom
|
|
||||||
- $(MAKE) clean -C libVCFH
|
|
||||||
$(MAKE) clean -C test
|
|
||||||
$(MAKE) clean -C filevercmp
|
|
||||||
$(MAKE) clean -C intervaltree
|
|
||||||
--
|
|
||||||
2.28.0
|
|
||||||
|
|
Reference in New Issue