[med-svn] [bcftools] 01/04: Backport upstream patch to be able to build plugin with GSL2

Afif Elghraoui afif-guest at moszumanska.debian.org
Mon Feb 22 00:39:52 UTC 2016


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

afif-guest pushed a commit to branch master
in repository bcftools.

commit a0f5384e178974e8411ec1449f316400bff2dc5c
Author: Afif Elghraoui <afif at ghraoui.name>
Date:   Sun Feb 21 16:33:11 2016 -0800

    Backport upstream patch to be able to build plugin with GSL2
    
    See uptsream issue https://github.com/samtools/bcftools/issues/378
    and the patch header for details.
---
 debian/TODO                       |  6 ------
 debian/control                    |  2 +-
 debian/patches/peakfit-gsl2.patch | 36 ++++++++++++++++++++++++++++++++++++
 debian/patches/series             |  1 +
 debian/rules                      |  2 +-
 5 files changed, 39 insertions(+), 8 deletions(-)

diff --git a/debian/TODO b/debian/TODO
deleted file mode 100644
index b9e93df..0000000
--- a/debian/TODO
+++ /dev/null
@@ -1,6 +0,0 @@
-
-Fix build problem with GSL2 for optional plugin. The issue seems to be the API change
-described in http://git.savannah.gnu.org/cgit/gsl.git/tree/NEWS#n55
-
-The build problem is similar to that in #805842. I've reported it upstream:
-https://github.com/samtools/bcftools/issues/378
diff --git a/debian/control b/debian/control
index 7ae260c..e92f0ed 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Build-Depends:
 	debhelper (>= 9),
 	zlib1g-dev,
 	libhts-dev (>= 1.3),
-#	libgsl-dev,
+	libgsl-dev,
 # Test-Depends:
 	tabix,
 	libio-pty-perl
diff --git a/debian/patches/peakfit-gsl2.patch b/debian/patches/peakfit-gsl2.patch
new file mode 100644
index 0000000..1ff2e09
--- /dev/null
+++ b/debian/patches/peakfit-gsl2.patch
@@ -0,0 +1,36 @@
+From 681d80c20d078f953ff39140f7e519c94cb4fd1d Mon Sep 17 00:00:00 2001
+From: Petr Danecek <pd3 at sanger.ac.uk>
+Date: Thu, 11 Feb 2016 14:44:32 +0000
+Subject: [PATCH] peakfit build with GSLv2, resolves #378
+
+---
+ peakfit.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/peakfit.c b/peakfit.c
+index 2bc8492..8094b5d 100644
+--- a/peakfit.c
++++ b/peakfit.c
+@@ -26,6 +26,7 @@
+ 
+ #include "peakfit.h"
+ #include <stdio.h>
++#include <gsl/gsl_version.h>
+ #include <gsl/gsl_vector.h>
+ #include <gsl/gsl_multifit_nlin.h>
+ #include <htslib/hts.h>
+@@ -550,9 +551,14 @@ double peakfit_run(peakfit_t *pkf, int nvals, double *xvals, double *yvals)
+             }
+             if ( ret ) break;
+ 
++#if GSL_MAJOR_VERSION >= 2
++            int info;
++            test1 = gsl_multifit_fdfsolver_test(solver, 1e-8,1e-8, 0.0, &info);
++#else
+             gsl_multifit_gradient(solver->J, solver->f, grad);
+             test1 = gsl_multifit_test_gradient(grad, 1e-8);
+             test2 = gsl_multifit_test_delta(solver->dx, solver->x, 1e-8, 1e-8);
++#endif
+         }
+         while ((test1==GSL_CONTINUE || test2==GSL_CONTINUE) && ++niter<niter_max);
+         if ( pkf->verbose >1 )
diff --git a/debian/patches/series b/debian/patches/series
index 89d3d83..96c8d42 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ compiler-flags.patch
 destdir.patch
 tests-pluginpath.patch
 spelling.patch
+peakfit-gsl2.patch
diff --git a/debian/rules b/debian/rules
index 206d4e5..f6bf26c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,7 @@
 #include /usr/share/dpkg/default.mk
 
 export HTSDIR=/usr/include
-#export USE_GPL=1
+export USE_GPL=1
 export plugindir=/usr/lib/$(DEB_HOST_MULTIARCH)/bcftools
 
 %:

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



More information about the debian-med-commit mailing list