Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-biology/samtools/files: samtools-1.0-buildsystem.patch
Date: Thu, 25 Sep 2014 15:20:57
Message-Id: 20140925152053.55F5F63D2@oystercatcher.gentoo.org
1 jlec 14/09/25 15:20:53
2
3 Added: samtools-1.0-buildsystem.patch
4 Log:
5 sci-biology/samtools: Install bam headers and create libbam.so, #523644
6
7 (Portage version: 2.2.13/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
8
9 Revision Changes Path
10 1.1 sci-biology/samtools/files/samtools-1.0-buildsystem.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/samtools/files/samtools-1.0-buildsystem.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/samtools/files/samtools-1.0-buildsystem.patch?rev=1.1&content-type=text/plain
14
15 Index: samtools-1.0-buildsystem.patch
16 ===================================================================
17 Makefile | 26 ++++++++++++++++++--------
18 1 file changed, 18 insertions(+), 8 deletions(-)
19
20 diff --git a/Makefile b/Makefile
21 index ae59abf..0d2788c 100644
22 --- a/Makefile
23 +++ b/Makefile
24 @@ -21,11 +21,12 @@
25 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26 # DEALINGS IN THE SOFTWARE.
27
28 -CC = gcc
29 -CPPFLAGS = $(DFLAGS) $(INCLUDES)
30 -CFLAGS = -g -Wall -O2
31 -LDFLAGS =
32 -LDLIBS =
33 +CC ?= gcc
34 +CPPFLAGS += $(DFLAGS) $(INCLUDES)
35 +CFLAGS ?= -g -Wall -O2
36 +LDFLAGS +=
37 +LDLIBS +=
38 +BAMLIB ?= libbam.a
39 DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1
40 LOBJS= bam_aux.o bam.o bam_import.o sam.o \
41 sam_header.o bam_plbuf.o
42 @@ -42,6 +43,7 @@ LIBCURSES= -lcurses # -lXCurses
43 prefix = /usr/local
44 exec_prefix = $(prefix)
45 bindir = $(exec_prefix)/bin
46 +bindir = $(exec_prefix)/lib
47 mandir = $(prefix)/share/man
48 man1dir = $(mandir)/man1
49
50 @@ -115,14 +117,22 @@ version.h:
51 .c.o:
52 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
53
54 +$(LOBJS):
55 + $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $<
56
57 -lib:libbam.a
58 +
59 +lib:libbam.a libbam.so.1.0
60
61 libbam.a:$(LOBJS)
62 $(AR) -csru $@ $(LOBJS)
63
64 -samtools: $(AOBJS) libbam.a $(HTSLIB)
65 - $(CC) -pthread $(LDFLAGS) -o $@ $(AOBJS) libbam.a $(HTSLIB) $(LDLIBS) $(LIBCURSES) -lm -lz
66 +libbam.so.1.0:$(LOBJS)
67 + $(CC) $(LDFLAGS) -shared -Wl,--soname,$@ -o $@ $(LOBJS) $(HTSLIB) -lz
68 + ln -sf $@ libbam.so.0
69 + ln -sf $@ libbam.so
70 +
71 +samtools: $(AOBJS) $(HTSLIB) lib
72 + $(CC) -pthread $(LDFLAGS) -o $@ $(AOBJS) $(BAMLIB) $(HTSLIB) $(LDLIBS) $(LIBCURSES) -lm -lz
73
74 bam_h = bam.h $(htslib_bgzf_h) $(htslib_sam_h)
75 bam2bcf_h = bam2bcf.h $(htslib_vcf_h) errmod.h