jlec        15/01/06 12:57:48

  Added:                samtools-1.1-buildsystem.patch
  Log:
  sci-biology/samtools: Version BUmp
  
  (Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 
B9D4F231BD1558AB!)

Revision  Changes    Path
1.1                  sci-biology/samtools/files/samtools-1.1-buildsystem.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/samtools/files/samtools-1.1-buildsystem.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/samtools/files/samtools-1.1-buildsystem.patch?rev=1.1&content-type=text/plain

Index: samtools-1.1-buildsystem.patch
===================================================================
 Makefile | 76 ++++++++++++++++++++++++++++++++++++----------------------------
 1 file changed, 43 insertions(+), 33 deletions(-)

diff --git a/Makefile b/Makefile
index 43cefc3..743dd07 100644
--- a/Makefile
+++ b/Makefile
@@ -21,11 +21,12 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-CC       = gcc
-CPPFLAGS = $(DFLAGS) $(INCLUDES)
-CFLAGS   = -g -Wall -O2
-LDFLAGS  =
-LDLIBS   =
+CC       ?= gcc
+CPPFLAGS += $(DFLAGS) $(INCLUDES)
+CFLAGS   ?= -g -Wall -O2
+LDFLAGS  +=
+LDLIBS   +=
+BAMLIB   ?= libbam.a
 DFLAGS=     -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1
 LOBJS=      bam_aux.o bam.o bam_import.o sam.o \
             sam_header.o bam_plbuf.o
@@ -42,6 +43,7 @@ LIBCURSES=  -lcurses # -lXCurses
 prefix      = /usr/local
 exec_prefix = $(prefix)
 bindir      = $(exec_prefix)/bin
+libdir      = $(exec_prefix)/lib
 mandir      = $(prefix)/share/man
 man1dir     = $(mandir)/man1
 
@@ -115,63 +117,71 @@ version.h:
 .c.o:
        $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
 
+$(LOBJS):
+       $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $<
 
-lib:libbam.a
+
+lib:libbam.a libbam.so.1.0
 
 libbam.a:$(LOBJS)
        $(AR) -csru $@ $(LOBJS)
 
-samtools: $(AOBJS) libbam.a $(HTSLIB)
-       $(CC) -pthread $(LDFLAGS) -o $@ $(AOBJS) libbam.a $(HTSLIB) $(LDLIBS) 
$(LIBCURSES) -lm -lz
+libbam.so.1.0:$(LOBJS)
+       $(CC) $(LDFLAGS) -shared -Wl,--soname,$@ -o $@ $(LOBJS) $(HTSLIB) -lz
+       ln -sf $@ libbam.so.0
+       ln -sf $@ libbam.so
+
+samtools: $(AOBJS) lib
+       $(CC) -pthread $(LDFLAGS) -o $@ $(AOBJS) $(BAMLIB) $(HTSLIB) $(LDLIBS) 
$(LIBCURSES) -lm -lz
 
 bam_h = bam.h $(htslib_bgzf_h) $(htslib_sam_h)
 bam2bcf_h = bam2bcf.h $(htslib_vcf_h) errmod.h
 bam_lpileup_h = bam_lpileup.h $(htslib_sam_h)
 bam_plbuf_h = bam_plbuf.h $(htslib_sam_h)
-bam_tview_h = bam_tview.h $(htslib_hts_h) $(htslib_sam_h) $(htslib_faidx_h) 
$(bam2bcf_h) $(HTSDIR)/htslib/khash.h $(bam_lpileup_h)
+bam_tview_h = bam_tview.h $(htslib_hts_h) $(htslib_sam_h) $(htslib_faidx_h) 
$(bam2bcf_h) $(bam_lpileup_h)
 sam_h = sam.h $(htslib_sam_h) $(bam_h)
-sample_h = sample.h $(HTSDIR)/htslib/kstring.h
+sample_h = sample.h
 
 bam.o: bam.c $(bam_h) sam_header.h
-bam2bcf.o: bam2bcf.c $(htslib_sam_h) $(HTSDIR)/htslib/kstring.h 
$(HTSDIR)/htslib/kfunc.h $(bam2bcf_h) errmod.h
+bam2bcf.o: bam2bcf.c $(htslib_sam_h) $(bam2bcf_h) errmod.h
 bam2bcf_indel.o: bam2bcf_indel.c bam2bcf.h
 bam2depth.o: bam2depth.c $(htslib_sam_h) samtools.h
 bam_aux.o: bam_aux.c
 bam_cat.o: bam_cat.c $(htslib_bgzf_h) $(bam_h)
 bam_color.o: bam_color.c $(bam_h)
-bam_import.o: bam_import.c $(HTSDIR)/htslib/kstring.h $(bam_h) 
$(HTSDIR)/htslib/kseq.h
-bam_index.o: bam_index.c $(htslib_hts_h) $(htslib_sam_h) 
$(HTSDIR)/htslib/khash.h
-bam_lpileup.o: bam_lpileup.c $(bam_plbuf_h) $(bam_lpileup_h) 
$(HTSDIR)/htslib/ksort.h
+bam_import.o: bam_import.c $(bam_h)
+bam_index.o: bam_index.c $(htslib_hts_h) $(htslib_sam_h)
+bam_lpileup.o: bam_lpileup.c $(bam_plbuf_h) $(bam_lpileup_h)
 bam_mate.o: bam_mate.c $(bam_h)
 bam_md.o: bam_md.c $(htslib_faidx_h) $(sam_h) kaln.h kprobaln.h
 bam_pileup.o: bam_pileup.c $(sam_h)
 bam_plbuf.o: bam_plbuf.c $(htslib_hts_h) $(htslib_sam_h) $(bam_plbuf_h)
-bam_plcmd.o: bam_plcmd.c $(htslib_sam_h) $(htslib_faidx_h) 
$(HTSDIR)/htslib/kstring.h $(HTSDIR)/htslib/khash_str2int.h sam_header.h 
samtools.h $(bam2bcf_h) $(sample_h)
+bam_plcmd.o: bam_plcmd.c $(htslib_sam_h) $(htslib_faidx_h) sam_header.h 
samtools.h $(bam2bcf_h) $(sample_h)
 bam_reheader.o: bam_reheader.c $(htslib_bgzf_h) $(bam_h)
-bam_rmdup.o: bam_rmdup.c $(sam_h) $(HTSDIR)/htslib/khash.h
-bam_rmdupse.o: bam_rmdupse.c $(sam_h) $(HTSDIR)/htslib/khash.h 
$(HTSDIR)/htslib/klist.h
-bam_sort.o: bam_sort.c $(HTSDIR)/htslib/ksort.h $(HTSDIR)/htslib/khash.h 
$(HTSDIR)/htslib/klist.h $(HTSDIR)/htslib/kstring.h $(htslib_sam_h)
+bam_rmdup.o: bam_rmdup.c $(sam_h)
+bam_rmdupse.o: bam_rmdupse.c $(sam_h)
+bam_sort.o: bam_sort.c  $(htslib_sam_h)
 bam_stat.o: bam_stat.c $(bam_h) samtools.h
 bam_tview.o: bam_tview.c $(bam_tview_h) $(htslib_faidx_h) $(htslib_sam_h) 
$(htslib_bgzf_h)
 bam_tview_curses.o: bam_tview_curses.c $(bam_tview_h)
 bam_tview_html.o: bam_tview_html.c $(bam_tview_h)
 bam_flags.o: bam_flags.c $(sam_h)
-bamshuf.o: bamshuf.c $(htslib_sam_h) $(HTSDIR)/htslib/ksort.h samtools.h
+bamshuf.o: bamshuf.c $(htslib_sam_h)  samtools.h
 bamtk.o: bamtk.c $(bam_h) version.h samtools.h
-bedcov.o: bedcov.c $(HTSDIR)/htslib/kstring.h $(htslib_sam_h) 
$(HTSDIR)/htslib/kseq.h
-bedidx.o: bedidx.c $(HTSDIR)/htslib/ksort.h $(HTSDIR)/htslib/kseq.h 
$(HTSDIR)/htslib/khash.h
+bedcov.o: bedcov.c $(htslib_sam_h)
+bedidx.o: bedidx.c
 cut_target.o: cut_target.c $(bam_h) errmod.h $(htslib_faidx_h)
-errmod.o: errmod.c errmod.h $(HTSDIR)/htslib/ksort.h
+errmod.o: errmod.c errmod.h
 kaln.o: kaln.c kaln.h
 kprobaln.o: kprobaln.c kprobaln.h
 padding.o: padding.c sam_header.h $(sam_h) $(bam_h) $(htslib_faidx_h)
-phase.o: phase.c $(htslib_sam_h) errmod.h $(HTSDIR)/htslib/kseq.h 
$(HTSDIR)/htslib/khash.h $(HTSDIR)/htslib/ksort.h
+phase.o: phase.c $(htslib_sam_h) errmod.h
 sam.o: sam.c $(htslib_faidx_h) $(sam_h)
-sam_header.o: sam_header.c sam_header.h $(HTSDIR)/htslib/khash.h
-sam_view.o: sam_view.c $(htslib_sam_h) $(htslib_faidx_h) 
$(HTSDIR)/htslib/kstring.h $(HTSDIR)/htslib/khash.h samtools.h
-sample.o: sample.c $(sample_h) $(HTSDIR)/htslib/khash.h
-stats_isize.o: stats_isize.c stats_isize.h $(HTSDIR)/htslib/khash.h
-stats.o: stats.c $(sam_h) sam_header.h samtools.h stats_isize.h 
$(HTSDIR)/htslib/khash.h $(HTSDIR)/htslib/khash_str2int.h $(htslib_faidx_h)
+sam_header.o: sam_header.c sam_header.h
+sam_view.o: sam_view.c $(htslib_sam_h) $(htslib_faidx_h) samtools.h
+sample.o: sample.c $(sample_h)
+stats_isize.o: stats_isize.c stats_isize.h
+stats.o: stats.c $(sam_h) sam_header.h samtools.h stats_isize.h 
$(htslib_faidx_h)
 
 
 # test programs
@@ -179,8 +189,8 @@ stats.o: stats.c $(sam_h) sam_header.h samtools.h 
stats_isize.h $(HTSDIR)/htslib
 # For tests that might use it, set $REF_PATH explicitly to use only reference
 # areas within the test suite (or set it to ':' to use no reference areas).
 # (regression.sh sets $REF_PATH to a subdirectory itself.)
-check test: samtools $(BGZIP) $(BUILT_TEST_PROGRAMS)
-       REF_PATH=: test/test.pl --exec bgzip=$(BGZIP)
+check test: samtools $(BUILT_TEST_PROGRAMS)
+       REF_PATH=: test/test.pl --exec bgzip=bgzip
        test/merge/test_bam_translate test/merge/test_bam_translate.tmp
        test/merge/test_pretty_header
        test/merge/test_rtrans_build
@@ -253,10 +263,10 @@ misc/md5sum-lite: misc/md5sum-lite.o
 misc/wgsim: misc/wgsim.o
        $(CC) $(LDFLAGS) -o $@ misc/wgsim.o $(LDLIBS) -lm -lz
 
-misc/ace2sam.o: misc/ace2sam.c $(HTSDIR)/htslib/kstring.h 
$(HTSDIR)/htslib/kseq.h
+misc/ace2sam.o: misc/ace2sam.c
 misc/md5.o: misc/md5.c misc/md5.h
-misc/md5fa.o: misc/md5fa.c misc/md5.h $(HTSDIR)/htslib/kseq.h
-misc/wgsim.o: misc/wgsim.c $(HTSDIR)/htslib/kseq.h
+misc/md5fa.o: misc/md5fa.c misc/md5.h
+misc/wgsim.o: misc/wgsim.c
 
 misc/maq2sam-short.o: misc/maq2sam.c
        $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ misc/maq2sam.c




Reply via email to