diff --git a/0001-Use-fixed-version-for-libngspice.so.0.patch b/0001-Use-fixed-version-for-libngspice.so.0.patch new file mode 100644 index 0000000..a86f81a --- /dev/null +++ b/0001-Use-fixed-version-for-libngspice.so.0.patch @@ -0,0 +1,32 @@ +From f197847f50622b6f20ade5ddae71d3c749cbd956 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Fri, 26 Oct 2018 23:35:13 +0200 +Subject: [PATCH] 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 | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/eeschema/sim/ngspice.cpp b/eeschema/sim/ngspice.cpp +index 8818b50..3b6e4dd 100644 +--- a/eeschema/sim/ngspice.cpp ++++ b/eeschema/sim/ngspice.cpp +@@ -318,8 +318,10 @@ 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" ); +-- +2.19.1 + diff --git a/kicad.changes b/kicad.changes index c02f51d..f083252 100644 --- a/kicad.changes +++ b/kicad.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Oct 26 21:38:17 UTC 2018 - Stefan Brüns + +- Add Requires: libngspice0 +- Fix name for dlopen'ed libngspice.so.0 + Add 0001-Use-fixed-version-for-libngspice.so.0.patch + ------------------------------------------------------------------- Thu Oct 18 19:03:17 UTC 2018 - Stefan Brüns diff --git a/kicad.spec b/kicad.spec index d197c39..8bbafe0 100644 --- a/kicad.spec +++ b/kicad.spec @@ -41,8 +41,10 @@ Patch2: kicad-library-repos-install.patch Patch3: kicad-suse-help-path.patch # PATCH-FIX-UPSTREAM 0001-Use-absolute-path-CMAKE_INSTALL_FULL_LIBDIR-for-3d-v.patch Patch4: 0001-Use-absolute-path-CMAKE_INSTALL_FULL_LIBDIR-for-3d-v.patch +# PATCH-FIX-OPENSUSE 0001-Use-fixed-version-for-libngspice.so.0.patch +Patch5: 0001-Use-fixed-version-for-libngspice.so.0.patch -%if 0%{?suse_version} > 1325 +%if 0%{?suse_version} >= 1500 BuildRequires: libboost_system-devel BuildRequires: libboost_test-devel %else @@ -73,6 +75,8 @@ BuildRequires: pkgconfig(zlib) # Fix directory owner BuildRequires: hicolor-icon-theme BuildRoot: %{_tmppath}/%{name}-%{version}-build +# Dlopen'ed simulator library +Requires: libngspice0 Requires: python-wxWidgets-3_0 >= 3 # The help function gives an error without the doc package Requires: %{name}-doc = %{version} @@ -117,6 +121,7 @@ This package contains script for KiCad libraries downloading. %patch2 -p1 %patch3 %patch4 -p1 +%patch5 -p1 cp %{SOURCE2} ./LICENSE.GPLv3 cp %{SOURCE3} ./LICENSE.AGPLv3