]> git.pld-linux.org Git - packages/kicad.git/commitdiff
- updated to 5.0.0
authorBartek Szady <bszx@bszx.eu>
Wed, 15 Aug 2018 15:46:45 +0000 (17:46 +0200)
committerBartek Szady <bszx@bszx.eu>
Thu, 16 Aug 2018 12:29:12 +0000 (14:29 +0200)
- libraries moved to noarch subpackages

3d_plugindir.patch [new file with mode: 0644]
appstream.patch [deleted file]
boost-1.61.patch [deleted file]
cmake.patch [deleted file]
kicad.spec
lto.patch [new file with mode: 0644]
python.patch [new file with mode: 0644]

diff --git a/3d_plugindir.patch b/3d_plugindir.patch
new file mode 100644 (file)
index 0000000..a6342b4
--- /dev/null
@@ -0,0 +1,24 @@
+--- kicad-5.0.0/3d-viewer/3d_plugin_dir.h.in.orig      2018-08-15 21:40:42.199391486 +0200
++++ kicad-5.0.0/3d-viewer/3d_plugin_dir.h.in   2018-08-15 21:40:57.405953832 +0200
+@@ -1 +1 @@
+-#define PLUGINDIR "@CMAKE_INSTALL_LIBDIR@"
++#define PLUGINDIR "@CMAKE_INSTALL_FULL_LIBDIR@"
+--- kicad-5.0.0/3d-viewer/3d_cache/3d_plugin_manager.cpp.orig  2018-07-13 21:53:52.000000000 +0200
++++ kicad-5.0.0/3d-viewer/3d_cache/3d_plugin_manager.cpp       2018-08-15 21:44:37.981095083 +0200
+@@ -149,15 +149,7 @@
+     #endif
+     #ifndef _WIN32
+-        // multiarch friendly determination of the plugin directory: the executable dir
+-        // is first determined via wxStandardPaths::Get().GetExecutablePath() and then
+-        // the CMAKE_INSTALL_LIBDIR path is appended relative to the executable dir.
+-
+-        fn.Assign( wxStandardPaths::Get().GetExecutablePath() );
+-        fn.RemoveLastDir();
+-        wxString tfname = fn.GetPathWithSep();
+-        tfname.Append( wxString::FromUTF8Unchecked( PLUGINDIR ) );
+-        fn.Assign( tfname, "");
++        fn.Assign( wxString::FromUTF8Unchecked( PLUGINDIR ), "");
+         fn.AppendDir( "kicad" );
+     #else
+         // on windows the plugins directory is within the executable's directory
diff --git a/appstream.patch b/appstream.patch
deleted file mode 100644 (file)
index 6a2b863..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-From fd329bac32dbf4038d458a8f019ebbb42e8faf48 Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Wed, 20 Apr 2016 16:54:08 +0200
-Subject: [PATCH] Add AppStream metadata
-
-This will ensure KiCad will be easily installable from the app stores such as
-GNOME Software.
-
-The screenshots probably need a better home. Not that it would matter
-too much -- the Linux distributions do cache them with their feeds, so
-the app store applications don't access them from this source directly.
-
-Screenshots from the web [1] can't be used since they are too large for use
-in the app store application. :(
-
-[1] http://kicad-pcb.org/discover/screenshots/
----
- CMakeLists.txt                            |  7 +++++
- resources/linux/appdata/kicad.appdata.xml | 49 +++++++++++++++++++++++++++++++
- 2 files changed, 56 insertions(+)
- create mode 100644 resources/linux/appdata/kicad.appdata.xml
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 456f5e3..6c5eaa1 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -860,6 +860,7 @@ if( UNIX AND NOT APPLE )
-     set( UNIX_MIME_FILES ${UNIX_MIME_DIR}/mime )
-     set( UNIX_ICON_FILES ${UNIX_MIME_DIR}/icons )
-     set( UNIX_APPLICATIONS_FILES ${UNIX_MIME_DIR}/applications )
-+    set( UNIX_APPDATA_FILES resources/linux/appdata )
-     # Install Mimelnk directory
-     install( DIRECTORY ${UNIX_MIMELNK_FILES}
-@@ -884,6 +885,12 @@ if( UNIX AND NOT APPLE )
-         DESTINATION ${CMAKE_INSTALL_PREFIX}/share
-         COMPONENT resources
-         )
-+
-+    # Install AppStream directory (app store entry)
-+    install( DIRECTORY ${UNIX_APPDATA_FILES}
-+        DESTINATION ${CMAKE_INSTALL_PREFIX}/share
-+        COMPONENT resources
-+        )
- endif()
- #include( CTest )
-diff --git a/resources/linux/appdata/kicad.appdata.xml b/resources/linux/appdata/kicad.appdata.xml
-new file mode 100644
-index 0000000..4452714
---- /dev/null
-+++ b/resources/linux/appdata/kicad.appdata.xml
-@@ -0,0 +1,49 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<!-- Copyright Lubomir Rintel 2016 -->
-+<component type="desktop">
-+  <id>kicad.desktop</id>
-+  <name>KiCad</name>
-+  <project_license>GPL-2.0+</project_license>
-+  <metadata_license>CC0-1.0</metadata_license>
-+  <summary>EDA Suite</summary>
-+
-+  <keywords>
-+    <keyword>KiCad</keyword>
-+    <keyword>EDA</keyword>
-+    <keyword>PCB</keyword>
-+    <keyword>Schema</keyword>
-+    <keyword>PcbNew</keyword>
-+    <keyword>Eeschema</keyword>
-+  </keywords>
-+
-+  <description>
-+    <p>A Cross Platform and Open Source Electronics Design Automation Suite.</p>
-+    <p>The programs handle Schematic Capture, and PCB Layout with Gerber output.</p>
-+  </description>
-+
-+  <screenshots>
-+    <screenshot type="default">
-+      <image width="800" height="450">https://raw.githubusercontent.com/lkundrak/kicad-source-mirror/master/resources/linux/screenshots/kicad.png</image>
-+    </screenshot>
-+
-+    <screenshot type="default">
-+      <caption>Eeschema Schematic Editor</caption>
-+      <image width="800" height="450">https://raw.githubusercontent.com/lkundrak/kicad-source-mirror/master/resources/linux/screenshots/kicad-schema.png</image>
-+    </screenshot>
-+
-+    <screenshot type="default">
-+      <caption>PcbNew PCB Layout</caption>
-+      <image width="800" height="450">https://raw.githubusercontent.com/lkundrak/kicad-source-mirror/master/resources/linux/screenshots/kicad-pcbnew.png</image>
-+    </screenshot>
-+
-+    <screenshot type="default">
-+      <caption>PcbNew 3D Viewer</caption>
-+      <image width="800" height="450">https://raw.githubusercontent.com/lkundrak/kicad-source-mirror/master/resources/linux/screenshots/kicad-3d.png</image>
-+    </screenshot>
-+  </screenshots>
-+
-+  <url type="homepage">http://kicad-pcb.org/</url>
-+  <url type="bugtracker">http://kicad-pcb.org/help/report-a-bug/</url>
-+  <update_contact>kicad-developers@lists.launchpad.net</update_contact>
-+  <developer_name>The KiCad Developers</developer_name>
-+</component>
--- 
-2.5.5
-
diff --git a/boost-1.61.patch b/boost-1.61.patch
deleted file mode 100644 (file)
index 3abaa96..0000000
+++ /dev/null
@@ -1,897 +0,0 @@
-From 9a7bd89fd15be9af3b676cd1d7a28338e6c8cd15 Mon Sep 17 00:00:00 2001
-From: Michael Steinberg <michsteinb@gmail.com>
-Date: Tue, 5 Jul 2016 00:14:32 +0200
-Subject: [PATCH 1/3] boost::context fixes to make it compatible with boost
- 1.61
-
-(cherry picked from commit 06d4894fdbeb00727cdcc667b8899ad73d8eb1c2)
----
- common/tool/tool_manager.cpp    |   6 +-
- include/tool/coroutine.h        | 162 ++++++++++++++++++++++++++--------------
- include/tool/tool_base.h        |   7 +-
- include/tool/tool_interactive.h |   3 +-
- 4 files changed, 116 insertions(+), 62 deletions(-)
-
-diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp
-index 447ab99..a198c69 100644
---- a/common/tool/tool_manager.cpp
-+++ b/common/tool/tool_manager.cpp
-@@ -528,7 +528,7 @@ void TOOL_MANAGER::dispatchInternal( const TOOL_EVENT& aEvent )
-         }
-     }
--    BOOST_FOREACH( TOOL_STATE* st, m_toolState | boost::adaptors::map_values )
-+    for( TOOL_STATE* st : ( m_toolState | boost::adaptors::map_values ) )
-     {
-         // no state handler in progress - check if there are any transitions (defined by
-         // Go() method that match the event.
-@@ -542,11 +542,11 @@ void TOOL_MANAGER::dispatchInternal( const TOOL_EVENT& aEvent )
-                     if( st->cofunc )
-                         st->Push();
-+                    st->cofunc = new COROUTINE<int, const TOOL_EVENT&>( tr.second );
-+
-                     // as the state changes, the transition table has to be set up again
-                     st->transitions.clear();
--                    st->cofunc = new COROUTINE<int, const TOOL_EVENT&>( tr.second );
--
-                     // got match? Run the handler.
-                     st->cofunc->Call( aEvent );
-diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h
-index c7eaf5f..e21e18f 100644
---- a/include/tool/coroutine.h
-+++ b/include/tool/coroutine.h
-@@ -3,6 +3,7 @@
-  *
-  * Copyright (C) 2013 CERN
-  * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
-+ * Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
-  *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License
-@@ -27,10 +28,14 @@
- #include <cstdlib>
--#include <boost/context/fcontext.hpp>
- #include <boost/version.hpp>
-+#include <type_traits>
--#include "delegate.h"
-+#if BOOST_VERSION <= 106000
-+#include <boost/context/fcontext.hpp>
-+#else
-+#include <boost/context/execution_context.hpp>
-+#endif
- /**
-  *  Class COROUNTINE.
-@@ -53,13 +58,12 @@
-  *  See coroutine_example.cpp for sample code.
-  */
--template <class ReturnType, class ArgType>
-+template <typename ReturnType, typename ArgType>
- class COROUTINE
- {
- public:
-     COROUTINE() :
--        m_saved( NULL ), m_self( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ),
--        m_running( false )
-+        COROUTINE( nullptr )
-     {
-     }
-@@ -69,8 +73,7 @@ public:
-      */
-     template <class T>
-     COROUTINE( T* object, ReturnType(T::* ptr)( ArgType ) ) :
--        m_func( object, ptr ), m_self( NULL ), m_saved( NULL ), m_stack( NULL ),
--        m_stackSize( c_defaultStackSize ), m_running( false )
-+        COROUTINE( std::bind( ptr, object, std::placeholders::_1 ) )
-     {
-     }
-@@ -78,9 +81,15 @@ public:
-      * Constructor
-      * Creates a coroutine from a delegate object
-      */
--    COROUTINE( DELEGATE<ReturnType, ArgType> aEntry ) :
--        m_func( aEntry ), m_saved( NULL ), m_self( NULL ), m_stack( NULL ),
--        m_stackSize( c_defaultStackSize ), m_running( false )
-+    COROUTINE( std::function<ReturnType(ArgType)> aEntry ) :
-+        m_func( std::move( aEntry ) ),
-+        m_running( false ),
-+#if BOOST_VERSION <= 106000
-+        m_stack( nullptr ),
-+        m_stackSize( c_defaultStackSize ),
-+#endif
-+        m_caller( nullptr ),
-+        m_callee( nullptr )
-     {
-         // Avoid not initialized members, and make static analysers quiet
-         m_args = 0;
-@@ -89,18 +98,26 @@ public:
-     ~COROUTINE()
-     {
--        if( m_saved )
--            delete m_saved;
--
- #if BOOST_VERSION >= 105600
--        if( m_self )
--            delete m_self;
-+        delete m_callee;
- #endif
-+#if BOOST_VERSION <= 106000
-+        delete m_caller;
-+
-         if( m_stack )
-             free( m_stack );
-+#endif
-     }
-+private:
-+#if BOOST_VERSION <= 106000
-+    using context_type = boost::context::fcontext_t;
-+#else
-+    using context_type = boost::context::execution_context<COROUTINE*>;
-+#endif
-+
-+public:
-     /**
-      * Function Yield()
-      *
-@@ -110,7 +127,12 @@ public:
-      */
-     void Yield()
-     {
--        jump( m_self, m_saved, 0 );
-+#if BOOST_VERSION <= 106000
-+        jump( m_callee, m_caller, false );
-+#else
-+        auto result = (*m_caller)( this );
-+        *m_caller = std::move( std::get<0>( result ) );
-+#endif
-     }
-     /**
-@@ -122,7 +144,11 @@ public:
-     void Yield( ReturnType& aRetVal )
-     {
-         m_retVal = aRetVal;
--        jump( m_self, m_saved, 0 );
-+#if BOOST_VERSION <= 106000
-+        jump( m_callee, m_caller, false );
-+#else
-+        m_caller( this );
-+#endif
-     }
-     /**
-@@ -130,9 +156,9 @@ public:
-      *
-      * Defines the entry point for the coroutine, if not set in the constructor.
-      */
--    void SetEntry( DELEGATE<ReturnType, ArgType> aEntry )
-+    void SetEntry( std::function<ReturnType(ArgType)> aEntry )
-     {
--        m_func = aEntry;
-+        m_func = std::move( aEntry );
-     }
-     /* Function Call()
-@@ -143,6 +169,10 @@ public:
-      */
-     bool Call( ArgType aArgs )
-     {
-+        assert( m_callee == NULL );
-+        assert( m_caller == NULL );
-+
-+#if BOOST_VERSION <= 106000
-         // fixme: Clean up stack stuff. Add a guard
-         m_stack = malloc( c_defaultStackSize );
-@@ -151,22 +181,32 @@ public:
-         // correct the stack size
-         m_stackSize -= ( (size_t) m_stack + m_stackSize - (size_t) sp );
--
--        assert( m_self == NULL );
--        assert( m_saved == NULL );
-+#endif
-         m_args = &aArgs;
--#if BOOST_VERSION >= 105600
--        m_self = new boost::context::fcontext_t();
--        *m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub );
-+
-+#if BOOST_VERSION < 105600
-+        m_callee = boost::context::make_fcontext( sp, m_stackSize, callerStub );
-+#elif BOOST_VERSION <= 106000
-+        m_callee = new context_type( boost::context::make_fcontext( sp, m_stackSize, callerStub ) );
- #else
--        m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub );
-+        m_callee = new context_type( std::allocator_arg_t(),
-+                    boost::context::fixedsize_stack( c_defaultStackSize ), &COROUTINE::callerStub );
-+#endif
-+
-+#if BOOST_VERSION <= 106000
-+        m_caller = new context_type();
- #endif
--        m_saved = new boost::context::fcontext_t();
-         m_running = true;
-+
-         // off we go!
--        jump( m_saved, m_self, reinterpret_cast<intptr_t>( this ) );
-+#if BOOST_VERSION <= 106000
-+        jump( m_caller, m_callee, reinterpret_cast<intptr_t>( this ) );
-+#else
-+        auto result = (*m_callee)( this );
-+        *m_callee = std::move( std::get<0>( result ) );
-+#endif
-         return m_running;
-     }
-@@ -179,7 +219,12 @@ public:
-      */
-     bool Resume()
-     {
--        jump( m_saved, m_self, 0 );
-+#if BOOST_VERSION <= 106000
-+        jump( m_caller, m_callee, false );
-+#else
-+        auto result = (*m_callee)( this );
-+        *m_callee = std::move( std::get<0>( result ) );
-+#endif
-         return m_running;
-     }
-@@ -208,61 +253,66 @@ private:
-     static const int c_defaultStackSize = 2000000;    // fixme: make configurable
-     /* real entry point of the coroutine */
-+#if BOOST_VERSION <= 106000
-     static void callerStub( intptr_t aData )
-+#else
-+    static context_type callerStub( context_type caller, COROUTINE* cor )
-+#endif
-     {
-         // get pointer to self
-+#if BOOST_VERSION <= 106000
-         COROUTINE<ReturnType, ArgType>* cor = reinterpret_cast<COROUTINE<ReturnType, ArgType>*>( aData );
-+#else
-+        cor->m_caller = &caller;
-+#endif
-         // call the coroutine method
--        cor->m_retVal = cor->m_func( *cor->m_args );
-+        cor->m_retVal = cor->m_func( *( cor->m_args ) );
-         cor->m_running = false;
-         // go back to wherever we came from.
--        jump( cor->m_self, cor->m_saved, 0 );    // reinterpret_cast<intptr_t>( this ));
-+#if BOOST_VERSION <= 106000
-+        jump( cor->m_callee, cor->m_caller, 0 );
-+#else
-+        return caller;
-+#endif
-     }
-     ///> Wrapper for jump_fcontext to assure compatibility between different boost versions
--    static inline intptr_t jump(boost::context::fcontext_t* aOld, boost::context::fcontext_t* aNew,
-+#if BOOST_VERSION <= 106000
-+    static inline intptr_t jump( context_type* aOld, context_type* aNew,
-                                 intptr_t aP, bool aPreserveFPU = true )
-     {
--#if BOOST_VERSION >= 105600
--        return boost::context::jump_fcontext( aOld, *aNew, aP, aPreserveFPU );
--#else
-+#if BOOST_VERSION < 105600
-         return boost::context::jump_fcontext( aOld, aNew, aP, aPreserveFPU );
-+#else
-+        return boost::context::jump_fcontext( aOld, *aNew, aP, aPreserveFPU );
- #endif
-     }
-+#endif
--    template <typename T>
--    struct strip_ref
--    {
--        typedef T result;
--    };
-+    std::function<ReturnType(ArgType)> m_func;
--    template <typename T>
--    struct strip_ref<T&>
--    {
--        typedef T result;
--    };
-+    bool m_running;
--    DELEGATE<ReturnType, ArgType> m_func;
-+#if BOOST_VERSION <= 106000
-+    ///< coroutine stack
-+    void* m_stack;
-+
-+    size_t m_stackSize;
-+#endif
-     ///< pointer to coroutine entry arguments. Stripped of references
-     ///< to avoid compiler errors.
--    typename strip_ref<ArgType>::result* m_args;
-+    typename std::remove_reference<ArgType>::type* m_args;
-+
-     ReturnType m_retVal;
-     ///< saved caller context
--    boost::context::fcontext_t* m_saved;
-+    context_type* m_caller;
-     ///< saved coroutine context
--    boost::context::fcontext_t* m_self;
--
--    ///< coroutine stack
--    void* m_stack;
--
--    size_t m_stackSize;
--
--    bool m_running;
-+    context_type* m_callee;
- };
- #endif
-diff --git a/include/tool/tool_base.h b/include/tool/tool_base.h
-index 584a979..3bef987 100644
---- a/include/tool/tool_base.h
-+++ b/include/tool/tool_base.h
-@@ -3,6 +3,7 @@
-  *
-  * Copyright (C) 2013 CERN
-  * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
-+ * Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
-  *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License
-@@ -31,7 +32,7 @@
- #include <tool/tool_event.h>
- #include <tool/tool_settings.h>
--#include <tool/delegate.h>
-+#include <functional>
- class EDA_ITEM;
- class TOOL_MANAGER;
-@@ -53,7 +54,9 @@ enum TOOL_TYPE
- /// Unique identifier for tools
- typedef int TOOL_ID;
--typedef DELEGATE<int, const TOOL_EVENT&> TOOL_STATE_FUNC;
-+
-+using TOOL_STATE_FUNC = std::function<int(const TOOL_EVENT&)>;
-+
- /**
-  * Class TOOL_BASE
-diff --git a/include/tool/tool_interactive.h b/include/tool/tool_interactive.h
-index 17d2de7..240eb58 100644
---- a/include/tool/tool_interactive.h
-+++ b/include/tool/tool_interactive.h
-@@ -3,6 +3,7 @@
-  *
-  * Copyright (C) 2013 CERN
-  * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
-+ * Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
-  *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License
-@@ -113,7 +114,7 @@ template <class T>
- void TOOL_INTERACTIVE::Go( int (T::* aStateFunc)( const TOOL_EVENT& ),
-                            const TOOL_EVENT_LIST& aConditions )
- {
--    TOOL_STATE_FUNC sptr( static_cast<T*>( this ), aStateFunc );
-+    TOOL_STATE_FUNC sptr = std::bind( aStateFunc, static_cast<T*>( this ), std::placeholders::_1 );
-     goInternal( sptr, aConditions );
- }
--- 
-2.9.3
-
-From 157c499b031659b895c1a7fef056d02a94bce0b3 Mon Sep 17 00:00:00 2001
-From: decimad <michsteinb@gmail.com>
-Date: Tue, 5 Jul 2016 18:02:50 +0200
-Subject: [PATCH 2/3] use a guarded stack for coroutines in boost version 1.61
-
-(cherry picked from commit 78bc3c65de6c03d19be9902327d08cd4d87c229c)
----
- include/tool/coroutine.h | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h
-index e21e18f..8e472ca 100644
---- a/include/tool/coroutine.h
-+++ b/include/tool/coroutine.h
-@@ -35,6 +35,7 @@
- #include <boost/context/fcontext.hpp>
- #else
- #include <boost/context/execution_context.hpp>
-+#include <boost/context/protected_fixedsize_stack.hpp>
- #endif
- /**
-@@ -191,7 +192,7 @@ public:
-         m_callee = new context_type( boost::context::make_fcontext( sp, m_stackSize, callerStub ) );
- #else
-         m_callee = new context_type( std::allocator_arg_t(),
--                    boost::context::fixedsize_stack( c_defaultStackSize ), &COROUTINE::callerStub );
-+                    boost::context::protected_fixedsize_stack( c_defaultStackSize ), &COROUTINE::callerStub );
- #endif
- #if BOOST_VERSION <= 106000
--- 
-2.9.3
-
-From 418c62f03d9bd81881a17c9cca9c30f839d23e3a Mon Sep 17 00:00:00 2001
-From: decimad <michsteinb@gmail.com>
-Date: Tue, 2 Aug 2016 11:39:39 +0200
-Subject: [PATCH 3/3] Refactor coroutine to improve readability and removed
- unnecessary heap allocations. Added documentation/links to various boost doc
- revisions.
-
-(cherry picked from commit 18b7dbf4d166fcb7da10ced72268a77f02448188)
----
- include/tool/coroutine.h | 221 +++++++++++++++++++++++++----------------------
- include/tool/delegate.h  | 100 ---------------------
- 2 files changed, 120 insertions(+), 201 deletions(-)
- delete mode 100644 include/tool/delegate.h
-
-diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h
-index 8e472ca..70ef6cb 100644
---- a/include/tool/coroutine.h
-+++ b/include/tool/coroutine.h
-@@ -31,7 +31,7 @@
- #include <boost/version.hpp>
- #include <type_traits>
--#if BOOST_VERSION <= 106000
-+#if BOOST_VERSION < 106100
- #include <boost/context/fcontext.hpp>
- #else
- #include <boost/context/execution_context.hpp>
-@@ -39,6 +39,44 @@
- #endif
- /**
-+ * Note: in the history of boost, two changes to the context interface happened.
-+ * [1.54, 1.56)
-+ * http://www.boost.org/doc/libs/1_55_0/libs/context/doc/html/context/context/boost_fcontext.html
-+ *       intptr_t    jump_fcontext(
-+ *                       fcontext_t* ofc,
-+ *                       fcontext_t const* nfc,
-+ *                       intptr_t vp,
-+ *                       bool preserve_fpu = true
-+ *                   );
-+ *
-+ *       fcontext_t* make_fcontext(
-+ *                       void* sp,
-+ *                       std::size_t size,
-+ *                       void (*fn)(intptr_t)
-+ *                   );
-+ *
-+ * [1.56, 1.61)
-+ * http://www.boost.org/doc/libs/1_56_0/libs/context/doc/html/context/context/boost_fcontext.html
-+ *       intptr_t    jump_fcontext(
-+ *                       fcontext_t* ofc,
-+ *                       fcontext_t nfc,            <-----
-+ *                       intptr_t vp,
-+ *                       bool preserve_fpu = true
-+ *                   );
-+ *
-+ *       fcontext_t  make_fcontext(                 <-----
-+ *                       void* sp,
-+ *                       std::size_t size,
-+ *                       void(*fn)(intptr_t)
-+ *                   );
-+ *
-+ * [1.61, oo)
-+ * http://www.boost.org/doc/libs/1_61_0/libs/context/doc/html/context/ecv2.html
-+ *       fcontext_t is hidden away behind the boost::execution_context(_v2) and the stack is created on behalf of
-+ *       the user.
-+ */
-+
-+/**
-  *  Class COROUNTINE.
-  *  Implements a coroutine. Wikipedia has a good explanation:
-  *
-@@ -73,7 +111,7 @@ public:
-      * Creates a coroutine from a member method of an object
-      */
-     template <class T>
--    COROUTINE( T* object, ReturnType(T::* ptr)( ArgType ) ) :
-+    COROUTINE( T* object, ReturnType(T::*ptr)( ArgType ) ) :
-         COROUTINE( std::bind( ptr, object, std::placeholders::_1 ) )
-     {
-     }
-@@ -85,34 +123,20 @@ public:
-     COROUTINE( std::function<ReturnType(ArgType)> aEntry ) :
-         m_func( std::move( aEntry ) ),
-         m_running( false ),
--#if BOOST_VERSION <= 106000
--        m_stack( nullptr ),
--        m_stackSize( c_defaultStackSize ),
-+        m_args( 0 ),
-+#if BOOST_VERSION < 106100 // -> m_callee = void* or void**
-+        m_callee( nullptr ),
- #endif
--        m_caller( nullptr ),
--        m_callee( nullptr )
-+        m_retVal( 0 )
-     {
--        // Avoid not initialized members, and make static analysers quiet
--        m_args = 0;
--        m_retVal = 0;
-     }
-     ~COROUTINE()
-     {
--#if BOOST_VERSION >= 105600
--        delete m_callee;
--#endif
--
--#if BOOST_VERSION <= 106000
--        delete m_caller;
--
--        if( m_stack )
--            free( m_stack );
--#endif
-     }
- private:
--#if BOOST_VERSION <= 106000
-+#if BOOST_VERSION < 106100
-     using context_type = boost::context::fcontext_t;
- #else
-     using context_type = boost::context::execution_context<COROUTINE*>;
-@@ -128,12 +152,7 @@ public:
-      */
-     void Yield()
-     {
--#if BOOST_VERSION <= 106000
--        jump( m_callee, m_caller, false );
--#else
--        auto result = (*m_caller)( this );
--        *m_caller = std::move( std::get<0>( result ) );
--#endif
-+        jumpOut();
-     }
-     /**
-@@ -145,11 +164,20 @@ public:
-     void Yield( ReturnType& aRetVal )
-     {
-         m_retVal = aRetVal;
--#if BOOST_VERSION <= 106000
--        jump( m_callee, m_caller, false );
--#else
--        m_caller( this );
--#endif
-+        jumpOut();
-+    }
-+
-+    /**
-+    * Function Resume()
-+    *
-+    * Resumes execution of a previously yielded coroutine.
-+    * @return true, if the coroutine has yielded again and false if it has finished its
-+    * execution (returned).
-+    */
-+    bool Resume()
-+    {
-+        jumpIn();
-+        return m_running;
-     }
-     /**
-@@ -170,62 +198,37 @@ public:
-      */
-     bool Call( ArgType aArgs )
-     {
--        assert( m_callee == NULL );
--        assert( m_caller == NULL );
-+        assert( m_func );
-+        assert( !m_callee );
-+
-+        m_args = &aArgs;
-+
-+#if BOOST_VERSION < 106100
-+        assert( m_stack == nullptr );
--#if BOOST_VERSION <= 106000
-         // fixme: Clean up stack stuff. Add a guard
--        m_stack = malloc( c_defaultStackSize );
-+        size_t stackSize = c_defaultStackSize;
-+        m_stack.reset( new char[stackSize] );
-         // align to 16 bytes
--        void* sp = (void*) ( ( ( (ptrdiff_t) m_stack ) + m_stackSize - 0xf ) & ( ~0x0f ) );
-+        void* sp = (void*) ( ( ( (ptrdiff_t) m_stack.get() ) + stackSize - 0xf ) & ( ~0x0f ) );
-         // correct the stack size
--        m_stackSize -= ( (size_t) m_stack + m_stackSize - (size_t) sp );
--#endif
--
--        m_args = &aArgs;
-+        stackSize -= size_t( ( (ptrdiff_t) m_stack.get() + stackSize) - (ptrdiff_t) sp );
--#if BOOST_VERSION < 105600
--        m_callee = boost::context::make_fcontext( sp, m_stackSize, callerStub );
--#elif BOOST_VERSION <= 106000
--        m_callee = new context_type( boost::context::make_fcontext( sp, m_stackSize, callerStub ) );
-+        m_callee = boost::context::make_fcontext( sp, stackSize, callerStub );
- #else
--        m_callee = new context_type( std::allocator_arg_t(),
--                    boost::context::protected_fixedsize_stack( c_defaultStackSize ), &COROUTINE::callerStub );
--#endif
--
--#if BOOST_VERSION <= 106000
--        m_caller = new context_type();
-+        m_callee = context_type(
-+            std::allocator_arg_t(),
-+            boost::context::protected_fixedsize_stack( c_defaultStackSize ),
-+            &COROUTINE::callerStub
-+        );
- #endif
-         m_running = true;
-         // off we go!
--#if BOOST_VERSION <= 106000
--        jump( m_caller, m_callee, reinterpret_cast<intptr_t>( this ) );
--#else
--        auto result = (*m_callee)( this );
--        *m_callee = std::move( std::get<0>( result ) );
--#endif
--        return m_running;
--    }
--
--    /**
--     * Function Resume()
--     *
--     * Resumes execution of a previously yielded coroutine.
--     * @return true, if the coroutine has yielded again and false if it has finished its
--     * execution (returned).
--     */
--    bool Resume()
--    {
--#if BOOST_VERSION <= 106000
--        jump( m_caller, m_callee, false );
--#else
--        auto result = (*m_callee)( this );
--        *m_callee = std::move( std::get<0>( result ) );
--#endif
-+        jumpIn();
-         return m_running;
-     }
-@@ -254,66 +257,82 @@ private:
-     static const int c_defaultStackSize = 2000000;    // fixme: make configurable
-     /* real entry point of the coroutine */
--#if BOOST_VERSION <= 106000
-+#if BOOST_VERSION < 106100
-     static void callerStub( intptr_t aData )
--#else
--    static context_type callerStub( context_type caller, COROUTINE* cor )
--#endif
-     {
-         // get pointer to self
--#if BOOST_VERSION <= 106000
--        COROUTINE<ReturnType, ArgType>* cor = reinterpret_cast<COROUTINE<ReturnType, ArgType>*>( aData );
-+        COROUTINE* cor = reinterpret_cast<COROUTINE*>( aData );
-+
-+        // call the coroutine method
-+        cor->m_retVal = cor->m_func( *(cor->m_args) );
-+        cor->m_running = false;
-+
-+        // go back to wherever we came from.
-+        cor->jumpOut();
-+    }
- #else
--        cor->m_caller = &caller;
--#endif
-+    /* real entry point of the coroutine */
-+    static context_type callerStub( context_type caller, COROUTINE* cor )
-+    {
-+        cor->m_caller = std::move( caller );
-         // call the coroutine method
--        cor->m_retVal = cor->m_func( *( cor->m_args ) );
-+        cor->m_retVal = cor->m_func( *(cor->m_args) );
-         cor->m_running = false;
-         // go back to wherever we came from.
--#if BOOST_VERSION <= 106000
--        jump( cor->m_callee, cor->m_caller, 0 );
-+        return std::move( cor->m_caller );
-+    }
-+#endif
-+
-+    void jumpIn()
-+    {
-+#if BOOST_VERSION < 105600
-+        boost::context::jump_fcontext( &m_caller, m_callee, reinterpret_cast<intptr_t>(this) );
-+#elif BOOST_VERSION < 106100
-+        boost::context::jump_fcontext( &m_caller, m_callee, reinterpret_cast<intptr_t>(this) );
- #else
--        return caller;
-+        auto result = m_callee( this );
-+        m_callee = std::move( std::get<0>( result ) );
- #endif
-     }
--    ///> Wrapper for jump_fcontext to assure compatibility between different boost versions
--#if BOOST_VERSION <= 106000
--    static inline intptr_t jump( context_type* aOld, context_type* aNew,
--                                intptr_t aP, bool aPreserveFPU = true )
-+    void jumpOut()
-     {
- #if BOOST_VERSION < 105600
--        return boost::context::jump_fcontext( aOld, aNew, aP, aPreserveFPU );
-+        boost::context::jump_fcontext( m_callee, &m_caller, 0 );
-+#elif BOOST_VERSION < 106100
-+        boost::context::jump_fcontext( &m_callee, m_caller, 0 );
- #else
--        return boost::context::jump_fcontext( aOld, *aNew, aP, aPreserveFPU );
-+        auto result = m_caller( nullptr );
-+        m_caller = std::move( std::get<0>( result ) );
- #endif
-     }
--#endif
-     std::function<ReturnType(ArgType)> m_func;
-     bool m_running;
--#if BOOST_VERSION <= 106000
-+#if BOOST_VERSION < 106100
-     ///< coroutine stack
--    void* m_stack;
--
--    size_t m_stackSize;
-+    std::unique_ptr<char[]> m_stack;
- #endif
-     ///< pointer to coroutine entry arguments. Stripped of references
-     ///< to avoid compiler errors.
-     typename std::remove_reference<ArgType>::type* m_args;
--    ReturnType m_retVal;
--
-     ///< saved caller context
--    context_type* m_caller;
-+    context_type m_caller;
-     ///< saved coroutine context
-+#if BOOST_VERSION < 105600
-     context_type* m_callee;
-+#else
-+    context_type m_callee;
-+#endif
-+
-+    ReturnType m_retVal;
- };
- #endif
-diff --git a/include/tool/delegate.h b/include/tool/delegate.h
-deleted file mode 100644
-index a350dec..0000000
---- a/include/tool/delegate.h
-+++ /dev/null
-@@ -1,100 +0,0 @@
--/*
-- * This program source code file is part of KiCad, a free EDA CAD application.
-- *
-- * Copyright (C) 2013 CERN
-- * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
-- *
-- * This program is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU General Public License
-- * as published by the Free Software Foundation; either version 2
-- * of the License, or (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, you may find one here:
-- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-- * or you may search the http://www.gnu.org website for the version 2 license,
-- * or you may write to the Free Software Foundation, Inc.,
-- * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
-- */
--
--#ifndef __DELEGATE_H
--#define __DELEGATE_H
--
--
--/**
-- * class DELEGATE
-- * A trivial delegate (pointer to member method of an object) pattern implementation.
-- * Check delegate_example.cpp for a coding sample.
-- */
--
--template <class ReturnType, class Arg>
--class DELEGATE
--{
--public:
--    typedef ReturnType (DELEGATE<ReturnType, Arg>::* MemberPointer)( Arg );
--    typedef ReturnType  _ReturnType;
--    typedef Arg         _ArgType;
--
--    DELEGATE()
--    {
--    }
--
--    template <class T>
--    DELEGATE( T* aObject, ReturnType(T::* aPtr)( Arg ) )
--    {
--        m_ptr = reinterpret_cast<MemberPointer>( aPtr );
--        m_object = reinterpret_cast<void*>( aObject );
--    };
--
--
--    ReturnType operator()( Arg aA ) const
--    {
--        DELEGATE<ReturnType, Arg>* casted = reinterpret_cast<DELEGATE<ReturnType, Arg>*>( m_object );
--        return (casted->*m_ptr)( aA );
--    }
--
--private:
--    MemberPointer m_ptr;
--    void* m_object;
--};
--
--/**
-- * Class DELEGATE0
-- * Same as DELEGATE, but with no arguments.
-- */
--template <class ReturnType>
--class DELEGATE0
--{
--public:
--    typedef ReturnType ( DELEGATE0<ReturnType>::* MemberPointer )();
--    typedef ReturnType _ReturnType;
--
--    DELEGATE0()
--    {
--    }
--
--    template <class T>
--    DELEGATE0( T* aObject, ReturnType(T::* aPtr)() )
--    {
--        m_ptr = reinterpret_cast<MemberPointer>( aPtr );
--        m_object = reinterpret_cast<void*>( aObject );
--    };
--
--
--    ReturnType operator()() const
--    {
--        DELEGATE0<ReturnType>* casted = reinterpret_cast<DELEGATE0<ReturnType>*>( m_object );
--        return ( casted->*m_ptr )();
--    }
--
--private:
--    MemberPointer m_ptr;
--    void* m_object;
--};
--
--#endif
--- 
-2.9.3
-
diff --git a/cmake.patch b/cmake.patch
deleted file mode 100644 (file)
index b7860af..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- kicad-4.0.6/CMakeLists.txt~        2017-04-15 19:08:53.000000000 +0200
-+++ kicad-4.0.6/CMakeLists.txt 2017-04-15 21:09:33.888727818 +0200
-@@ -359,7 +359,7 @@
-         set( KICAD_PLUGINS ${KICAD_BIN}/scripting/plugins
-             CACHE PATH "Location of KiCad plugins." )
-     else()
--        set( KICAD_PLUGINS lib/kicad/plugins
-+        set( KICAD_PLUGINS lib${LIB_SUFFIX}/kicad/plugins
-             CACHE PATH "Location of KiCad plugins." )
-     endif()
index adcfbbf2fe90a561b6a62a1413e2a139374cd0e6..2b98040253e6397b1e17b2fd0d8d45e3ef924213 100644 (file)
 Summary:       KiCad - is a GPL'd suite of programs for EDA
 Summary(pl.UTF-8):     KiCad - zestaw programów na licencji GPL zaliczany do kategorii EDA
 Name:          kicad
-Version:       4.0.6
-Release:       4
+Version:       5.0.0
+Release:       1
 Epoch:         1
 License:       GPL v2+
 Group:         X11/Applications
-Source0:       https://launchpad.net/kicad/4.0/%{version}/+download/%{name}-%{version}.tar.xz
-# Source0-md5: 24eca1f22bbb0a88acbba321a4b1c4aa
+Source0:       https://launchpad.net/kicad/5.0/%{version}/+download/%{name}-%{version}.tar.xz
+# Source0-md5: 99a39910a3f7d8320b605bb9a9ff3af8
 Source1:       https://github.com/KiCad/kicad-doc/archive/%{version}/%{name}-doc-%{version}.tar.gz
-# Source1-md5: f68105a04132fc8a4412d75ffe0d0b16
-Source2:       https://github.com/KiCad/kicad-library/archive/%{version}/%{name}-library-%{version}.tar.gz
-# Source2-md5: 325ca078191584cd063835e01ecabd67
-Source3:       https://github.com/KiCad/kicad-i18n/archive/%{version}/%{name}-i18n-%{version}.tar.gz
-# Source3-md5: 6680338a8b23e7d651bb30cbba04e2b3
-
-# perl -ne 'BEGIN { $s = 100 } /uri \$\{KIGITHUB}\/([^)]*)/ and printf "Source".$s.":\thttps://github.com/KiCad/$1/archive/%{version}/$1-%{version}.tar.gz\n# Source".$s++."-md5:\t\n"'
-# kicad-*/kicad-library-*/template/fp-lib-table.for-github
-Source100:     https://github.com/KiCad/Air_Coils_SML_NEOSID.pretty/archive/%{version}/Air_Coils_SML_NEOSID.pretty-%{version}.tar.gz
-# Source100-md5:       e343fb1de9debbfca640879433964bf5
-Source101:     https://github.com/KiCad/Buttons_Switches_SMD.pretty/archive/%{version}/Buttons_Switches_SMD.pretty-%{version}.tar.gz
-# Source101-md5:       4d3bd10d0d7c29dd03e91f3ee999a4cf
-Source102:     https://github.com/KiCad/Buttons_Switches_THT.pretty/archive/%{version}/Buttons_Switches_THT.pretty-%{version}.tar.gz
-# Source102-md5:       8e83e77abd4a2699cabcf10ca2452a37
-Source103:     https://github.com/KiCad/Buzzers_Beepers.pretty/archive/%{version}/Buzzers_Beepers.pretty-%{version}.tar.gz
-# Source103-md5:       0be5ca79b86e23022b9ce5947fce4657
-Source104:     https://github.com/KiCad/Capacitors_SMD.pretty/archive/%{version}/Capacitors_SMD.pretty-%{version}.tar.gz
-# Source104-md5:       a132bacf9268f67caa9c504398b485f6
-Source105:     https://github.com/KiCad/Capacitors_Tantalum_SMD.pretty/archive/%{version}/Capacitors_Tantalum_SMD.pretty-%{version}.tar.gz
-# Source105-md5:       591a022e35a0d4eb3338e36cbfc2b111
-Source106:     https://github.com/KiCad/Capacitors_THT.pretty/archive/%{version}/Capacitors_THT.pretty-%{version}.tar.gz
-# Source106-md5:       d2b3ec61381efeda3787c306a5f20c4d
-Source107:     https://github.com/KiCad/Choke_Axial_ThroughHole.pretty/archive/%{version}/Choke_Axial_ThroughHole.pretty-%{version}.tar.gz
-# Source107-md5:       9e5ac090fc1d5a8145c93c6846d1242d
-Source108:     https://github.com/KiCad/Choke_Common-Mode_Wurth.pretty/archive/%{version}/Choke_Common-Mode_Wurth.pretty-%{version}.tar.gz
-# Source108-md5:       1b1b159c5f598cc0487b39fbfdc854ad
-Source109:     https://github.com/KiCad/Choke_Radial_ThroughHole.pretty/archive/%{version}/Choke_Radial_ThroughHole.pretty-%{version}.tar.gz
-# Source109-md5:       d90b7adb66b4f8535667875cb10f4fba
-Source110:     https://github.com/KiCad/Choke_SMD.pretty/archive/%{version}/Choke_SMD.pretty-%{version}.tar.gz
-# Source110-md5:       ffbbec04a597c3f8313df6d52020d7a7
-Source111:     https://github.com/KiCad/Choke_Toroid_ThroughHole.pretty/archive/%{version}/Choke_Toroid_ThroughHole.pretty-%{version}.tar.gz
-# Source111-md5:       4bdf6343c75887d67dc80e69b8e080ba
-Source112:     https://github.com/KiCad/Connectors_Harwin.pretty/archive/%{version}/Connectors_Harwin.pretty-%{version}.tar.gz
-# Source112-md5:       c103d987a87bde089155421af2216c93
-Source113:     https://github.com/KiCad/Connectors_Hirose.pretty/archive/%{version}/Connectors_Hirose.pretty-%{version}.tar.gz
-# Source113-md5:       8d10a6d792b1a1b55459494d0374326f
-Source114:     https://github.com/KiCad/Connectors_JAE.pretty/archive/%{version}/Connectors_JAE.pretty-%{version}.tar.gz
-# Source114-md5:       08db63855dc67995ed483a58af85f9f7
-Source115:     https://github.com/KiCad/Connectors_JST.pretty/archive/%{version}/Connectors_JST.pretty-%{version}.tar.gz
-# Source115-md5:       5ce5e2bac3bf25bbeb98a4dd33632609
-Source116:     https://github.com/KiCad/Connectors_Mini-Universal.pretty/archive/%{version}/Connectors_Mini-Universal.pretty-%{version}.tar.gz
-# Source116-md5:       9977b9592e4789c9b1b20ab26fe301a6
-Source117:     https://github.com/KiCad/Connectors_Molex.pretty/archive/%{version}/Connectors_Molex.pretty-%{version}.tar.gz
-# Source117-md5:       ef7d14f881e09be9a882b0e71f4474c7
-Source118:     https://github.com/KiCad/Connectors_Multicomp.pretty/archive/%{version}/Connectors_Multicomp.pretty-%{version}.tar.gz
-# Source118-md5:       951ba83ee8f34e51465c75d38c246ce8
-Source119:     https://github.com/KiCad/Connectors_Phoenix.pretty/archive/%{version}/Connectors_Phoenix.pretty-%{version}.tar.gz
-# Source119-md5:       7d9a232d0cd195f9d2b9ed82010c2ffe
-Source120:     https://github.com/KiCad/Connectors_Samtec.pretty/archive/%{version}/Connectors_Samtec.pretty-%{version}.tar.gz
-# Source120-md5:       b2610848de6e1c91b2c8d30d9cd518d5
-Source121:     https://github.com/KiCad/Connectors_TE-Connectivity.pretty/archive/%{version}/Connectors_TE-Connectivity.pretty-%{version}.tar.gz
-# Source121-md5:       43e70e5d21e1119f8981eed40d082a8f
-Source122:     https://github.com/KiCad/Connectors_Terminal_Blocks.pretty/archive/%{version}/Connectors_Terminal_Blocks.pretty-%{version}.tar.gz
-# Source122-md5:       cbb75de29fe23cab12519de5c314d738
-Source123:     https://github.com/KiCad/Connectors_WAGO.pretty/archive/%{version}/Connectors_WAGO.pretty-%{version}.tar.gz
-# Source123-md5:       219367a04e3917ba84a61341b9a5d939
-Source124:     https://github.com/KiCad/Connectors.pretty/archive/%{version}/Connectors.pretty-%{version}.tar.gz
-# Source124-md5:       53358aaf6319b4963df7ed988985a13a
-Source125:     https://github.com/KiCad/Converters_DCDC_ACDC.pretty/archive/%{version}/Converters_DCDC_ACDC.pretty-%{version}.tar.gz
-# Source125-md5:       8876b6ace69520adc78dd752ea872fcb
-Source126:     https://github.com/KiCad/Crystals.pretty/archive/%{version}/Crystals.pretty-%{version}.tar.gz
-# Source126-md5:       3d156ccfcc43216f96ecfa7c3f8345b8
-Source127:     https://github.com/KiCad/Diodes_SMD.pretty/archive/%{version}/Diodes_SMD.pretty-%{version}.tar.gz
-# Source127-md5:       bea39235640355298ea6f14332627a18
-Source128:     https://github.com/KiCad/Diodes_THT.pretty/archive/%{version}/Diodes_THT.pretty-%{version}.tar.gz
-# Source128-md5:       ec77db0c94cfae709d145bcad133ed4f
-Source129:     https://github.com/KiCad/Discret.pretty/archive/%{version}/Discret.pretty-%{version}.tar.gz
-# Source129-md5:       49598b208de48dd7ec87586950348112
-Source130:     https://github.com/KiCad/Displays_7-Segment.pretty/archive/%{version}/Displays_7-Segment.pretty-%{version}.tar.gz
-# Source130-md5:       7f05ebc80504e122961ea020b42e8c3c
-Source131:     https://github.com/KiCad/Displays.pretty/archive/%{version}/Displays.pretty-%{version}.tar.gz
-# Source131-md5:       fae3bd280525583ab8669c3b2f48e4a7
-Source132:     https://github.com/KiCad/Divers.pretty/archive/%{version}/Divers.pretty-%{version}.tar.gz
-# Source132-md5:       87a7ea52f622289d4486e5c4f9f4f308
-Source133:     https://github.com/KiCad/Enclosures.pretty/archive/%{version}/Enclosures.pretty-%{version}.tar.gz
-# Source133-md5:       af7c0066f10c3c449c36b23559ffddf0
-Source134:     https://github.com/KiCad/EuroBoard_Outline.pretty/archive/%{version}/EuroBoard_Outline.pretty-%{version}.tar.gz
-# Source134-md5:       305424a4e6b51de49856e3cb12b5eedb
-Source135:     https://github.com/KiCad/Fiducials.pretty/archive/%{version}/Fiducials.pretty-%{version}.tar.gz
-# Source135-md5:       45c7652cfbd5e2aba589e7e594f2f401
-Source136:     https://github.com/KiCad/Filters_HF_Coils_NEOSID.pretty/archive/%{version}/Filters_HF_Coils_NEOSID.pretty-%{version}.tar.gz
-# Source136-md5:       52bb487182bd6a1a2245f8076259c328
-Source137:     https://github.com/KiCad/Fuse_Holders_and_Fuses.pretty/archive/%{version}/Fuse_Holders_and_Fuses.pretty-%{version}.tar.gz
-# Source137-md5:       cadfa005debdfc7d0c469ef48b8d26d0
-Source138:     https://github.com/KiCad/Hall-Effect_Transducers_LEM.pretty/archive/%{version}/Hall-Effect_Transducers_LEM.pretty-%{version}.tar.gz
-# Source138-md5:       ebb9c1b12d906f0e69376fe3fa4e5ee7
-Source139:     https://github.com/KiCad/Heatsinks.pretty/archive/%{version}/Heatsinks.pretty-%{version}.tar.gz
-# Source139-md5:       4a7696b52a217c1af3d76310cefc9276
-Source140:     https://github.com/KiCad/Housings_BGA.pretty/archive/%{version}/Housings_BGA.pretty-%{version}.tar.gz
-# Source140-md5:       1a52287e9101f75ea0a013c8896ea5ad
-Source141:     https://github.com/KiCad/Housings_DFN_QFN.pretty/archive/%{version}/Housings_DFN_QFN.pretty-%{version}.tar.gz
-# Source141-md5:       bfca29af9ec269b811e95f5a12d49327
-Source142:     https://github.com/KiCad/Housings_DIP.pretty/archive/%{version}/Housings_DIP.pretty-%{version}.tar.gz
-# Source142-md5:       806e69140a65217b6124c0c0649d6474
-Source143:     https://github.com/KiCad/Housings_LCC.pretty/archive/%{version}/Housings_LCC.pretty-%{version}.tar.gz
-# Source143-md5:       79a0b216aa186eab822b45fb2ab48b81
-Source144:     https://github.com/KiCad/Housings_LGA.pretty/archive/%{version}/Housings_LGA.pretty-%{version}.tar.gz
-# Source144-md5:       0e3ef9347f68ab03fd9e4960ef652f6c
-Source145:     https://github.com/KiCad/Housings_PGA.pretty/archive/%{version}/Housings_PGA.pretty-%{version}.tar.gz
-# Source145-md5:       e008414845d6d1928a4607b2511a7fed
-Source146:     https://github.com/KiCad/Housings_QFP.pretty/archive/%{version}/Housings_QFP.pretty-%{version}.tar.gz
-# Source146-md5:       36ff18521539dcc036a421af4a3eeea1
-Source147:     https://github.com/KiCad/Housings_SIP.pretty/archive/%{version}/Housings_SIP.pretty-%{version}.tar.gz
-# Source147-md5:       5d5d071ba919c686fee70c1fe33360d7
-Source148:     https://github.com/KiCad/Housings_SOIC.pretty/archive/%{version}/Housings_SOIC.pretty-%{version}.tar.gz
-# Source148-md5:       6cf7b9bf4f6fba01c3bef5d4b81b7b01
-Source149:     https://github.com/KiCad/Housings_SSOP.pretty/archive/%{version}/Housings_SSOP.pretty-%{version}.tar.gz
-# Source149-md5:       462ad43dc28523cbd148f661aac26190
-Source150:     https://github.com/KiCad/Inductors_NEOSID.pretty/archive/%{version}/Inductors_NEOSID.pretty-%{version}.tar.gz
-# Source150-md5:       6fc983a43dccd17739d3cefa637a6005
-Source151:     https://github.com/KiCad/Inductors.pretty/archive/%{version}/Inductors.pretty-%{version}.tar.gz
-# Source151-md5:       99cfe2b7fcbfa170259c5ad94694ffee
-Source152:     https://github.com/KiCad/Inductors_SMD.pretty/archive/%{version}/Inductors_SMD.pretty-%{version}.tar.gz
-# Source152-md5:       6e2e634595a9f0bcb8a1ba9c884fee5f
-Source153:     https://github.com/KiCad/Inductors_THT.pretty/archive/%{version}/Inductors_THT.pretty-%{version}.tar.gz
-# Source153-md5:       ed47a1aed878619170cb2d104bf34992
-Source154:     https://github.com/KiCad/IR-DirectFETs.pretty/archive/%{version}/IR-DirectFETs.pretty-%{version}.tar.gz
-# Source154-md5:       baad0378907a45ce847e7c53d9d0fc36
-Source155:     https://github.com/KiCad/Labels.pretty/archive/%{version}/Labels.pretty-%{version}.tar.gz
-# Source155-md5:       e094fa074bd2252fa99e92021c1e3c3d
-Source156:     https://github.com/KiCad/LEDs.pretty/archive/%{version}/LEDs.pretty-%{version}.tar.gz
-# Source156-md5:       f40658749082dbb8f2b123dc3d8b9e6b
-Source157:     https://github.com/KiCad/Measurement_Points.pretty/archive/%{version}/Measurement_Points.pretty-%{version}.tar.gz
-# Source157-md5:       be7400d113165b932c38a83d0e1a81c6
-Source158:     https://github.com/KiCad/Measurement_Scales.pretty/archive/%{version}/Measurement_Scales.pretty-%{version}.tar.gz
-# Source158-md5:       f1d2226dcb04a6bbd83aba8b701d9df0
-Source159:     https://github.com/KiCad/Mechanical_Sockets.pretty/archive/%{version}/Mechanical_Sockets.pretty-%{version}.tar.gz
-# Source159-md5:       904a2beaf0b3cd03465aa50b22577f3f
-Source160:     https://github.com/KiCad/Microwave.pretty/archive/%{version}/Microwave.pretty-%{version}.tar.gz
-# Source160-md5:       c370a2b3cf5b284f98e6b264f0818726
-Source161:     https://github.com/KiCad/Modules.pretty/archive/%{version}/Modules.pretty-%{version}.tar.gz
-# Source161-md5:       4a501a24a6355fe814a884b94d162b22
-Source162:     https://github.com/KiCad/Mounting_Holes.pretty/archive/%{version}/Mounting_Holes.pretty-%{version}.tar.gz
-# Source162-md5:       7cc6b71a4e1f4c15db62fa8ba1c97d37
-Source163:     https://github.com/KiCad/NF-Transformers_ETAL.pretty/archive/%{version}/NF-Transformers_ETAL.pretty-%{version}.tar.gz
-# Source163-md5:       819b22b813b3fb7d09125cb4c3f05639
-Source164:     https://github.com/KiCad/Oddities.pretty/archive/%{version}/Oddities.pretty-%{version}.tar.gz
-# Source164-md5:       a93fa061e420ea397efa790f01e2a462
-Source165:     https://github.com/KiCad/Opto-Devices.pretty/archive/%{version}/Opto-Devices.pretty-%{version}.tar.gz
-# Source165-md5:       e5de89a96ca7bbabc3f1c82df09d2f90
-Source166:     https://github.com/KiCad/Oscillators.pretty/archive/%{version}/Oscillators.pretty-%{version}.tar.gz
-# Source166-md5:       8e38ea216c960a56fad2a32ab491bff7
-Source167:     https://github.com/KiCad/PFF_PSF_PSS_Leadforms.pretty/archive/%{version}/PFF_PSF_PSS_Leadforms.pretty-%{version}.tar.gz
-# Source167-md5:       597792f8c3b5a9e12902d597ea1fc132
-Source168:     https://github.com/KiCad/Pin_Headers.pretty/archive/%{version}/Pin_Headers.pretty-%{version}.tar.gz
-# Source168-md5:       5130d2e64fb526b5e037b9c04499a098
-Source169:     https://github.com/KiCad/Potentiometers.pretty/archive/%{version}/Potentiometers.pretty-%{version}.tar.gz
-# Source169-md5:       3db69082756229d2ec4c3a50848ffd28
-Source170:     https://github.com/KiCad/Power_Integrations.pretty/archive/%{version}/Power_Integrations.pretty-%{version}.tar.gz
-# Source170-md5:       ddbcc3767e163fe5789454de8735ba80
-Source171:     https://github.com/KiCad/Relays_THT.pretty/archive/%{version}/Relays_THT.pretty-%{version}.tar.gz
-# Source171-md5:       51494d7db9eabccea483c7f4c5d17f50
-Source172:     https://github.com/KiCad/Resistors_SMD.pretty/archive/%{version}/Resistors_SMD.pretty-%{version}.tar.gz
-# Source172-md5:       32f760a5bd68397bf7d8bfb2622b7038
-Source173:     https://github.com/KiCad/Resistors_THT.pretty/archive/%{version}/Resistors_THT.pretty-%{version}.tar.gz
-# Source173-md5:       7f3e3a656b94b4ec3ad59f841f8e1149
-Source174:     https://github.com/KiCad/Resistors_Universal.pretty/archive/%{version}/Resistors_Universal.pretty-%{version}.tar.gz
-# Source174-md5:       c35311f20f8c816244000b4d85fb6e8f
-Source175:     https://github.com/KiCad/RF_Modules.pretty/archive/%{version}/RF_Modules.pretty-%{version}.tar.gz
-# Source175-md5:       22df000a3a8fb16f9306015f2decea6a
-Source176:     https://github.com/KiCad/Shielding_Cabinets.pretty/archive/%{version}/Shielding_Cabinets.pretty-%{version}.tar.gz
-# Source176-md5:       7afa82ede121a46158d30a848002947d
-Source177:     https://github.com/KiCad/SMD_Packages.pretty/archive/%{version}/SMD_Packages.pretty-%{version}.tar.gz
-# Source177-md5:       ee99961ab96b360a446a5790c184a129
-Source178:     https://github.com/KiCad/Sockets_MOLEX_KK-System.pretty/archive/%{version}/Sockets_MOLEX_KK-System.pretty-%{version}.tar.gz
-# Source178-md5:       9c5f6f092156c138856e819cd245cb43
-Source179:     https://github.com/KiCad/Socket_Strips.pretty/archive/%{version}/Socket_Strips.pretty-%{version}.tar.gz
-# Source179-md5:       7ab96152fe961849944936e69671f99b
-Source180:     https://github.com/KiCad/Sockets.pretty/archive/%{version}/Sockets.pretty-%{version}.tar.gz
-# Source180-md5:       bd381d3f2222675e4f259f15f918c512
-Source181:     https://github.com/KiCad/Symbols.pretty/archive/%{version}/Symbols.pretty-%{version}.tar.gz
-# Source181-md5:       16185826b1eb27200c30ef972f7468cd
-Source182:     https://github.com/KiCad/TO_SOT_Packages_SMD.pretty/archive/%{version}/TO_SOT_Packages_SMD.pretty-%{version}.tar.gz
-# Source182-md5:       38addd895c3711539e291d5f86f27807
-Source183:     https://github.com/KiCad/TO_SOT_Packages_THT.pretty/archive/%{version}/TO_SOT_Packages_THT.pretty-%{version}.tar.gz
-# Source183-md5:       3a0c96fcec348fd7daf856e0351d0435
-Source184:     https://github.com/KiCad/Transformers_CHK.pretty/archive/%{version}/Transformers_CHK.pretty-%{version}.tar.gz
-# Source184-md5:       c9f4c477a7b3ee99258f0eb8d07eb2ad
-Source185:     https://github.com/KiCad/Transformers_SMD.pretty/archive/%{version}/Transformers_SMD.pretty-%{version}.tar.gz
-# Source185-md5:       9f3a326a296b10ea529d349d670b593e
-Source186:     https://github.com/KiCad/Transformers_SMPS_ThroughHole.pretty/archive/%{version}/Transformers_SMPS_ThroughHole.pretty-%{version}.tar.gz
-# Source186-md5:       bd6a05c82e5fa34771dc9b039c38279a
-Source187:     https://github.com/KiCad/Transformers_THT.pretty/archive/%{version}/Transformers_THT.pretty-%{version}.tar.gz
-# Source187-md5:       8f1fafb159a5890abb9cc1fe3f24543a
-Source188:     https://github.com/KiCad/Transistors_OldSowjetAera.pretty/archive/%{version}/Transistors_OldSowjetAera.pretty-%{version}.tar.gz
-# Source188-md5:       bad332b6c0097a4179611a7f86eddee2
-Source189:     https://github.com/KiCad/Valves.pretty/archive/%{version}/Valves.pretty-%{version}.tar.gz
-# Source189-md5:       0cef210c06a05af4f011fe73bd9d8f83
-Source190:     https://github.com/KiCad/Varistors.pretty/archive/%{version}/Varistors.pretty-%{version}.tar.gz
-# Source190-md5:       a18138206bf52efbdc37d448648b7e04
-Source191:     https://github.com/KiCad/Wire_Connections_Bridges.pretty/archive/%{version}/Wire_Connections_Bridges.pretty-%{version}.tar.gz
-# Source191-md5:       1724a3899fb5b483bf224da6a6db2650
-Source192:     https://github.com/KiCad/Wire_Pads.pretty/archive/%{version}/Wire_Pads.pretty-%{version}.tar.gz
-# Source192-md5:       06e3b9d0bb1be074b5693000736797db
+# Source1-md5: 0d6e78e1087a04c8e6385f76c0727bf7
+Source2:       https://github.com/KiCad/kicad-i18n/archive/%{version}/%{name}-i18n-%{version}.tar.gz
+# Source2-md5: 1e1503b89c575c80ff51583d40667c14
+Source3:       https://github.com/KiCad/kicad-symbols/archive/%{version}/%{name}-symbols-%{version}.tar.gz
+# Source3-md5: 03cb33312062571118a277bafd01c06d
+Source4:       https://github.com/KiCad/kicad-footprints/archive/%{version}/%{name}-footprints-%{version}.tar.gz
+# Source4-md5: e8ce40c47b108280d7878f858899ab10
+Source5:       https://github.com/KiCad/kicad-packages3D/archive/%{version}/%{name}-packages3D-%{version}.tar.gz
+# Source5-md5: aac66499bbbd9f21ad3e90af7ba854d2
+Source6:       https://github.com/KiCad/kicad-templates/archive/%{version}/%{name}-templates-%{version}.tar.gz
+# Source6-md5: d8a5c09a33588a73eb8552c83bdb0381
 Patch0:                nostrip.patch
 # https://code.launchpad.net/~lkundrak/kicad/appstream-data/+merge/293391
-Patch1:                appstream.patch
-Patch2:                boost-1.61.patch
-Patch3:                cmake.patch
+Patch1:                lto.patch
+Patch2:                python.patch
+Patch3:                3d_plugindir.patch
 URL:           http://www.kicad-pcb.org/
+BuildRequires: GLM
+BuildRequires: OCE-devel
 BuildRequires: appstream-glib
 BuildRequires: asciidoc
 BuildRequires: boost-devel
@@ -221,6 +40,7 @@ BuildRequires:       dblatex
 BuildRequires: desktop-file-utils
 BuildRequires: doxygen
 BuildRequires: glew-devel
+BuildRequires: ngspice-devel
 BuildRequires: openssl-devel
 BuildRequires: perl-Unicode-LineBreak
 BuildRequires: po4a >= 0.51
@@ -255,6 +75,34 @@ programów:
 - pcbnew - program do projektowania płytek drukowanych.
 - gerbview - przeglądarka plików Gerber (dokumentów dla fotoplotera).
 
+%package library
+Summary:       Symbols, footprints and templates for kicad
+Summary(pl.UTF-8):     Symbole, obudowy i wzorce dla kicad
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+Requires:      kicad >= 1:5.0.0
+
+%description library
+Symbols, footprints and templates for kicad.
+
+%description -l pl.UTF-8
+Symbole, obudowy i wzorce dla kicad.
+
+%package packages3D
+Summary:       Packages3D for kicad
+Summary(pl.UTF-8):     Trójwymiarowe modele obudów dla kicad
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+Requires:      kicad >= 1:5.0.0
+
+%description packages3D
+Packages3D for kicad
+
+%description -l pl.UTF-8
+Trójwymiarowe modele obudów dla kicad.
+
 %package doc
 Summary:       Documentation for kicad
 Summary(fr.UTF-8):     Documentations pour kicad en anglais
@@ -384,27 +232,39 @@ BuildArch:        noarch
 %description doc-ru
 Documentation and tutorials for Kicad in Russian.
 
+%package doc-zh
+Summary:       Documentation for Kicad in Chinese
+Summary(fr.UTF-8):     Documentations pour kicad en chinois
+Group:         Documentation
+Requires:      %{name}-doc = %{epoch}:%{version}-%{release}
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description doc-zh
+Documentation and tutorials for Kicad in Chinese.
+
 %prep
-%setup -q -a 1 -a 2 -a 3 %(seq -f '-a %g' 100 192 | xargs)
+%setup -q -a 1 -a 2 -a 3 -a 4 -a 5 -a 6
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
 
-install -d modules
-%{__sed} -e '/(lib/!d' -e 's/.*(name \([^)]*\)).*uri \${KIGITHUB}\/\([^)]*\)).*/\2 \1/' \
-       %{name}-library-%{version}/template/fp-lib-table.for-github | \
-while read src dest ; do
-       %{__mv} $src-%{version} modules/$dest
-done
-
 %build
+
+build_library() {
+  mkdir "$1/build"
+  cd "$1/build"
+  %cmake ..
+  %{__make} VERBOSE=1
+  cd ../..
+}
 # Symbols libraries
-mkdir %{name}-library-%{version}/build
-cd %{name}-library-%{version}/build
-%cmake ..
-%{__make} VERBOSE=1
-cd ../..
+build_library %{name}-symbols-%{version}
+build_library %{name}-footprints-%{version}
+build_library %{name}-templates-%{version}
+build_library %{name}-packages3D-%{version}
 
 # Documentation
 mkdir %{name}-doc-%{version}/build
@@ -428,20 +288,28 @@ cd build
 %cmake .. \
        -DKICAD_SKIP_BOOST=ON \
        -DKICAD_BUILD_VERSION="%{version}-%{release}" \
-       -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-gtk2-unicode-config
+       -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-gtk2-unicode-config \
+       -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON
 
 %{__make} VERBOSE=1
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
+install_library() {
+  %{__make} -C $1/build install \
+       DESTDIR=$RPM_BUILD_ROOT
+}
+
 # KiCAD itself
 %{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
 # Symbols libraries
-%{__make} -C %{name}-library-%{version}/build install \
-       DESTDIR=$RPM_BUILD_ROOT
+install_library %{name}-symbols-%{version}
+install_library %{name}-footprints-%{version}
+install_library %{name}-templates-%{version}
+install_library %{name}-packages3D-%{version}
 
 # Documentation
 %{__make} -C %{name}-doc-%{version}/build install \
@@ -451,23 +319,16 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -C %{name}-i18n-%{version}/build install \
        DESTDIR=$RPM_BUILD_ROOT
 
-# install template
-install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/template
-cp -p template/%{name}.pro $RPM_BUILD_ROOT%{_datadir}/%{name}/template
-
-# Footprints
-install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/modules
-cp -a modules/* $RPM_BUILD_ROOT%{_datadir}/%{name}/modules
-ln -f $RPM_BUILD_ROOT%{_datadir}/%{name}/template/fp-lib-table{.for-pretty,}
-
 %find_lang %{name}
 
 %post
+/sbin/ldconfig
 %update_mime_database
 %update_desktop_database_post
 %update_icon_cache hicolor
 
 %postun
+/sbin/ldconfig
 %update_mime_database
 %update_desktop_database_postun
 %update_icon_cache hicolor
@@ -477,7 +338,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc AUTHORS.txt CHANGELOG.txt Documentation
+%doc AUTHORS.txt Documentation
 %attr(755,root,root) %{_bindir}/bitmap2component
 %attr(755,root,root) %{_bindir}/_cvpcb.kiface
 %attr(755,root,root) %{_bindir}/dxf2idf
@@ -489,30 +350,38 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/idfcyl
 %attr(755,root,root) %{_bindir}/idfrect
 %attr(755,root,root) %{_bindir}/kicad
+%attr(755,root,root) %{_bindir}/kicad-ogltest
+%attr(755,root,root) %{_bindir}/kicad2step
 %attr(755,root,root) %{_bindir}/pcb_calculator
 %attr(755,root,root) %{_bindir}/_pcb_calculator.kiface
 %attr(755,root,root) %{_bindir}/pcbnew
 %attr(755,root,root) %{_bindir}/_pcbnew.kiface
 %attr(755,root,root) %{_bindir}/pl_editor
 %attr(755,root,root) %{_bindir}/_pl_editor.kiface
+%attr(755,root,root) %{_libdir}/libkicad_3dsg.so.*.*.*
+%ghost %{_libdir}/libkicad_3dsg.so
 %dir %{_libdir}/%{name}
 %dir %{_libdir}/%{name}/plugins
-%{_libdir}/%{name}/plugins/bom2csv.xsl
-%{_libdir}/%{name}/plugins/bom_cvs.xsl
-%{_libdir}/%{name}/plugins/bom_with_title_block_2_csv.xsl
-%{_libdir}/%{name}/plugins/netlist_form_cadstar-RINF.xsl
-%{_libdir}/%{name}/plugins/netlist_form_cadstar.xsl
-%{_libdir}/%{name}/plugins/netlist_form_OrcadPcb2.xsl
-%{_libdir}/%{name}/plugins/netlist_form_pads-pcb.xsl
-%{_datadir}/%{name}
+%dir %{_libdir}/%{name}/plugins/3d
+%attr(755,root,root) %{_libdir}/%{name}/plugins/3d/*.so
+#python - to subpackage?
+%attr(755,root,root) %{_libdir}/python2.7/site-packages/_pcbnew.so
+%{_libdir}/python2.7/site-packages/pcbnew.py
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/demos
+%{_datadir}/%{name}/plugins
+%{_datadir}/%{name}/scripting
+%dir %{_datadir}/%{name}/library
+%dir %{_datadir}/%{name}/modules
+%dir %{_datadir}/%{name}/modules/packages3d
+%dir %{_datadir}/%{name}/template
 %{_iconsdir}/hicolor/*x*/*/*.png
 %{_iconsdir}/hicolor/scalable/*/*.svg
-%{_datadir}/mime/packages/kicad.xml
+%{_datadir}/mime/packages/kicad-*.xml
 %{_datadir}/appdata/kicad.appdata.xml
 %{_desktopdir}/eeschema.desktop
 %{_desktopdir}/%{name}.desktop
 %{_desktopdir}/bitmap2component.desktop
-%{_desktopdir}/cvpcb.desktop
 %{_desktopdir}/gerbview.desktop
 %{_desktopdir}/pcbcalculator.desktop
 %{_desktopdir}/pcbnew.desktop
@@ -521,7 +390,16 @@ rm -rf $RPM_BUILD_ROOT
 #%{_datadir}/mimelnk/application/x-kicad-schematic.desktop
 
 %dir %{_docdir}/%{name}
-%{_docdir}/%{name}/*.txt
+
+%files library
+%defattr(644,root,root,755)
+%{_datadir}/%{name}/library/*
+%{_datadir}/%{name}/modules/*.pretty
+%{_datadir}/%{name}/template/*
+
+%files packages3D
+%defattr(644,root,root,755)
+%{_datadir}/%{name}/modules/packages3d/*
 
 %files doc
 %defattr(644,root,root,755)
@@ -569,3 +447,7 @@ rm -rf $RPM_BUILD_ROOT
 %files doc-ru
 %defattr(644,root,root,755)
 %lang(ru) %{_docdir}/%{name}/help/ru
+
+%files doc-zh
+%defattr(644,root,root,755)
+%lang(zh) %{_docdir}/%{name}/help/zh
diff --git a/lto.patch b/lto.patch
new file mode 100644 (file)
index 0000000..f44498f
--- /dev/null
+++ b/lto.patch
@@ -0,0 +1,148 @@
+--- kicad-5.0.0/common/system/libcontext.cpp.orig      2018-07-13 21:53:52.000000000 +0200
++++ kicad-5.0.0/common/system/libcontext.cpp   2018-08-12 12:01:30.930309888 +0200
+@@ -258,12 +258,10 @@
+ #endif
+ #if defined(LIBCONTEXT_PLATFORM_linux_i386) && defined(LIBCONTEXT_COMPILER_gcc)
++intptr_t LIBCONTEXT_CALL_CONVENTION libcontext::jump_fcontext( libcontext::fcontext_t* ofc, libcontext::fcontext_t nfc,
++        intptr_t vp, bool preserve_fpu )
++{
+ __asm (
+-".text\n"
+-".globl jump_fcontext\n"
+-".align 2\n"
+-".type jump_fcontext,@function\n"
+-"jump_fcontext:\n"
+ "    movl  0x10(%esp), %ecx\n"
+ "    pushl  %ebp  \n"
+ "    pushl  %ebx  \n"
+@@ -293,19 +291,16 @@
+ "    popl  %edx\n"
+ "    movl  %eax, 0x4(%esp)\n"
+ "    jmp  *%edx\n"
+-".size jump_fcontext,.-jump_fcontext\n"
+-".section .note.GNU-stack,\"\",%progbits\n"
+ );
++}
+ #endif
+ #if defined(LIBCONTEXT_PLATFORM_linux_i386) && defined(LIBCONTEXT_COMPILER_gcc)
++libcontext::fcontext_t LIBCONTEXT_CALL_CONVENTION libcontext::make_fcontext( void* sp, size_t size,
++        void (* fn)( intptr_t ) )
++{
+ __asm (
+-".text\n"
+-".globl make_fcontext\n"
+-".align 2\n"
+-".type make_fcontext,@function\n"
+-"make_fcontext:\n"
+ "    movl  0x4(%esp), %eax\n"
+ "    leal  -0x8(%eax), %eax\n"
+ "    andl  $-16, %eax\n"
+@@ -327,19 +322,16 @@
+ "    movl  %eax, (%esp)\n"
+ "    call  _exit@PLT\n"
+ "    hlt\n"
+-".size make_fcontext,.-make_fcontext\n"
+-".section .note.GNU-stack,\"\",%progbits\n"
+ );
++}
+ #endif
+ #if defined(LIBCONTEXT_PLATFORM_linux_x86_64) && defined(LIBCONTEXT_COMPILER_gcc)
++intptr_t LIBCONTEXT_CALL_CONVENTION libcontext::jump_fcontext( libcontext::fcontext_t* ofc, libcontext::fcontext_t nfc,
++        intptr_t vp, bool preserve_fpu )
++{
+ __asm (
+-".text\n"
+-".globl jump_fcontext\n"
+-".type jump_fcontext,@function\n"
+-".align 16\n"
+-"jump_fcontext:\n"
+ "    pushq  %rbp  \n"
+ "    pushq  %rbx  \n"
+ "    pushq  %r15  \n"
+@@ -370,19 +362,16 @@
+ "    movq  %rdx, %rax\n"
+ "    movq  %rdx, %rdi\n"
+ "    jmp  *%r8\n"
+-".size jump_fcontext,.-jump_fcontext\n"
+-".section .note.GNU-stack,\"\",%progbits\n"
+ );
++}
+ #endif
+ #if defined(LIBCONTEXT_PLATFORM_linux_x86_64) && defined(LIBCONTEXT_COMPILER_gcc)
++libcontext::fcontext_t LIBCONTEXT_CALL_CONVENTION libcontext::make_fcontext( void* sp, size_t size,
++        void (* fn)( intptr_t ) )
++{
+ __asm (
+-".text\n"
+-".globl make_fcontext\n"
+-".type make_fcontext,@function\n"
+-".align 16\n"
+-"make_fcontext:\n"
+ "    movq  %rdi, %rax\n"
+ "    andq  $-16, %rax\n"
+ "    leaq  -0x48(%rax), %rax\n"
+@@ -396,9 +385,8 @@
+ "    xorq  %rdi, %rdi\n"
+ "    call  _exit@PLT\n"
+ "    hlt\n"
+-".size make_fcontext,.-make_fcontext\n"
+-".section .note.GNU-stack,\"\",%progbits\n"
+ );
++}
+ #endif
+--- kicad-5.0.0/include/system/libcontext.h.orig       2018-07-13 21:53:52.000000000 +0200
++++ kicad-5.0.0/include/system/libcontext.h    2018-08-12 11:59:20.941248992 +0200
+@@ -30,15 +30,19 @@
+     #if defined(__x86_64__) || defined(__amd64__)
+         #define LIBCONTEXT_PLATFORM_linux_x86_64
+         #define LIBCONTEXT_CALL_CONVENTION
++        #define LIBCONTEXT_FUNCTION_ALIGN 16
+     #elif __i386__
+         #define LIBCONTEXT_PLATFORM_linux_i386
+         #define LIBCONTEXT_CALL_CONVENTION
++        #define LIBCONTEXT_FUNCTION_ALIGN 2
+     #elif __arm__
+         #define LIBCONTEXT_PLATFORM_linux_arm32
+         #define LIBCONTEXT_CALL_CONVENTION
++        #define LIBCONTEXT_FUNCTION_ALIGN 2
+     #elif __aarch64__
+         #define LIBCONTEXT_PLATFORM_linux_arm64
+         #define LIBCONTEXT_CALL_CONVENTION
++        #define LIBCONTEXT_FUNCTION_ALIGN 2
+     #endif
+     #elif defined(__MINGW32__) || defined(__MINGW64__)
+@@ -74,22 +78,15 @@
+ typedef void* fcontext_t;
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+ intptr_t LIBCONTEXT_CALL_CONVENTION jump_fcontext( fcontext_t* ofc, fcontext_t nfc,
+-        intptr_t vp, bool preserve_fpu = true );
++        intptr_t vp, bool preserve_fpu = true )  __attribute__ ((naked, aligned(LIBCONTEXT_FUNCTION_ALIGN) ));
+ fcontext_t LIBCONTEXT_CALL_CONVENTION make_fcontext( void* sp, size_t size,
+-        void (* fn)( intptr_t ) );
++        void (* fn)( intptr_t ) )  __attribute__ ((naked, aligned(LIBCONTEXT_FUNCTION_ALIGN) ));
+ #ifdef __cplusplus
+ }    // namespace
+ #endif
+-#ifdef __cplusplus
+-}    // extern "C"
+-#endif
+-
+ #endif
diff --git a/python.patch b/python.patch
new file mode 100644 (file)
index 0000000..988039f
--- /dev/null
@@ -0,0 +1,8 @@
+--- kicad-5.0.0/pcbnew/python/plugins/touch_slider_wizard.py.orig      2018-07-13 21:53:52.000000000 +0200
++++ kicad-5.0.0/pcbnew/python/plugins/touch_slider_wizard.py   2018-08-13 08:32:44.840047256 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python2
+ #
+ # This program source code file is part of KiCad, a free EDA CAD application.
This page took 0.192977 seconds and 4 git commands to generate.