kicad: search for libngspice.so.0 instead of libngspace.so

closes #5513
This commit is contained in:
maxice8 2018-12-07 07:58:11 -02:00 committed by maxice8
parent 8bc5e4b1df
commit 1b420bd4e2
2 changed files with 38 additions and 8 deletions

View file

@ -0,0 +1,30 @@
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" );

View file

@ -1,16 +1,16 @@
# Template file for 'kicad'
pkgname=kicad
version=5.0.1
revision=3
revision=4
build_style=cmake
configure_args="-DKICAD_BUILD_VERSION=${version} -DKICAD_SCRIPTING=ON
-DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_SCRIPTING_ACTION_MENU=ON -DBUILD_GITHUB_PLUGIN=ON -DKICAD_USE_OCE=OFF
-DKICAD_SPICE=$(vopt_if spice ON OFF)"
-DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_SCRIPTING_ACTION_MENU=ON -DBUILD_GITHUB_PLUGIN=ON -DKICAD_USE_OCE=OFF
-DKICAD_SPICE=$(vopt_if spice ON OFF)"
hostmakedepends="pkg-config swig"
makedepends="wxWidgets-devel wxPython-devel python-devel glew-devel cairo-devel
libressl-devel boost-devel libcurl-devel glm occt-devel libgomp-devel
$(vopt_if spice ngspice-devel)"
libressl-devel boost-devel libcurl-devel glm occt-devel libgomp-devel
$(vopt_if spice ngspice-devel)"
depends="wxPython"
short_desc="Electronic schematic and PCB design software"
maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
@ -37,8 +37,8 @@ esac
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python wxPython"
configure_args+=" -DPYTHON_SITE_PACKAGE_PATH=${XBPS_CROSS_BASE}/usr/lib/python${py2_ver}/site-packages
-DPYTHON_DEST=/usr/lib/python${py2_ver}/site-packages"
configure_args+=" -DPYTHON_SITE_PACKAGE_PATH=${XBPS_CROSS_BASE}/${py2_sitelib}
-DPYTHON_DEST=${py2_sitelib}"
fi
pre_configure() {