[med-svn] [plink1.9] 03/05: Remove 01.Makefile_config.patch, add 01.Fix_Makefile.patch to inject flags

Dylan Aïssi bob.dybian-guest at moszumanska.debian.org
Mon Apr 17 13:33:08 UTC 2017


This is an automated email from the git hooks/post-receive script.

bob.dybian-guest pushed a commit to branch master
in repository plink1.9.

commit 4a48a1f6e4921d26b4014c94c7fb57b3fd5eb3f1
Author: Dylan Aïssi <bob.dybian at gmail.com>
Date:   Mon Apr 17 14:42:52 2017 +0200

    Remove 01.Makefile_config.patch, add 01.Fix_Makefile.patch to inject flags
---
 debian/changelog                        |  6 ++-
 debian/patches/01.Fix_Makefile.patch    | 45 +++++++++++++++++++
 debian/patches/01.Makefile_config.patch | 80 ---------------------------------
 debian/patches/series                   |  2 +-
 debian/rules                            |  5 ++-
 5 files changed, 53 insertions(+), 85 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9504b86..641a991 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,9 +2,11 @@ plink1.9 (1.90~b4.1-170330-1) UNRELEASED; urgency=medium
 
   * New upstream release.
   * Update upstream website.
-  * Remove 02_Activate_Stable_Build.patch, update d/rules instead.
+  * Remove 01.Makefile_config.patch & 02_Activate_Stable_Build.patch,
+      inject flags using d/rules instead.
+  * Add 01.Fix_Makefile.patch to take into account the injected flags.
 
- -- Dylan Aïssi <bob.dybian at gmail.com>  Mon, 20 Mar 2017 22:57:25 +0100
+ -- Dylan Aïssi <bob.dybian at gmail.com>  Mon, 17 Apr 2017 15:11:50 +0200
 
 plink1.9 (1.90~b3.46-170213-1) experimental; urgency=medium
 
diff --git a/debian/patches/01.Fix_Makefile.patch b/debian/patches/01.Fix_Makefile.patch
new file mode 100644
index 0000000..317289c
--- /dev/null
+++ b/debian/patches/01.Fix_Makefile.patch
@@ -0,0 +1,45 @@
+Author: Dylan Aïssi <bob.dybian at gmail.com>
+Description: Take into account the user-provided compiler flags.
+Last-Update: 2017-04-17
+Forwarded: TODO
+
+--- a/Makefile
++++ b/Makefile
+@@ -5,11 +5,11 @@
+ 
+ # Leave blank after "=" to disable; put "= 1" to enable
+ # (when enabled, "#define NOLAPACK" must be uncommented in plink_common.h)
+-NO_LAPACK =
++NO_LAPACK +=
+ 
+ # Variable that allows additional linker flags (e.g., "-L/path/to/libs") to be
+ # passed into the linker; to use this, invoke 'make LINKFLAGS_EXTRA="<opts>"'.
+-LINKFLAGS_EXTRA =
++LINKFLAGS_EXTRA +=
+ 
+ .PHONY: clean
+ 
+@@ -24,10 +24,10 @@
+   endif
+ endif
+ 
+-CFLAGS=-Wall -O2
+-BLASFLAGS=-L/usr/lib64/atlas -llapack -lcblas -latlas
+-LINKFLAGS=-lm -lpthread -ldl
+-ZLIB=../zlib-1.2.11/libz.so.1.2.11
++CFLAGS+=-Wall -O2
++BLASFLAGS+=-L/usr/lib64/atlas -llapack -lcblas -latlas
++LINKFLAGS+=-lm -lpthread -ldl
++ZLIB?=../zlib-1.2.11/libz.so.1.2.11
+ 
+ ifeq ($(SYS), MAC)
+   GCC_GTEQ_43 := $(shell expr `g++ -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40300)
+@@ -51,7 +51,7 @@
+ endif
+ 
+ ifdef NO_LAPACK
+-  BLASFLAGS=
++  BLASFLAGS+=
+ endif
+ 
+ OBJS = plink.o plink_assoc.o plink_calc.o plink_cluster.o plink_cnv.o plink_common.o plink_data.o plink_dosage.o plink_family.o plink_filter.o plink_glm.o plink_help.o plink_homozyg.o plink_lasso.o plink_ld.o plink_matrix.o plink_misc.o plink_perm.o plink_rserve.o plink_set.o plink_stats.o SFMT.o dcdflib.o pigz.o yarn.o Rconnection.o hfile.o bgzf.o
diff --git a/debian/patches/01.Makefile_config.patch b/debian/patches/01.Makefile_config.patch
deleted file mode 100644
index a39b30a..0000000
--- a/debian/patches/01.Makefile_config.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-Author: Dylan Aïssi <bob.dybian at gmail.com>
-Description: Config Makefile for Debian: dynamic linking and hardening.
-Last-Update: 2016-11-20
-Forwarded: No
-
---- a/Makefile
-+++ b/Makefile
-@@ -11,6 +11,9 @@
- # passed into the linker; to use this, invoke 'make LINKFLAGS_EXTRA="<opts>"'.
- LINKFLAGS_EXTRA =
- 
-+# To enable dynamic linking
-+DYNAMIC_LINK = 1
-+
- .PHONY: clean
- 
- # should autodetect system
-@@ -24,10 +27,17 @@
-   endif
- endif
- 
--CFLAGS=-Wall -O2
--BLASFLAGS=-L/usr/lib64/atlas -llapack -lcblas -latlas
--LINKFLAGS=-lm -lpthread -ldl
--ZLIB=../zlib-1.2.11/libz.so.1.2.11
-+CFLAGS+=-Wall -O2
-+CXXFLAGS+=-Wall -O2
-+LINKFLAGS=-lm -lpthread -ldl $(LDFLAGS)
-+ifdef DYNAMIC_LINK
-+  BLASFLAGS=-llapack -lcblas -latlas
-+  ZLIB=-lz
-+  CFLAGS+=-DDYNAMIC_ZLIB
-+else
-+  BLASFLAGS=-L/usr/lib64/atlas -llapack -lcblas -latlas
-+  ZLIB=-L. ../zlib-1.2.11/libz.so.1.2.11
-+endif
- 
- ifeq ($(SYS), MAC)
-   GCC_GTEQ_43 := $(shell expr `g++ -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40300)
-@@ -36,7 +46,7 @@
-   endif
-   BLASFLAGS=-framework Accelerate
-   LINKFLAGS=-ldl
--  ZLIB=../zlib-1.2.11/libz.1.2.11.dylib
-+  ZLIB=-L. ../zlib-1.2.11/libz.1.2.11.dylib
- endif
- 
- ifeq ($(SYS), WIN)
-@@ -47,7 +57,7 @@
- # NO_LAPACK.
-   BLASFLAGS=-L. lapack/liblapack.a -L. lapack/librefblas.a
-   LINKFLAGS=-lm -static-libgcc
--  ZLIB=../zlib-1.2.11/libz.a
-+  ZLIB=-L. ../zlib-1.2.11/libz.a
- endif
- 
- ifdef NO_LAPACK
-@@ -60,10 +70,10 @@
- # renaming that binary to "plink107", and this one to "plink1".
- 
- plink: $(OBJS)
--	g++ $^ $(LINKFLAGS_EXTRA) $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB) -o $@
-+	g++ $^ $(LINKFLAGS_EXTRA) $(BLASFLAGS) $(LINKFLAGS) $(ZLIB) -o $@
- 
- plinkw: $(OBJS)
--	gfortran -O2 $^ $(LINKFLAGS_EXTRA) -Wl,-Bstatic $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB) -o $@
-+	gfortran -O2 $^ $(LINKFLAGS_EXTRA) -Wl,-Bstatic $(BLASFLAGS) $(LINKFLAGS) $(ZLIB) -o $@
- 
- clean:
- 	rm -f $(OBJS) plink plinkw
-@@ -73,7 +83,7 @@
- # GNU make's built-in rules, except we explicitly use "g++" instead of $(CC).
- 
- %.o: %.c
--	g++ -c $(CFLAGS) $< -o $@
-+	g++ -c $(CFLAGS) $(CPPFLAGS) $< -o $@
- 
- %.o: %.cc
--	g++ -x c++ -c $(CFLAGS) $< -o $@
-+	g++ -x c++ -c $(CXXFLAGS) $(CPPFLAGS) $< -o $@
diff --git a/debian/patches/series b/debian/patches/series
index 00e1f16..72bf62b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-01.Makefile_config.patch
+01.Fix_Makefile.patch
diff --git a/debian/rules b/debian/rules
index 1a2d906..8948962 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,8 +1,9 @@
 #!/usr/bin/make -f
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-# Disable all unstable features
-export DEB_CFLAGS_MAINT_APPEND = -DSTABLE_BUILD
+export DEB_CFLAGS_MAINT_APPEND = -DSTABLE_BUILD -DDYNAMIC_ZLIB `dpkg-buildflags --get CXXFLAGS` `dpkg-buildflags --get CPPFLAGS`
+export LINKFLAGS_EXTRA += `dpkg-buildflags --get LDFLAGS`
+export ZLIB += -lz
 
 %:
 	dh $@

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/plink1.9.git



More information about the debian-med-commit mailing list