Algorithm-SVMLight
view release on metacpan or search on metacpan
use strict;
use Module::Build;
my $build = Module::Build->new
(
module_name => 'Algorithm::SVMLight',
license => 'perl',
extra_linker_flags => '-lsvmlight',
extra_compiler_flags => '-Wall',
create_makefile_pl => 'passthrough',
build_requires => {
'Module::Build' => '0.21',
'Test::More' => 0,
},
);
$build->create_build_script;
perl Build.PL
perl Build
perl Build test
perl Build install (may need to be done as root)
If the SVMLight headers/library aren't in a location where your
compiler/linker will find them by itself, in the first step you can
tell it where they are like so:
perl Build.PL --extra_compiler_flags "-I/foo/include -Wall" \
--extra_linker_flags "-L/foo/lib -lsvmlight"
DEPENDENCIES
As described above, this module requires a patched version of
SVMLight. Installation requires Module::Build version 0.21 and
Test::More (any version), but they are not used after installation.
COPYRIGHT AND LICENCE
SVMLight.patch view on Meta::CPAN
diff -urb svm_light/Makefile svm_light-new/Makefile
--- svm_light/Makefile 2008-10-08 14:38:53.000000000 -0500
+++ svm_light-new/Makefile 2008-11-18 14:06:33.000000000 -0600
@@ -16,17 +16,25 @@
#CFLAGS= $(SFLAGS) -pg -Wall -pedantic # debugging C-Compiler flags
#LFLAGS= $(SFLAGS) -pg # debugging linker flags
LIBS=-L. -lm # used libraries
+RANLIB=ranlib
-all: svm_learn_hideo svm_classify
+OPTIM=hideo
+
+all: svm_learn svm_classify libsvmlight.a libsvmlight.so
+
+libsvmlight.a: svm_learn.o svm_common.o svm_$(OPTIM).o
+ $(AR) r $@ $^
( run in 0.519 second using v1.01-cache-2.11-cpan-94b05bcf43c )