pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

samtools0119: Patch to respect LDFLAGS



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon4000%gmail.com@localhost>
Pushed By:	outpaddling
Date:		Tue Nov 28 13:37:27 2017 -0600
Changeset:	fd54c4eaa53c0235f880129f468a6c6f168c7ba9

Modified Files:
	samtools0119/distinfo
	samtools0119/patches/patch-Makefile
Added Files:
	samtools0119/patches/patch-bcftools_Makefile
	samtools0119/patches/patch-misc_Makefile

Log Message:
samtools0119: Patch to respect LDFLAGS

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=fd54c4eaa53c0235f880129f468a6c6f168c7ba9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 samtools0119/distinfo                        |  4 ++-
 samtools0119/patches/patch-Makefile          | 43 +++++++++++++++++++++++++---
 samtools0119/patches/patch-bcftools_Makefile | 14 +++++++++
 samtools0119/patches/patch-misc_Makefile     | 42 +++++++++++++++++++++++++++
 4 files changed, 98 insertions(+), 5 deletions(-)

diffs:
diff --git a/samtools0119/distinfo b/samtools0119/distinfo
index 014e25e5e4..31fb308761 100644
--- a/samtools0119/distinfo
+++ b/samtools0119/distinfo
@@ -3,4 +3,6 @@ $NetBSD$
 SHA1 (samtools-0.1.19.tar.bz2) = ff3f4cf40612d4c2ad26e6fcbfa5f8af84cbe881
 RMD160 (samtools-0.1.19.tar.bz2) = 4e74858d3762f785452d1c9507bd127de9791894
 Size (samtools-0.1.19.tar.bz2) = 514507 bytes
-SHA1 (patch-Makefile) = 9ae9b0f04a3dad5d8f470b6fc132ba20d30e065d
+SHA1 (patch-Makefile) = 0eacdb0d29ac3c4864ee59f061c8c7094be415dd
+SHA1 (patch-bcftools_Makefile) = 8a4d19200856962c7adcbf7745a6fe0a74b4550d
+SHA1 (patch-misc_Makefile) = 6150b8e9de04af17077015402e507ee450ab12a2
diff --git a/samtools0119/patches/patch-Makefile b/samtools0119/patches/patch-Makefile
index b26807c248..c4ab04dbfd 100644
--- a/samtools0119/patches/patch-Makefile
+++ b/samtools0119/patches/patch-Makefile
@@ -1,5 +1,6 @@
---- Makefile.orig	2013-03-19 02:48:09.000000000 -0500
-+++ Makefile	2014-05-21 19:07:53.000000000 -0500
+$NetBSD$
+
+# Respect env
 --- Makefile.orig	2013-03-19 07:48:09.000000000 +0000
 +++ Makefile
 @@ -1,6 +1,7 @@
@@ -13,7 +14,16 @@
  DFLAGS=		-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1
  KNETFILE_O=	knetfile.o
  LOBJS=		bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o	\
-@@ -41,7 +42,8 @@ all:$(PROG)
+@@ -14,7 +15,7 @@ AOBJS=		bam_tview.o bam_plcmd.o sam_view
+ PROG=		samtools
+ INCLUDES=	-I.
+ SUBDIRS=	. bcftools misc
+-LIBPATH=
++LIBPATH=	-L${PREFIX}/lib
+ LIBCURSES=	-lcurses # -lXCurses
+ 
+ .SUFFIXES:.c .o
+@@ -41,16 +42,17 @@ all:$(PROG)
  lib:libbam.a
  
  libbam.a:$(LOBJS)
@@ -22,4 +32,29 @@
 +		$(RANLIB) $@
  
  samtools:lib-recur $(AOBJS)
- 		$(CC) $(CFLAGS) -o $@ $(AOBJS) $(LDFLAGS) libbam.a -Lbcftools -lbcf $(LIBPATH) $(LIBCURSES) -lm -lz -lpthread
+-		$(CC) $(CFLAGS) -o $@ $(AOBJS) $(LDFLAGS) libbam.a -Lbcftools -lbcf $(LIBPATH) $(LIBCURSES) -lm -lz -lpthread
++		$(CC) $(CFLAGS) -o $@ $(AOBJS) $(LDFLAGS) libbam.a -Lbcftools -lbcf $(LIBPATH) $(LIBCURSES) ${LDFLAGS} -lm -lz -lpthread
+ 
+ razip:razip.o razf.o $(KNETFILE_O)
+-		$(CC) $(CFLAGS) -o $@ $^ -lz
++		$(CC) $(CFLAGS) -o $@ $^ ${LDFLAGS} -lz
+ 
+ bgzip:bgzip.o bgzf.o $(KNETFILE_O)
+-		$(CC) $(CFLAGS) -o $@ $^ -lz -lpthread
++		$(CC) $(CFLAGS) -o $@ $^ ${LDFLAGS} -lz -lpthread
+ 
+ bgzf.o:bgzf.c bgzf.h
+ 		$(CC) -c $(CFLAGS) $(DFLAGS) -DBGZF_CACHE $(INCLUDES) bgzf.c -o $@
+@@ -81,10 +83,10 @@ faidx_main.o:faidx.h razf.h
+ 
+ 
+ libbam.1.dylib-local:$(LOBJS)
+-		libtool -dynamic $(LOBJS) -o libbam.1.dylib -lc -lz
++		libtool -dynamic $(LOBJS) -o libbam.1.dylib -lc ${LDFLAGS} -lz
+ 
+ libbam.so.1-local:$(LOBJS)
+-		$(CC) -shared -Wl,-soname,libbam.so -o libbam.so.1 $(LOBJS) -lc -lz
++		$(CC) -shared -Wl,-soname,libbam.so -o libbam.so.1 $(LOBJS) -lc ${LDFLAGS} -lz
+ 
+ dylib:
+ 		@$(MAKE) cleanlocal; \
diff --git a/samtools0119/patches/patch-bcftools_Makefile b/samtools0119/patches/patch-bcftools_Makefile
new file mode 100644
index 0000000000..6372844b28
--- /dev/null
+++ b/samtools0119/patches/patch-bcftools_Makefile
@@ -0,0 +1,14 @@
+$NetBSD$
+
+# Find pkgsrc libs
+--- bcftools/Makefile.orig	2017-11-28 19:24:34.616905493 +0000
++++ bcftools/Makefile
+@@ -31,7 +31,7 @@ libbcf.a:$(LOBJS)
+ 		$(AR) -csru $@ $(LOBJS)
+ 
+ bcftools:lib $(AOBJS)
+-		$(CC) $(CFLAGS) -o $@ $(AOBJS) -L. $(LIBPATH) -lbcf -lm -lz -lpthread
++		$(CC) $(CFLAGS) -o $@ $(AOBJS) -L. ${LDFLAGS} $(LIBPATH) -lbcf -lm -lz -lpthread
+ 
+ bcf.o:bcf.h
+ vcf.o:bcf.h
diff --git a/samtools0119/patches/patch-misc_Makefile b/samtools0119/patches/patch-misc_Makefile
new file mode 100644
index 0000000000..04f4aa9177
--- /dev/null
+++ b/samtools0119/patches/patch-misc_Makefile
@@ -0,0 +1,42 @@
+$NetBSD$
+
+# Find pkgsrc libs
+--- misc/Makefile.orig	2017-11-28 19:27:12.519750924 +0000
++++ misc/Makefile
+@@ -28,19 +28,19 @@ lib-recur all-recur clean-recur cleanloc
+ lib:
+ 
+ bamcheck:bamcheck.o
+-		$(CC) $(CFLAGS) -o $@ bamcheck.o -L.. -lm -lbam -lpthread -lz
++		$(CC) $(CFLAGS) -o $@ bamcheck.o -L.. -lm -lbam -lpthread ${LDFLAGS} -lz
+ 
+ bamcheck.o:bamcheck.c ../faidx.h ../khash.h ../sam.h ../razf.h
+ 		$(CC) $(CFLAGS) -c -I.. -o $@ bamcheck.c
+ 
+ ace2sam:ace2sam.o
+-		$(CC) $(CFLAGS) -o $@ ace2sam.o -lz
++		$(CC) $(CFLAGS) -o $@ ace2sam.o ${LDFLAGS} -lz
+ 
+ wgsim:wgsim.o
+-		$(CC) $(CFLAGS) -o $@ wgsim.o -lm -lz
++		$(CC) $(CFLAGS) -o $@ wgsim.o -lm ${LDFLAGS} -lz
+ 
+ md5fa:md5.o md5fa.o md5.h ../kseq.h
+-		$(CC) $(CFLAGS) -o $@ md5.o md5fa.o -lz
++		$(CC) $(CFLAGS) -o $@ md5.o md5fa.o ${LDFLAGS} -lz
+ 
+ md5sum-lite:md5sum-lite.o
+ 		$(CC) $(CFLAGS) -o $@ md5sum-lite.o
+@@ -49,10 +49,10 @@ md5sum-lite.o:md5.c md5.h
+ 		$(CC) -c $(CFLAGS) -DMD5SUM_MAIN -o $@ md5.c
+ 
+ maq2sam-short:maq2sam.c
+-		$(CC) $(CFLAGS) -o $@ maq2sam.c -lz
++		$(CC) $(CFLAGS) -o $@ maq2sam.c ${LDFLAGS} -lz
+ 
+ maq2sam-long:maq2sam.c
+-		$(CC) $(CFLAGS) -DMAQ_LONGREADS -o $@ maq2sam.c -lz
++		$(CC) $(CFLAGS) -DMAQ_LONGREADS -o $@ maq2sam.c ${LDFLAGS} -lz
+ 
+ md5fa.o:md5.h md5fa.c
+ 		$(CC) $(CFLAGS) -c -I.. -o $@ md5fa.c


Home | Main Index | Thread Index | Old Index