libsvm: make it possible to use it for saga
saga, as possibly other packages too, searches for svm.h in include/libsvm/svm.h. Since the package doesn't hold a proper install target, it should be OK to link the `svm.h` to `libsvm/svm.h` in `$out/include/`.
This commit is contained in:
parent
6e4d33a001
commit
0eafcccbc2
@ -10,18 +10,19 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
make
|
make
|
||||||
make lib
|
make lib
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = let
|
installPhase = let
|
||||||
libSuff = stdenv.hostPlatform.extensions.sharedLibrary;
|
libSuff = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||||
in ''
|
in ''
|
||||||
mkdir -p $out/lib $out/bin $out/include;
|
install -D libsvm.so.2 $out/lib/libsvm.2${libSuff}
|
||||||
cp libsvm.so.2 $out/lib/libsvm.2${libSuff};
|
ln -s $out/lib/libsvm.2${libSuff} $out/lib/libsvm${libSuff}
|
||||||
ln -s $out/lib/libsvm.2${libSuff} $out/lib/libsvm${libSuff};
|
install -Dt $out/bin/ svm-scale svm-train svm-predict
|
||||||
cp svm-scale svm-train svm-predict $out/bin;
|
install -Dm644 -t $out/include svm.h
|
||||||
cp svm.h $out/include;
|
mkdir $out/include/libsvm
|
||||||
|
ln -s $out/include/svm.h $out/include/libsvm/svm.h
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = stdenv.lib.optionalString stdenv.isDarwin ''
|
postFixup = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user