1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
Description: Adjust build system to ignore bundled libsvm.
The original patch sent upstream completely removes the bundled
libsvm. This modified patch keeps the bundled files in the source
tree which will be ignored by the build. This makes for a simpler
and smaller patch, that is also less likely to break in the future
due to upstream changes such as them updating the bundled version of
libsvm.
Origin: vendor
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=79106
Author: Mathieu Bridon <bochecha@fedoraproject.org>
Last-Update: 2017-08-14
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -15,9 +15,9 @@
(ABSTRACT_FROM => 'lib/Algorithm/SVM.pm',
AUTHOR => 'Matthew Laird <matt@brinkman.mbb.sfu.ca>') : ()),
'OPTIMIZE' => '-O3', # segfaults with gcc 2.96 if lower (?)
- 'LIBS' => '-lm',
+ 'LIBS' => '-lm -lsvm',
'CC' => $CC,
'LD' => '$(CC)',
- 'OBJECT' => 'SVM.o libsvm.o bindings.o',
+ 'OBJECT' => 'SVM.o bindings.o',
'XSOPT' => '-C++ -noprototypes',
%args);
--- a/SVM.xs
+++ b/SVM.xs
@@ -14,7 +14,7 @@
#endif
#include "bindings.h"
-#include "libsvm.h"
+#include <libsvm/svm.h>
DataSet *_new_dataset(double l) {
--- a/bindings.h
+++ b/bindings.h
@@ -7,7 +7,9 @@
#include <map>
#include <assert.h>
-#include "libsvm.h"
+#include <stdlib.h>
+#include <string.h>
+#include <libsvm/svm.h>
class DataSet {
friend class SVM;
|