void-packages/srcpkgs/kicad/patches/fix-ngspice-finding.patch

31 lines
1.0 KiB
Diff

From: =?utf-8?q?Stefan_Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Fri, 26 Oct 2018 23:35:13 +0200
Subject: Use fixed version for libngspice.so.0
CanonicalizeName only adds the lib prefix and .so suffix, so loading
libngspice.so fails until the development package is installed.
MAC/Windows code paths lookup soversion 0 of ngspice as well, as this
is the only compatible version.
---
eeschema/sim/ngspice.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/eeschema/sim/ngspice.cpp b/eeschema/sim/ngspice.cpp
index 8818b50..81c9123 100644
--- eeschema/sim/ngspice.cpp
+++ eeschema/sim/ngspice.cpp
@@ -318,8 +318,11 @@ void NGSPICE::init_dll()
}
if( !m_dll.IsLoaded() ) // try also the system libraries
-#endif /* __WINDOWS || __WXMAC__ */
+
m_dll.Load( wxDynamicLibrary::CanonicalizeName( "ngspice" ) );
+#else
+ m_dll.Load("libngspice.so.0");
+#endif /* __WINDOWS || __WXMAC__ */
if( !m_dll.IsLoaded() )
throw std::runtime_error( "Missing ngspice shared library" );