Merge pull request #278051 from nevivurn/fix/libsvm-so-filename

libsvm: fix shared library filename
This commit is contained in:
Weijia Wang 2024-01-03 22:11:17 +01:00 committed by GitHub
commit 1fe9682491
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,12 +29,13 @@ stdenv.mkDerivation rec {
let
libSuff = stdenv.hostPlatform.extensions.sharedLibrary;
soVersion = "3";
libName = if stdenv.isDarwin then "libsvm.${soVersion}${libSuff}" else "libsvm${libSuff}.${soVersion}";
in
''
runHook preInstall
install -D libsvm.so.${soVersion} $out/lib/libsvm.${soVersion}${libSuff}
ln -s $out/lib/libsvm.${soVersion}${libSuff} $out/lib/libsvm${libSuff}
install -D libsvm.so.${soVersion} $out/lib/${libName}
ln -s $out/lib/${libName} $out/lib/libsvm${libSuff}
install -Dt $bin/bin/ svm-scale svm-train svm-predict