Debian Codegraph @

debian/patches/htsutil

raw
1 Description: Minimal change to make htsutil a bedtools subcommand
2 Inline the test tool htsutil into bedtools to reduce the memory footprint of
3 the bedtools package. Details initially discussed on Debian Med mailing list:
4 .
5 https://lists.debian.org/debian-med/2021/01/msg00189.html
6 Author: John Marshall <[email protected]>
7 Forwarded: no
8 Reviewed-by: Étienne Mollier <[email protected]>
9 Last-Update: 2021-01-19
10 ---
11 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
12 --- bedtools.orig/Makefile
13 +++ bedtools/Makefile
14 @@ -133,11 +133,11 @@
15 ALL_LIBS = $(BT_LIBS) $(LIBS)
16
17
18 -all: print_banner $(BIN_DIR)/bedtools $(BIN_DIR)/intersectBed test/htsutil
19 +all: print_banner $(BIN_DIR)/bedtools $(BIN_DIR)/intersectBed
20
21 static: print_banner $(BIN_DIR)/bedtools.static
22
23 -BUILT_OBJECTS = $(OBJ_DIR)/bedtools.o
24 +BUILT_OBJECTS = $(OBJ_DIR)/bedtools.o $(OBJ_DIR)/htsutil.o
25 # Include all the Makefile fragments, which add to $(BUILT_OBJECTS)
26 include $(patsubst %,%/Makefile.frag,$(SUBDIRS) $(UTIL_SUBDIRS))
27
28 --- bedtools.orig/src/bedtools.cpp
29 +++ bedtools/src/bedtools.cpp
30 @@ -86,6 +86,7 @@
31 int windowmaker_main(int argc, char* argv[]); //
32 int bedtools_help(void);
33 int bedtools_faq(void);
34 +int htsutil_main(int argc, char **argv);
35
36 const char* cram_reference = NULL;
37
38 @@ -174,6 +175,7 @@
39 else if (subCmd == "links") return links_main(argc-1, argv+1);
40 else if (subCmd == "makewindows") return windowmaker_main(argc-1, argv+1);
41 else if (subCmd == "expand") return expand_main(argc-1, argv+1);
42 + else if (subCmd == "htsutil") return htsutil_main(argc-1, argv+1);
43 else if (subCmd == "regresstest") return regress_test_main(argc, argv); //this command does need all the orig args.
44 // help
45 else if (subCmd == "-h" || subCmd == "--help" ||
46 --- bedtools.orig/src/htsutil.cpp
47 +++ bedtools/src/htsutil.cpp
48 @@ -127,7 +127,7 @@
49 return 0;
50 }
51
52 -int main(int argc, char **argv)
53 +int htsutil_main(int argc, char **argv)
54 {
55 std::string cmd = (argc >= 2)? argv[1] : "--help";
56 const char *src = (argc >= 3)? argv[2] : "-";