diff options
-rw-r--r-- | pkgs/development/libraries/soprano/find-virtuoso.patch | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/pkgs/development/libraries/soprano/find-virtuoso.patch b/pkgs/development/libraries/soprano/find-virtuoso.patch index e69de29bb2d1..7da53d6f633b 100644 --- a/pkgs/development/libraries/soprano/find-virtuoso.patch +++ b/pkgs/development/libraries/soprano/find-virtuoso.patch @@ -0,0 +1,86 @@ +From: Yury G. Kudryashov <urkud.urkud@gmail.com> +Subject: [PATCH] Find virtuoso if virtuoso-t is in PATH + +--- + backends/virtuoso/virtuosobackend.cpp | 31 ++++++++++++++++++++++--------- + backends/virtuoso/virtuosobackend.h | 2 +- + 2 files changed, 23 insertions(+), 10 deletions(-) + +diff --git a/backends/virtuoso/virtuosobackend.cpp b/backends/virtuoso/virtuosobackend.cpp +index c83605d..8c30c81 100644 +--- a/backends/virtuoso/virtuosobackend.cpp ++++ b/backends/virtuoso/virtuosobackend.cpp +@@ -27,6 +27,7 @@ + #include "odbcconnectionpool.h" + + #include "sopranodirs.h" ++#include "soprano-config.h" + + #include <QtCore/QDebug> + #include <QtCore/QtPlugin> +@@ -188,19 +189,19 @@ namespace { + + bool Soprano::Virtuoso::BackendPlugin::isAvailable() const + { +-#ifndef Q_OS_WIN +- if ( findVirtuosoDriver().isEmpty() ) { +- qDebug() << Q_FUNC_INFO << "could not find Virtuoso ODBC driver"; +- return false; +- } +-#endif +- + QString virtuosoBin = VirtuosoController::locateVirtuosoBinary(); + if ( virtuosoBin.isEmpty() ) { + qDebug() << Q_FUNC_INFO << "could not find virtuoso-t binary"; + return false; + } + ++#ifndef Q_OS_WIN ++ if ( findVirtuosoDriver(virtuosoBin).isEmpty() ) { ++ qDebug() << Q_FUNC_INFO << "could not find Virtuoso ODBC driver"; ++ return false; ++ } ++#endif ++ + QString vs = determineVirtuosoVersion( virtuosoBin ); + if ( vs.isEmpty() ) { + qDebug() << Q_FUNC_INFO << "Failed to determine version of the Virtuoso server at" << virtuosoBin; +@@ -217,9 +218,21 @@ bool Soprano::Virtuoso::BackendPlugin::isAvailable() const + + + #ifndef Q_OS_WIN +-QString Soprano::Virtuoso::BackendPlugin::findVirtuosoDriver() const ++QString Soprano::Virtuoso::BackendPlugin::findVirtuosoDriver( const QString &virtuosoBinHint ) const + { +- return Soprano::findLibraryPath( "virtodbc_r", QStringList(), QStringList() << QLatin1String( "virtuoso/plugins/" ) << QLatin1String( "odbc/" ) ); ++ QString virtuosoBin; ++ if (virtuosoBinHint.isEmpty()) ++ virtuosoBin = VirtuosoController::locateVirtuosoBinary(); ++ else ++ virtuosoBin = virtuosoBinHint; ++ ++ QDir virtuosoBinDir = QFileInfo(virtuosoBin).absoluteDir(); ++ return Soprano::findLibraryPath( "virtodbc_r", ++ QStringList() ++ << virtuosoBinDir.absoluteFilePath("../lib"SOPRANO_LIB_SUFFIX) ++ << virtuosoBinDir.absoluteFilePath("../lib"), ++ QStringList() << QLatin1String( "virtuoso/plugins/" ) << ++ QLatin1String( "odbc/" ) ); + } + #endif + +diff --git a/backends/virtuoso/virtuosobackend.h b/backends/virtuoso/virtuosobackend.h +index 3971b83..0807e5d 100644 +--- a/backends/virtuoso/virtuosobackend.h ++++ b/backends/virtuoso/virtuosobackend.h +@@ -50,7 +50,7 @@ namespace Soprano { + + #ifndef Q_OS_WIN + private: +- QString findVirtuosoDriver() const; ++ QString findVirtuosoDriver(const QString &virtuosoBinHint = QString()) const; + #endif + }; + } +-- +tg: (da390be..) t/find-virtuoso (depends on: master) |