Description: Remove source from bundled libsvm and adjust build system.
 .
 Change by Steve Langasek enables build with -Wl, --as-needed
Author: Carnë Draug <carandraug+dev@gmail.com>
        Steve Langasek <steve.langasek@ubuntu.com>
Last-Update: 2018-04-09
Bug-Debian: https://bugs.debian.org/895344

--- a/bio-tools-psort-svmloc/MANIFEST
+++ b/bio-tools-psort-svmloc/MANIFEST
@@ -8,5 +8,4 @@ bindings.h
 lib/Bio/Tools/PSort/SVMLoc.pm
 sample.model
 fre_patterns.txt
-libsvm.h
 typemap
--- a/bio-tools-psort-svmloc/Makefile.PL
+++ b/bio-tools-psort-svmloc/Makefile.PL
@@ -9,7 +9,7 @@ $CC = 'g++';
 
 @libs = qw/svmloc/;
 %paths = ();
-$libpath = '-lm -lstdc++';
+$libpath = '-lm -lsvm -lstdc++';
 
 $defaults_file = '../psortb.defaults';
 if( -f $defaults_file ) {
@@ -24,7 +24,7 @@ if( -f $defaults_file ) {
 if($additional_libpath) {
     $libpath .= ' ' . $additional_libpath . ' ' . join(' ', map { '-l' . $_ } @libs);
 } else {
-    $libpath .= Bio::Tools::PSort::Install->makeLibPath(@libs);
+    $libpath = Bio::Tools::PSort::Install->makeLibPath(@libs) . " " . $libpath;
 }
 
 if($^O eq 'cygwin') {
--- a/bio-tools-psort-svmloc/bindings.h
+++ b/bio-tools-psort-svmloc/bindings.h
@@ -9,7 +9,9 @@
 #include <set>
 #include <assert.h>
 
-#include "libsvm.h"
+#include <stdlib.h>
+#include <string.h>
+#include <libsvm/svm.h>
 
 using namespace std;
 
