From c4549a7b246e17ca05f95cd1c6ecebf61ad128bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sun, 16 Apr 2017 12:21:27 +0200 Subject: [PATCH] - started update to 4.0.6 based on fedora --- appstream.patch | 105 ++ boost-1.61.patch | 897 ++++++++++++++++++ cmake.patch | 11 + ...oost-polygon-declare-gtlsort-earlier.patch | 11 - kicad-2011.07.12-fix-linking.patch | 10 - kicad-bug-921553.patch | 76 -- kicad-build.patch | 11 - kicad.spec | 522 ++++++---- nostrip.patch | 21 + 9 files changed, 1358 insertions(+), 306 deletions(-) create mode 100644 appstream.patch create mode 100644 boost-1.61.patch create mode 100644 cmake.patch delete mode 100644 kicad-2011.07.12-boost-polygon-declare-gtlsort-earlier.patch delete mode 100644 kicad-2011.07.12-fix-linking.patch delete mode 100644 kicad-bug-921553.patch delete mode 100644 kicad-build.patch create mode 100644 nostrip.patch diff --git a/appstream.patch b/appstream.patch new file mode 100644 index 0000000..6a2b863 --- /dev/null +++ b/appstream.patch @@ -0,0 +1,105 @@ +From fd329bac32dbf4038d458a8f019ebbb42e8faf48 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +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 @@ ++ ++ ++ ++ kicad.desktop ++ KiCad ++ GPL-2.0+ ++ CC0-1.0 ++ EDA Suite ++ ++ ++ KiCad ++ EDA ++ PCB ++ Schema ++ PcbNew ++ Eeschema ++ ++ ++ ++

A Cross Platform and Open Source Electronics Design Automation Suite.

++

The programs handle Schematic Capture, and PCB Layout with Gerber output.

++
++ ++ ++ ++ https://raw.githubusercontent.com/lkundrak/kicad-source-mirror/master/resources/linux/screenshots/kicad.png ++ ++ ++ ++ Eeschema Schematic Editor ++ https://raw.githubusercontent.com/lkundrak/kicad-source-mirror/master/resources/linux/screenshots/kicad-schema.png ++ ++ ++ ++ PcbNew PCB Layout ++ https://raw.githubusercontent.com/lkundrak/kicad-source-mirror/master/resources/linux/screenshots/kicad-pcbnew.png ++ ++ ++ ++ PcbNew 3D Viewer ++ https://raw.githubusercontent.com/lkundrak/kicad-source-mirror/master/resources/linux/screenshots/kicad-3d.png ++ ++ ++ ++ http://kicad-pcb.org/ ++ http://kicad-pcb.org/help/report-a-bug/ ++ kicad-developers@lists.launchpad.net ++ The KiCad Developers ++
+-- +2.5.5 + diff --git a/boost-1.61.patch b/boost-1.61.patch new file mode 100644 index 0000000..3abaa96 --- /dev/null +++ b/boost-1.61.patch @@ -0,0 +1,897 @@ +From 9a7bd89fd15be9af3b676cd1d7a28338e6c8cd15 Mon Sep 17 00:00:00 2001 +From: Michael Steinberg +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( tr.second ); ++ + // as the state changes, the transition table has to be set up again + st->transitions.clear(); + +- st->cofunc = new COROUTINE( 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 ++ * 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 + +-#include + #include ++#include + +-#include "delegate.h" ++#if BOOST_VERSION <= 106000 ++#include ++#else ++#include ++#endif + + /** + * Class COROUNTINE. +@@ -53,13 +58,12 @@ + * See coroutine_example.cpp for sample code. + */ + +-template ++template + 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 + 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 aEntry ) : +- m_func( aEntry ), m_saved( NULL ), m_self( NULL ), m_stack( NULL ), +- m_stackSize( c_defaultStackSize ), m_running( false ) ++ COROUTINE( std::function 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; ++#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 aEntry ) ++ void SetEntry( std::function 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( this ) ); ++#if BOOST_VERSION <= 106000 ++ jump( m_caller, m_callee, reinterpret_cast( 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* cor = reinterpret_cast*>( 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( 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 +- struct strip_ref +- { +- typedef T result; +- }; ++ std::function m_func; + +- template +- struct strip_ref +- { +- typedef T result; +- }; ++ bool m_running; + +- DELEGATE 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::result* m_args; ++ typename std::remove_reference::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 ++ * 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 + #include + +-#include ++#include + + class EDA_ITEM; + class TOOL_MANAGER; +@@ -53,7 +54,9 @@ enum TOOL_TYPE + + /// Unique identifier for tools + typedef int TOOL_ID; +-typedef DELEGATE TOOL_STATE_FUNC; ++ ++using TOOL_STATE_FUNC = std::function; ++ + + /** + * 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 ++ * 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 + void TOOL_INTERACTIVE::Go( int (T::* aStateFunc)( const TOOL_EVENT& ), + const TOOL_EVENT_LIST& aConditions ) + { +- TOOL_STATE_FUNC sptr( static_cast( this ), aStateFunc ); ++ TOOL_STATE_FUNC sptr = std::bind( aStateFunc, static_cast( this ), std::placeholders::_1 ); + + goInternal( sptr, aConditions ); + } +-- +2.9.3 + +From 157c499b031659b895c1a7fef056d02a94bce0b3 Mon Sep 17 00:00:00 2001 +From: decimad +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 + #else + #include ++#include + #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 +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 + #include + +-#if BOOST_VERSION <= 106000 ++#if BOOST_VERSION < 106100 + #include + #else + #include +@@ -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 +- 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 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; +@@ -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( 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* cor = reinterpret_cast*>( aData ); ++ COROUTINE* cor = reinterpret_cast( 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(this) ); ++#elif BOOST_VERSION < 106100 ++ boost::context::jump_fcontext( &m_caller, m_callee, reinterpret_cast(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 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 m_stack; + #endif + + ///< pointer to coroutine entry arguments. Stripped of references + ///< to avoid compiler errors. + typename std::remove_reference::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 +- * +- * 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 DELEGATE +-{ +-public: +- typedef ReturnType (DELEGATE::* MemberPointer)( Arg ); +- typedef ReturnType _ReturnType; +- typedef Arg _ArgType; +- +- DELEGATE() +- { +- } +- +- template +- DELEGATE( T* aObject, ReturnType(T::* aPtr)( Arg ) ) +- { +- m_ptr = reinterpret_cast( aPtr ); +- m_object = reinterpret_cast( aObject ); +- }; +- +- +- ReturnType operator()( Arg aA ) const +- { +- DELEGATE* casted = reinterpret_cast*>( 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 DELEGATE0 +-{ +-public: +- typedef ReturnType ( DELEGATE0::* MemberPointer )(); +- typedef ReturnType _ReturnType; +- +- DELEGATE0() +- { +- } +- +- template +- DELEGATE0( T* aObject, ReturnType(T::* aPtr)() ) +- { +- m_ptr = reinterpret_cast( aPtr ); +- m_object = reinterpret_cast( aObject ); +- }; +- +- +- ReturnType operator()() const +- { +- DELEGATE0* casted = reinterpret_cast*>( 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 new file mode 100644 index 0000000..b7860af --- /dev/null +++ b/cmake.patch @@ -0,0 +1,11 @@ +--- 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() + diff --git a/kicad-2011.07.12-boost-polygon-declare-gtlsort-earlier.patch b/kicad-2011.07.12-boost-polygon-declare-gtlsort-earlier.patch deleted file mode 100644 index cc9595e..0000000 --- a/kicad-2011.07.12-boost-polygon-declare-gtlsort-earlier.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- include/boost/polygon/polygon.hpp.orig 2011-07-12 19:16:41.000000000 +0200 -+++ include/boost/polygon/polygon.hpp 2012-01-25 19:34:06.000000000 +0100 -@@ -24,6 +24,8 @@ - #include "transform.hpp" - #include "detail/transform_detail.hpp" - -+#include "detail/polygon_sort_adaptor.hpp" -+ - //interval - #include "interval_data.hpp" - #include "interval_traits.hpp" diff --git a/kicad-2011.07.12-fix-linking.patch b/kicad-2011.07.12-fix-linking.patch deleted file mode 100644 index 85ad839..0000000 --- a/kicad-2011.07.12-fix-linking.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- common/CMakeLists.txt.orig 2011-06-17 18:15:55.000000000 +0200 -+++ common/CMakeLists.txt 2011-07-12 19:26:20.000000000 +0200 -@@ -67,6 +67,7 @@ - wxwineda.cpp - xnode.cpp - zoom.cpp -+ ../pcbnew/class_drc_item.cpp - ) - - add_library(common ${COMMON_SRCS}) diff --git a/kicad-bug-921553.patch b/kicad-bug-921553.patch deleted file mode 100644 index 5b6acc2..0000000 --- a/kicad-bug-921553.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff -uNr kicad.orig/3d-viewer/CMakeLists.txt kicad/3d-viewer/CMakeLists.txt ---- kicad.orig/3d-viewer/CMakeLists.txt 2012-01-31 08:43:32.000000000 +0100 -+++ kicad/3d-viewer/CMakeLists.txt 2012-02-07 22:56:39.427930449 +0100 -@@ -19,4 +19,4 @@ - trackball.cpp - ) - --add_library(3d-viewer ${3D-VIEWER_SRCS}) -+add_library(3d-viewer STATIC ${3D-VIEWER_SRCS}) -diff -uNr kicad.orig/bitmaps_png/CMakeLists.txt kicad/bitmaps_png/CMakeLists.txt ---- kicad.orig/bitmaps_png/CMakeLists.txt 2012-01-31 08:43:32.000000000 +0100 -+++ kicad/bitmaps_png/CMakeLists.txt 2012-02-07 22:56:56.861533429 +0100 -@@ -676,5 +676,5 @@ - endforeach() - - #add_library( bitmaps SHARED ${CPP_LIST} ) --add_library( bitmaps ${CPP_LIST} ) -+add_library( bitmaps STATIC ${CPP_LIST} ) - -diff -uNr kicad.orig/bitmaps_xpm/CMakeLists.txt kicad/bitmaps_xpm/CMakeLists.txt ---- kicad.orig/bitmaps_xpm/CMakeLists.txt 2012-01-31 08:43:32.000000000 +0100 -+++ kicad/bitmaps_xpm/CMakeLists.txt 2012-02-07 22:57:15.545155677 +0100 -@@ -449,4 +449,4 @@ - set_source_files_properties(${CPP_BITMAP} PROPERTIES COMPILE_FLAGS -DXPMMAIN) - endforeach(LOOP_VAR) - --add_library(bitmaps ${CPP_BITMAPS}) -+add_library(bitmaps STATIC ${CPP_BITMAPS}) -diff -uNr kicad.orig/common/CMakeLists.txt kicad/common/CMakeLists.txt ---- kicad.orig/common/CMakeLists.txt 2012-01-31 08:43:32.000000000 +0100 -+++ kicad/common/CMakeLists.txt 2012-02-07 22:57:43.145582514 +0100 -@@ -77,7 +77,7 @@ - zoom.cpp - ) - --add_library(common ${COMMON_SRCS}) -+add_library(common STATIC ${COMMON_SRCS}) - - set(PCB_COMMON_SRCS - base_screen.cpp -@@ -125,7 +125,7 @@ - COMPILE_DEFINITIONS "PCBNEW" - ) - --add_library(pcbcommon ${PCB_COMMON_SRCS}) -+add_library(pcbcommon STATIC ${PCB_COMMON_SRCS}) - - - # auto-generate netlist_lexer.h and netlist_keywords.cpp -diff -uNr kicad.orig/polygon/CMakeLists.txt kicad/polygon/CMakeLists.txt ---- kicad.orig/polygon/CMakeLists.txt 2012-01-31 08:43:32.000000000 +0100 -+++ kicad/polygon/CMakeLists.txt 2012-02-07 22:57:06.361680317 +0100 -@@ -10,4 +10,4 @@ - polygon_test_point_inside.cpp - ) - --add_library(polygon ${POLYGON_SRCS}) -+add_library(polygon STATIC ${POLYGON_SRCS}) -diff -uNr kicad.orig/polygon/kbool/src/CMakeLists.txt kicad/polygon/kbool/src/CMakeLists.txt ---- kicad.orig/polygon/kbool/src/CMakeLists.txt 2012-01-31 08:43:32.000000000 +0100 -+++ kicad/polygon/kbool/src/CMakeLists.txt 2012-02-07 22:57:55.352437924 +0100 -@@ -18,4 +18,4 @@ - record.cpp - scanbeam.cpp) - --add_library(kbool ${KBOOL_SRCS}) -+add_library(kbool STATIC ${KBOOL_SRCS}) -diff -uNr kicad.orig/potrace/CMakeLists.txt kicad/potrace/CMakeLists.txt ---- kicad.orig/potrace/CMakeLists.txt 2012-01-31 08:43:32.000000000 +0100 -+++ kicad/potrace/CMakeLists.txt 2012-02-07 22:57:23.878617863 +0100 -@@ -13,4 +13,4 @@ - trace.cpp - ) - --add_library(potrace ${POTRACE_SRCS}) -+add_library(potrace STATIC ${POTRACE_SRCS}) diff --git a/kicad-build.patch b/kicad-build.patch deleted file mode 100644 index 683f364..0000000 --- a/kicad-build.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- kicad-2013.06.11/common/edaappl.cpp.org 2014-01-14 23:10:10.631550511 +0100 -+++ kicad-2013.06.11/common/edaappl.cpp 2014-01-14 23:10:42.245916063 +0100 -@@ -451,7 +451,7 @@ - - // Linux and Unix - #elif defined(__UNIX__) -- m_BinDir = wxStandardPaths().GetExecutablePath(); -+ m_BinDir = wxStandardPaths::Get().GetExecutablePath(); - #else - m_BinDir = argv[0]; - #endif // __UNIX__ diff --git a/kicad.spec b/kicad.spec index 84c0603..47e3720 100644 --- a/kicad.spec +++ b/kicad.spec @@ -1,44 +1,231 @@ # TODO: # - fix mimelnk installation # -%define ver 2013.06.11 -%define verlong 20130611 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: %{verlong} -Release: 3 +Version: 4.0.6 +Release: 0.1 License: GPL v2+ Group: X11/Applications -# Source files created from upstream's bazaar repository -# bzr export -r 4021 kicad-2013.06.11 -# bzr export -r 263 kicad-libraries-2013.06.11 -# bzr export -r 464 kicad-doc-2013.06.11 -Source0: %{name}-%{ver}.tar.bz2 -# Source0-md5: 82ed9a23b9ef332621210eafd08101c2 -Source1: %{name}-doc-%{ver}.tar.bz2 -# Source1-md5: 2ef38e351202f80f700a4ae96f898336 -Source2: %{name}-libraries-%{ver}.tar.bz2 -# Source2-md5: 5b35e2f2e022fa4be6a03021a6c04493 -Source4: %{name}-2010.05.09.x-kicad-pcbnew.desktop -Source5: pcbnew.desktop -Source6: %{name}-icons.tar.bz2 -# Source6-md5: 51459cb884444df60e55c95d50564be7 -Source7: Epcos-MKT-1.0.tar.bz2 -# Source7-md5: 4dba5eca85fcec9bba491c1815963f80 - -# Additional librairies from Walter Lain -# http://smisioto.no-ip.org/elettronica/kicad/kicad-en.htm -# kicad-walter-libraries is manually built by downloading all available files -Source8: %{name}-walter-libraries-%{ver}.tar.bz2 -# Source8-md5: 9eba6363258b9efb552222b24b4630f2 -Patch0: %{name}-build.patch +Source0: https://launchpad.net/kicad/4.0/%{version}/+download/%{name}-%{version}.tar.xz +# Source0-md5: 24eca1f22bbb0a88acbba321a4b1c4aa +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=4} /uri \$\{KIGITHUB}\/([^)]*)/ and printf "%-16shttps://github.com/KiCad/$1/archive/%{version}/$1-%{version}.tar.gz#/$1-%{version}.tar.gz\n", "Source".$s++.":"' \ +# kicad-*/kicad-library-*/template/fp-lib-table.for-github +Source4: https://github.com/KiCad/Air_Coils_SML_NEOSID.pretty/archive/%{version}/Air_Coils_SML_NEOSID.pretty-%{version}.tar.gz +# Source4-md5: e343fb1de9debbfca640879433964bf5 +Source5: https://github.com/KiCad/Buttons_Switches_SMD.pretty/archive/%{version}/Buttons_Switches_SMD.pretty-%{version}.tar.gz +# Source5-md5: 4d3bd10d0d7c29dd03e91f3ee999a4cf +Source6: https://github.com/KiCad/Buttons_Switches_THT.pretty/archive/%{version}/Buttons_Switches_THT.pretty-%{version}.tar.gz +# Source6-md5: 8e83e77abd4a2699cabcf10ca2452a37 +Source7: https://github.com/KiCad/Buzzers_Beepers.pretty/archive/%{version}/Buzzers_Beepers.pretty-%{version}.tar.gz +# Source7-md5: 0be5ca79b86e23022b9ce5947fce4657 +Source8: https://github.com/KiCad/Capacitors_SMD.pretty/archive/%{version}/Capacitors_SMD.pretty-%{version}.tar.gz +# Source8-md5: a132bacf9268f67caa9c504398b485f6 +Source9: https://github.com/KiCad/Capacitors_Tantalum_SMD.pretty/archive/%{version}/Capacitors_Tantalum_SMD.pretty-%{version}.tar.gz +# Source9-md5: 591a022e35a0d4eb3338e36cbfc2b111 +Source10: https://github.com/KiCad/Capacitors_THT.pretty/archive/%{version}/Capacitors_THT.pretty-%{version}.tar.gz +# Source10-md5: d2b3ec61381efeda3787c306a5f20c4d +Source11: https://github.com/KiCad/Choke_Axial_ThroughHole.pretty/archive/%{version}/Choke_Axial_ThroughHole.pretty-%{version}.tar.gz +# Source11-md5: 9e5ac090fc1d5a8145c93c6846d1242d +Source12: https://github.com/KiCad/Choke_Common-Mode_Wurth.pretty/archive/%{version}/Choke_Common-Mode_Wurth.pretty-%{version}.tar.gz +# Source12-md5: 1b1b159c5f598cc0487b39fbfdc854ad +Source13: https://github.com/KiCad/Choke_Radial_ThroughHole.pretty/archive/%{version}/Choke_Radial_ThroughHole.pretty-%{version}.tar.gz +# Source13-md5: d90b7adb66b4f8535667875cb10f4fba +Source14: https://github.com/KiCad/Choke_SMD.pretty/archive/%{version}/Choke_SMD.pretty-%{version}.tar.gz +# Source14-md5: ffbbec04a597c3f8313df6d52020d7a7 +Source15: https://github.com/KiCad/Choke_Toroid_ThroughHole.pretty/archive/%{version}/Choke_Toroid_ThroughHole.pretty-%{version}.tar.gz +# Source15-md5: 4bdf6343c75887d67dc80e69b8e080ba +Source16: https://github.com/KiCad/Connectors_Harwin.pretty/archive/%{version}/Connectors_Harwin.pretty-%{version}.tar.gz +# Source16-md5: c103d987a87bde089155421af2216c93 +Source17: https://github.com/KiCad/Connectors_Hirose.pretty/archive/%{version}/Connectors_Hirose.pretty-%{version}.tar.gz +# Source17-md5: 8d10a6d792b1a1b55459494d0374326f +Source18: https://github.com/KiCad/Connectors_JAE.pretty/archive/%{version}/Connectors_JAE.pretty-%{version}.tar.gz +# Source18-md5: 08db63855dc67995ed483a58af85f9f7 +Source19: https://github.com/KiCad/Connectors_JST.pretty/archive/%{version}/Connectors_JST.pretty-%{version}.tar.gz +# Source19-md5: 5ce5e2bac3bf25bbeb98a4dd33632609 +Source20: https://github.com/KiCad/Connectors_Mini-Universal.pretty/archive/%{version}/Connectors_Mini-Universal.pretty-%{version}.tar.gz +# Source20-md5: 9977b9592e4789c9b1b20ab26fe301a6 +Source21: https://github.com/KiCad/Connectors_Molex.pretty/archive/%{version}/Connectors_Molex.pretty-%{version}.tar.gz +# Source21-md5: ef7d14f881e09be9a882b0e71f4474c7 +Source22: https://github.com/KiCad/Connectors_Multicomp.pretty/archive/%{version}/Connectors_Multicomp.pretty-%{version}.tar.gz +# Source22-md5: 951ba83ee8f34e51465c75d38c246ce8 +Source23: https://github.com/KiCad/Connectors_Phoenix.pretty/archive/%{version}/Connectors_Phoenix.pretty-%{version}.tar.gz +# Source23-md5: 7d9a232d0cd195f9d2b9ed82010c2ffe +Source24: https://github.com/KiCad/Connectors_Samtec.pretty/archive/%{version}/Connectors_Samtec.pretty-%{version}.tar.gz +# Source24-md5: b2610848de6e1c91b2c8d30d9cd518d5 +Source25: https://github.com/KiCad/Connectors_TE-Connectivity.pretty/archive/%{version}/Connectors_TE-Connectivity.pretty-%{version}.tar.gz +# Source25-md5: 43e70e5d21e1119f8981eed40d082a8f +Source26: https://github.com/KiCad/Connectors_Terminal_Blocks.pretty/archive/%{version}/Connectors_Terminal_Blocks.pretty-%{version}.tar.gz +# Source26-md5: cbb75de29fe23cab12519de5c314d738 +Source27: https://github.com/KiCad/Connectors_WAGO.pretty/archive/%{version}/Connectors_WAGO.pretty-%{version}.tar.gz +# Source27-md5: 219367a04e3917ba84a61341b9a5d939 +Source28: https://github.com/KiCad/Connectors.pretty/archive/%{version}/Connectors.pretty-%{version}.tar.gz +# Source28-md5: 53358aaf6319b4963df7ed988985a13a +Source29: https://github.com/KiCad/Converters_DCDC_ACDC.pretty/archive/%{version}/Converters_DCDC_ACDC.pretty-%{version}.tar.gz +# Source29-md5: 8876b6ace69520adc78dd752ea872fcb +Source30: https://github.com/KiCad/Crystals.pretty/archive/%{version}/Crystals.pretty-%{version}.tar.gz +# Source30-md5: 3d156ccfcc43216f96ecfa7c3f8345b8 +Source31: https://github.com/KiCad/Diodes_SMD.pretty/archive/%{version}/Diodes_SMD.pretty-%{version}.tar.gz +# Source31-md5: bea39235640355298ea6f14332627a18 +Source32: https://github.com/KiCad/Diodes_THT.pretty/archive/%{version}/Diodes_THT.pretty-%{version}.tar.gz +# Source32-md5: ec77db0c94cfae709d145bcad133ed4f +Source33: https://github.com/KiCad/Discret.pretty/archive/%{version}/Discret.pretty-%{version}.tar.gz +# Source33-md5: 49598b208de48dd7ec87586950348112 +Source34: https://github.com/KiCad/Displays_7-Segment.pretty/archive/%{version}/Displays_7-Segment.pretty-%{version}.tar.gz +# Source34-md5: 7f05ebc80504e122961ea020b42e8c3c +Source35: https://github.com/KiCad/Displays.pretty/archive/%{version}/Displays.pretty-%{version}.tar.gz +# Source35-md5: fae3bd280525583ab8669c3b2f48e4a7 +Source36: https://github.com/KiCad/Divers.pretty/archive/%{version}/Divers.pretty-%{version}.tar.gz +# Source36-md5: 87a7ea52f622289d4486e5c4f9f4f308 +Source37: https://github.com/KiCad/Enclosures.pretty/archive/%{version}/Enclosures.pretty-%{version}.tar.gz +# Source37-md5: af7c0066f10c3c449c36b23559ffddf0 +Source38: https://github.com/KiCad/EuroBoard_Outline.pretty/archive/%{version}/EuroBoard_Outline.pretty-%{version}.tar.gz +# Source38-md5: 305424a4e6b51de49856e3cb12b5eedb +Source39: https://github.com/KiCad/Fiducials.pretty/archive/%{version}/Fiducials.pretty-%{version}.tar.gz +# Source39-md5: 45c7652cfbd5e2aba589e7e594f2f401 +Source40: https://github.com/KiCad/Filters_HF_Coils_NEOSID.pretty/archive/%{version}/Filters_HF_Coils_NEOSID.pretty-%{version}.tar.gz +# Source40-md5: 52bb487182bd6a1a2245f8076259c328 +Source41: https://github.com/KiCad/Fuse_Holders_and_Fuses.pretty/archive/%{version}/Fuse_Holders_and_Fuses.pretty-%{version}.tar.gz +# Source41-md5: cadfa005debdfc7d0c469ef48b8d26d0 +Source42: https://github.com/KiCad/Hall-Effect_Transducers_LEM.pretty/archive/%{version}/Hall-Effect_Transducers_LEM.pretty-%{version}.tar.gz +# Source42-md5: ebb9c1b12d906f0e69376fe3fa4e5ee7 +Source43: https://github.com/KiCad/Heatsinks.pretty/archive/%{version}/Heatsinks.pretty-%{version}.tar.gz +# Source43-md5: 4a7696b52a217c1af3d76310cefc9276 +Source44: https://github.com/KiCad/Housings_BGA.pretty/archive/%{version}/Housings_BGA.pretty-%{version}.tar.gz +# Source44-md5: 1a52287e9101f75ea0a013c8896ea5ad +Source45: https://github.com/KiCad/Housings_DFN_QFN.pretty/archive/%{version}/Housings_DFN_QFN.pretty-%{version}.tar.gz +# Source45-md5: bfca29af9ec269b811e95f5a12d49327 +Source46: https://github.com/KiCad/Housings_DIP.pretty/archive/%{version}/Housings_DIP.pretty-%{version}.tar.gz +# Source46-md5: 806e69140a65217b6124c0c0649d6474 +Source47: https://github.com/KiCad/Housings_LCC.pretty/archive/%{version}/Housings_LCC.pretty-%{version}.tar.gz +# Source47-md5: 79a0b216aa186eab822b45fb2ab48b81 +Source48: https://github.com/KiCad/Housings_LGA.pretty/archive/%{version}/Housings_LGA.pretty-%{version}.tar.gz +# Source48-md5: 0e3ef9347f68ab03fd9e4960ef652f6c +Source49: https://github.com/KiCad/Housings_PGA.pretty/archive/%{version}/Housings_PGA.pretty-%{version}.tar.gz +# Source49-md5: e008414845d6d1928a4607b2511a7fed +Source50: https://github.com/KiCad/Housings_QFP.pretty/archive/%{version}/Housings_QFP.pretty-%{version}.tar.gz +# Source50-md5: 36ff18521539dcc036a421af4a3eeea1 +Source51: https://github.com/KiCad/Housings_SIP.pretty/archive/%{version}/Housings_SIP.pretty-%{version}.tar.gz +# Source51-md5: 5d5d071ba919c686fee70c1fe33360d7 +Source52: https://github.com/KiCad/Housings_SOIC.pretty/archive/%{version}/Housings_SOIC.pretty-%{version}.tar.gz +# Source52-md5: 6cf7b9bf4f6fba01c3bef5d4b81b7b01 +Source53: https://github.com/KiCad/Housings_SSOP.pretty/archive/%{version}/Housings_SSOP.pretty-%{version}.tar.gz +# Source53-md5: 462ad43dc28523cbd148f661aac26190 +Source54: https://github.com/KiCad/Inductors_NEOSID.pretty/archive/%{version}/Inductors_NEOSID.pretty-%{version}.tar.gz +# Source54-md5: 6fc983a43dccd17739d3cefa637a6005 +Source55: https://github.com/KiCad/Inductors.pretty/archive/%{version}/Inductors.pretty-%{version}.tar.gz +# Source55-md5: 99cfe2b7fcbfa170259c5ad94694ffee +Source56: https://github.com/KiCad/Inductors_SMD.pretty/archive/%{version}/Inductors_SMD.pretty-%{version}.tar.gz +# Source56-md5: 6e2e634595a9f0bcb8a1ba9c884fee5f +Source57: https://github.com/KiCad/Inductors_THT.pretty/archive/%{version}/Inductors_THT.pretty-%{version}.tar.gz +# Source57-md5: ed47a1aed878619170cb2d104bf34992 +Source58: https://github.com/KiCad/IR-DirectFETs.pretty/archive/%{version}/IR-DirectFETs.pretty-%{version}.tar.gz +# Source58-md5: baad0378907a45ce847e7c53d9d0fc36 +Source59: https://github.com/KiCad/Labels.pretty/archive/%{version}/Labels.pretty-%{version}.tar.gz +# Source59-md5: e094fa074bd2252fa99e92021c1e3c3d +Source60: https://github.com/KiCad/LEDs.pretty/archive/%{version}/LEDs.pretty-%{version}.tar.gz +# Source60-md5: f40658749082dbb8f2b123dc3d8b9e6b +Source61: https://github.com/KiCad/Measurement_Points.pretty/archive/%{version}/Measurement_Points.pretty-%{version}.tar.gz +# Source61-md5: be7400d113165b932c38a83d0e1a81c6 +Source62: https://github.com/KiCad/Measurement_Scales.pretty/archive/%{version}/Measurement_Scales.pretty-%{version}.tar.gz +# Source62-md5: f1d2226dcb04a6bbd83aba8b701d9df0 +Source63: https://github.com/KiCad/Mechanical_Sockets.pretty/archive/%{version}/Mechanical_Sockets.pretty-%{version}.tar.gz +# Source63-md5: 904a2beaf0b3cd03465aa50b22577f3f +Source64: https://github.com/KiCad/Microwave.pretty/archive/%{version}/Microwave.pretty-%{version}.tar.gz +# Source64-md5: c370a2b3cf5b284f98e6b264f0818726 +Source65: https://github.com/KiCad/Modules.pretty/archive/%{version}/Modules.pretty-%{version}.tar.gz +# Source65-md5: 4a501a24a6355fe814a884b94d162b22 +Source66: https://github.com/KiCad/Mounting_Holes.pretty/archive/%{version}/Mounting_Holes.pretty-%{version}.tar.gz +# Source66-md5: 7cc6b71a4e1f4c15db62fa8ba1c97d37 +Source67: https://github.com/KiCad/NF-Transformers_ETAL.pretty/archive/%{version}/NF-Transformers_ETAL.pretty-%{version}.tar.gz +# Source67-md5: 819b22b813b3fb7d09125cb4c3f05639 +Source68: https://github.com/KiCad/Oddities.pretty/archive/%{version}/Oddities.pretty-%{version}.tar.gz +# Source68-md5: a93fa061e420ea397efa790f01e2a462 +Source69: https://github.com/KiCad/Opto-Devices.pretty/archive/%{version}/Opto-Devices.pretty-%{version}.tar.gz +# Source69-md5: e5de89a96ca7bbabc3f1c82df09d2f90 +Source70: https://github.com/KiCad/Oscillators.pretty/archive/%{version}/Oscillators.pretty-%{version}.tar.gz +# Source70-md5: 8e38ea216c960a56fad2a32ab491bff7 +Source71: https://github.com/KiCad/PFF_PSF_PSS_Leadforms.pretty/archive/%{version}/PFF_PSF_PSS_Leadforms.pretty-%{version}.tar.gz +# Source71-md5: 597792f8c3b5a9e12902d597ea1fc132 +Source72: https://github.com/KiCad/Pin_Headers.pretty/archive/%{version}/Pin_Headers.pretty-%{version}.tar.gz +# Source72-md5: 5130d2e64fb526b5e037b9c04499a098 +Source73: https://github.com/KiCad/Potentiometers.pretty/archive/%{version}/Potentiometers.pretty-%{version}.tar.gz +# Source73-md5: 3db69082756229d2ec4c3a50848ffd28 +Source74: https://github.com/KiCad/Power_Integrations.pretty/archive/%{version}/Power_Integrations.pretty-%{version}.tar.gz +# Source74-md5: ddbcc3767e163fe5789454de8735ba80 +Source75: https://github.com/KiCad/Relays_THT.pretty/archive/%{version}/Relays_THT.pretty-%{version}.tar.gz +# Source75-md5: 51494d7db9eabccea483c7f4c5d17f50 +Source76: https://github.com/KiCad/Resistors_SMD.pretty/archive/%{version}/Resistors_SMD.pretty-%{version}.tar.gz +# Source76-md5: 32f760a5bd68397bf7d8bfb2622b7038 +Source77: https://github.com/KiCad/Resistors_THT.pretty/archive/%{version}/Resistors_THT.pretty-%{version}.tar.gz +# Source77-md5: 7f3e3a656b94b4ec3ad59f841f8e1149 +Source78: https://github.com/KiCad/Resistors_Universal.pretty/archive/%{version}/Resistors_Universal.pretty-%{version}.tar.gz +# Source78-md5: c35311f20f8c816244000b4d85fb6e8f +Source79: https://github.com/KiCad/RF_Modules.pretty/archive/%{version}/RF_Modules.pretty-%{version}.tar.gz +# Source79-md5: 22df000a3a8fb16f9306015f2decea6a +Source80: https://github.com/KiCad/Shielding_Cabinets.pretty/archive/%{version}/Shielding_Cabinets.pretty-%{version}.tar.gz +# Source80-md5: 7afa82ede121a46158d30a848002947d +Source81: https://github.com/KiCad/SMD_Packages.pretty/archive/%{version}/SMD_Packages.pretty-%{version}.tar.gz +# Source81-md5: ee99961ab96b360a446a5790c184a129 +Source82: https://github.com/KiCad/Sockets_MOLEX_KK-System.pretty/archive/%{version}/Sockets_MOLEX_KK-System.pretty-%{version}.tar.gz +# Source82-md5: 9c5f6f092156c138856e819cd245cb43 +Source83: https://github.com/KiCad/Socket_Strips.pretty/archive/%{version}/Socket_Strips.pretty-%{version}.tar.gz +# Source83-md5: 7ab96152fe961849944936e69671f99b +Source84: https://github.com/KiCad/Sockets.pretty/archive/%{version}/Sockets.pretty-%{version}.tar.gz +# Source84-md5: bd381d3f2222675e4f259f15f918c512 +Source85: https://github.com/KiCad/Symbols.pretty/archive/%{version}/Symbols.pretty-%{version}.tar.gz +# Source85-md5: 16185826b1eb27200c30ef972f7468cd +Source86: https://github.com/KiCad/TO_SOT_Packages_SMD.pretty/archive/%{version}/TO_SOT_Packages_SMD.pretty-%{version}.tar.gz +# Source86-md5: 38addd895c3711539e291d5f86f27807 +Source87: https://github.com/KiCad/TO_SOT_Packages_THT.pretty/archive/%{version}/TO_SOT_Packages_THT.pretty-%{version}.tar.gz +# Source87-md5: 3a0c96fcec348fd7daf856e0351d0435 +Source88: https://github.com/KiCad/Transformers_CHK.pretty/archive/%{version}/Transformers_CHK.pretty-%{version}.tar.gz +# Source88-md5: c9f4c477a7b3ee99258f0eb8d07eb2ad +Source89: https://github.com/KiCad/Transformers_SMD.pretty/archive/%{version}/Transformers_SMD.pretty-%{version}.tar.gz +# Source89-md5: 9f3a326a296b10ea529d349d670b593e +Source90: https://github.com/KiCad/Transformers_SMPS_ThroughHole.pretty/archive/%{version}/Transformers_SMPS_ThroughHole.pretty-%{version}.tar.gz +# Source90-md5: bd6a05c82e5fa34771dc9b039c38279a +Source91: https://github.com/KiCad/Transformers_THT.pretty/archive/%{version}/Transformers_THT.pretty-%{version}.tar.gz +# Source91-md5: 8f1fafb159a5890abb9cc1fe3f24543a +Source92: https://github.com/KiCad/Transistors_OldSowjetAera.pretty/archive/%{version}/Transistors_OldSowjetAera.pretty-%{version}.tar.gz +# Source92-md5: bad332b6c0097a4179611a7f86eddee2 +Source93: https://github.com/KiCad/Valves.pretty/archive/%{version}/Valves.pretty-%{version}.tar.gz +# Source93-md5: 0cef210c06a05af4f011fe73bd9d8f83 +Source94: https://github.com/KiCad/Varistors.pretty/archive/%{version}/Varistors.pretty-%{version}.tar.gz +# Source94-md5: a18138206bf52efbdc37d448648b7e04 +Source95: https://github.com/KiCad/Wire_Connections_Bridges.pretty/archive/%{version}/Wire_Connections_Bridges.pretty-%{version}.tar.gz +# Source95-md5: 1724a3899fb5b483bf224da6a6db2650 +Source96: https://github.com/KiCad/Wire_Pads.pretty/archive/%{version}/Wire_Pads.pretty-%{version}.tar.gz +# Source96-md5: 06e3b9d0bb1be074b5693000736797db +Patch0: nostrip.patch +# https://code.launchpad.net/~lkundrak/kicad/appstream-data/+merge/293391 +Patch1: appstream.patch +Patch2: boost-1.61.patch +Patch3: cmake.patch URL: http://www.kicad-pcb.org/ +BuildRequires: appstream-glib +BuildRequires: asciidoc BuildRequires: boost-devel BuildRequires: cmake >= 2.6.4 +BuildRequires: curl-devel +BuildRequires: dblatex +BuildRequires: desktop-file-utils +BuildRequires: doxygen +BuildRequires: glew-devel +BuildRequires: openssl-devel +BuildRequires: perl-Unicode-LineBreak +BuildRequires: po4a >= 0.51 BuildRequires: rpmbuild(macros) >= 1.600 BuildRequires: sed >= 4.0 BuildRequires: which +BuildRequires: wxGTK2-unicode-devel >= 3.0.0 BuildRequires: wxGTK2-unicode-gl-devel >= 3.0.0 BuildRequires: wxWidgets-devel >= 3.0.0 BuildRequires: zlib-devel @@ -75,6 +262,18 @@ BuildArch: noarch %description doc Documentation and tutorials for kicad in English +%package doc-ca +Summary: Documentation for Kicad in German +Summary(fr.UTF-8): Documentations pour kicad en allemand +Group: Documentation +Requires: %{name}-doc = %{version}-%{release} +%if "%{_rpmversion}" >= "5" +BuildArch: noarch +%endif + +%description doc-ca +Documentation and tutorials for Kicad in German + %package doc-de Summary: Documentation for Kicad in German Summary(fr.UTF-8): Documentations pour kicad en allemand @@ -111,7 +310,7 @@ BuildArch: noarch %description doc-fr Documentation and tutorials for Kicad in French -%package doc-hu +%package doc-id Summary: Documentation for Kicad in Hungarian Summary(fr.UTF-8): Documentations pour kicad en hongrois Group: Documentation @@ -120,7 +319,7 @@ Requires: %{name}-doc = %{version}-%{release} BuildArch: noarch %endif -%description doc-hu +%description doc-id Documentation and tutorials for Kicad in Hungarian %package doc-it @@ -147,29 +346,29 @@ BuildArch: noarch %description doc-ja Documentation and tutorials for Kicad in Japanese -%package doc-pl -Summary: Documentation for Kicad in Polish -Summary(fr.UTF-8): Documentations pour kicad en polonais +%package doc-nl +Summary: Documentation for Kicad in Portuguese +Summary(fr.UTF-8): Documentations pour kicad en portugais Group: Documentation Requires: %{name}-doc = %{version}-%{release} %if "%{_rpmversion}" >= "5" BuildArch: noarch %endif -%description doc-pl -Documentation and tutorials for Kicad in Polish +%description doc-nl +Documentation and tutorials for Kicad in Portuguese -%package doc-pt -Summary: Documentation for Kicad in Portuguese -Summary(fr.UTF-8): Documentations pour kicad en portugais +%package doc-pl +Summary: Documentation for Kicad in Polish +Summary(fr.UTF-8): Documentations pour kicad en polonais Group: Documentation Requires: %{name}-doc = %{version}-%{release} %if "%{_rpmversion}" >= "5" BuildArch: noarch %endif -%description doc-pt -Documentation and tutorials for Kicad in Portuguese +%description doc-pl +Documentation and tutorials for Kicad in Polish %package doc-ru Summary: Documentation for Kicad in Russian @@ -183,157 +382,74 @@ BuildArch: noarch %description doc-ru Documentation and tutorials for Kicad in Russian -%package doc-zh_CN -Summary: Documentation for Kicad in Chinese -Summary(fr.UTF-8): Documentations pour kicad en chinois -Group: Documentation -Requires: %{name}-doc = %{version}-%{release} -%if "%{_rpmversion}" >= "5" -BuildArch: noarch -%endif - -%description doc-zh_CN -Documentation and tutorials for Kicad in Chinese - %prep -%setup -q -n %{name}-%{ver} -a 1 -a 2 -a 6 -a 7 -a 8 +%setup -q -a 1 -a 2 -a 3 %patch0 -p1 - -#kicad-doc.noarch: W: file-not-utf8 %{_docdir}/kicad/AUTHORS.txt -iconv -f iso8859-1 -t utf-8 AUTHORS.txt > AUTHORS.conv && mv -f AUTHORS.conv AUTHORS.txt - -%if "%{_lib}" != "lib" - %{__sed} -i -e "s@lib/@%{_lib}/@g" CMakeLists.txt -%endif +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build -# Add Epcos library -cd Epcos-MKT-1.0 -cp -pR library ../%{name}-libraries-%{version}/ -cp -pR modules ../%{name}-libraries-%{version}/ +# Symbols libraries +cd %{name}-library-%{version} +%cmake . +%{__make} -j1 VERBOSE=1 cd .. -# Add Walter libraries -cd %{name}-walter-libraries-%{ver} -cp -pR library ../%{name}-libraries-%{ver}/ -cp -pR modules ../%{name}-libraries-%{ver}/ +# Documentation +cd %{name}-doc-%{version} +%cmake . -DBUILD_FORMATS=html +%{__make} -j1 VERBOSE=1 cd .. -# -# Symbols libraries -# -cd %{name}-libraries-%{ver} -install -d build -cd build -%cmake \ - -DKICAD_STABLE_VERSION=ON \ - .. - -%{__make} \ - VERBOSE=1 +# Translations +mkdir %{name}-i18n-%{version}/build +cd %{name}-i18n-%{version}/build +%cmake .. \ + -DKICAD_I18N_UNIX_STRICT_PATH=ON +%{__make} -j1 VERBOSE=1 cd ../.. -# # Core components -# -install -d build -cd build -%cmake \ - -DKICAD_STABLE_VERSION=ON \ - -DwxWidgets_USE_STATIC=OFF \ - -DwxWidgets_CONFIG_EXECUTABLE="%{_bindir}/wx-gtk2-unicode-config" \ - -DKICAD_MINIZIP=ON \ - -DKICAD_GOST=ON \ - .. - -%{__make} +%cmake . \ + -DKICAD_SKIP_BOOST=ON \ + -DKICAD_BUILD_VERSION="%{version}-%{release}" \ + -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-gtk2-unicode-config + +%{__make} VERBOSE=1 %install rm -rf $RPM_BUILD_ROOT -%{__make} -C build install \ - KICAD_INTERNAT=$RPM_BUILD_ROOT%{_localedir} \ - KICAD_PLUGINS=$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins \ - KICAD_DATA=$RPM_BUILD_ROOT%{_datadir}/%{name} \ - KICAD_DOCS=$RPM_BUILD_ROOT%{_datadir}/%{name}/help \ - DESTDIR=$RPM_BUILD_ROOT \ - PREFIX=$RPM_BUILD_ROOT%{_prefix} - -%{__make} -C %{name}-libraries-%{ver}/build install \ - KICAD_INTERNAT=$RPM_BUILD_ROOT%{_localedir} \ - KICAD_PLUGINS=$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins \ - KICAD_DATA=$RPM_BUILD_ROOT%{_datadir}/%{name} \ - KICAD_DOCS=$RPM_BUILD_ROOT%{_datadir}/%{name}/help \ - DESTDIR=$RPM_BUILD_ROOT \ - PREFIX=$RPM_BUILD_ROOT%{_prefix} - -# install localization -cd %{name}-doc-%{ver}/internat -for dir in bg ca cs de es fr hu it ko nl pl pt ru sl sv zh_CN; do - install -m 644 -D ${dir}/%{name}.mo $RPM_BUILD_ROOT%{_localedir}/${dir}/LC_MESSAGES/%{name}.mo -done -cd ../.. +# KiCAD itself +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT + +# Symbols libraries +%{__make} -C %{name}-library-%{version} 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 -# install new mime type -install -pm 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/mimelnk/application/x-%{name}-pcbnew.desktop - -mv $RPM_BUILD_ROOT%{_datadir}/mimelnk/application/*.desktop \ - $RPM_BUILD_ROOT%{_desktopdir} - -# install mimetype and application icons -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/32x32/mimetypes/application-x-kicad-eeschema.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/mimetypes/application-x-kicad-eeschema.png -install -D -p %{name}-icons/resources/linux/mime/icons/hicolor/32x32/apps/eeschema.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/eeschema.png -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/24x24/mimetypes/application-x-kicad-eeschema.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/mimetypes/application-x-kicad-eeschema.png -install -D -p %{name}-icons/resources/linux/mime/icons/hicolor/24x24/apps/eeschema.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps/eeschema.png -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/22x22/mimetypes/application-x-kicad-eeschema.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/22x22/mimetypes/application-x-kicad-eeschema.png -install -D -p %{name}-icons/resources/linux/mime/icons/hicolor/22x22/apps/eeschema.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/22x22/apps/eeschema.png -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/16x16/mimetypes/application-x-kicad-eeschema.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/mimetypes/application-x-kicad-eeschema.png -install -D -p %{name}-icons/resources/linux/mime/icons/hicolor/16x16/apps/eeschema.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/eeschema.png -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/32x32/mimetypes/application-x-kicad-pcbnew.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/mimetypes/application-x-kicad-pcbnew.png -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/32x32/apps/pcbnew.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/pcbnew.png -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/24x24/mimetypes/application-x-kicad-pcbnew.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/mimetypes/application-x-kicad-pcbnew.png -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/24x24/apps/pcbnew.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps/pcbnew.png -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/22x22/mimetypes/application-x-kicad-pcbnew.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/22x22/mimetypes/application-x-kicad-pcbnew.png -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/22x22/apps/pcbnew.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/22x22/apps/pcbnew.png -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/16x16/mimetypes/application-x-kicad-pcbnew.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/mimetypes/application-x-kicad-pcbnew.png -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/16x16/apps/pcbnew.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/pcbnew.png - -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/32x32/apps/kicad.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/kicad.png -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/24x24/apps/kicad.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps/kicad.png -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/22x22/apps/kicad.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/22x22/apps/kicad.png -install -pm 644 %{name}-icons/resources/linux/mime/icons/hicolor/16x16/apps/kicad.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/kicad.png - -# Preparing for documentation pull-ups -%{__rm} -f %{name}-doc-%{ver}/doc/help/CMakeLists.txt -%{__rm} -f %{name}-doc-%{ver}/doc/help/makefile -%{__rm} -f %{name}-doc-%{ver}/doc/tutorials/CMakeLists.txt - -%{__cp} -pr %{name}-doc-%{ver}/doc/* $RPM_BUILD_ROOT%{_docdir}/%{name} -%{__cp} -pr AUTHORS.txt CHANGELOG* $RPM_BUILD_ROOT%{_docdir}/%{name} +# Footprints +install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/modules +for S in %{sources}; do + P=$(basename $S |sed -n 's/\.pretty-.*/.pretty/p') + [ "$P" ] || continue + install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/modules/$P + tar xzf $S --strip-components=1 -C $RPM_BUILD_ROOT%{_datadir}/%{name}/modules/$P +done +ln -f $RPM_BUILD_ROOT%{_datadir}/%{name}/template/fp-lib-table{.for-pretty,} + +# Documentation +%{__make} -C %{name}-doc-%{version} install \ + DESTDIR=$RPM_BUILD_ROOT + +# Translations +%{__make} -C %{name}-i18n-%{version}/build install \ + DESTDIR=$RPM_BUILD_ROOT %find_lang %{name} @@ -354,25 +470,46 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc AUTHORS.txt CHANGELOG.txt Documentation %attr(755,root,root) %{_bindir}/bitmap2component -%attr(755,root,root) %{_bindir}/cvpcb +%attr(755,root,root) %{_bindir}/_cvpcb.kiface +%attr(755,root,root) %{_bindir}/dxf2idf %attr(755,root,root) %{_bindir}/eeschema -%attr(755,root,root) %{_bindir}/freeroute.jnlp +%attr(755,root,root) %{_bindir}/_eeschema.kiface %attr(755,root,root) %{_bindir}/gerbview +%attr(755,root,root) %{_bindir}/_gerbview.kiface +%attr(755,root,root) %{_bindir}/idf2vrml +%attr(755,root,root) %{_bindir}/idfcyl +%attr(755,root,root) %{_bindir}/idfrect %attr(755,root,root) %{_bindir}/kicad %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 %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} -%{_desktopdir}/eeschema.desktop -%{_desktopdir}/%{name}.desktop %{_iconsdir}/hicolor/*x*/*/*.png %{_iconsdir}/hicolor/scalable/*/*.svg %{_datadir}/mime/packages/kicad.xml -%{_desktopdir}/x-kicad-pcbnew.desktop -%{_desktopdir}/x-kicad-project.desktop -%{_desktopdir}/x-kicad-schematic.desktop +%{_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 +#%{_datadir}/mimelnk/application/x-kicad-pcb.desktop +#%{_datadir}/mimelnk/application/x-kicad-project.desktop +#%{_datadir}/mimelnk/application/x-kicad-schematic.desktop %dir %{_docdir}/%{name} %{_docdir}/%{name}/*.txt @@ -380,57 +517,46 @@ rm -rf $RPM_BUILD_ROOT %files doc %defattr(644,root,root,755) %dir %{_docdir}/%{name} -%{_docdir}/%{name}/contrib %dir %{_docdir}/%{name}/help %{_docdir}/%{name}/help/en -%{_docdir}/%{name}/help/file_formats -%dir %{_docdir}/%{name}/tutorials -%{_docdir}/%{name}/tutorials/en %{_docdir}/%{name}/scripts +%files doc-ca +%defattr(644,root,root,755) +%lang(ca) %{_docdir}/%{name}/help/ca + %files doc-de %defattr(644,root,root,755) %lang(de) %{_docdir}/%{name}/help/de -%lang(de) %{_docdir}/%{name}/tutorials/de %files doc-es %defattr(644,root,root,755) %lang(es) %{_docdir}/%{name}/help/es -%lang(es) %{_docdir}/%{name}/tutorials/es %files doc-fr %defattr(644,root,root,755) %lang(fr) %{_docdir}/%{name}/help/fr -%lang(fr) %{_docdir}/%{name}/tutorials/fr -%files doc-hu +%files doc-id %defattr(644,root,root,755) -%lang(hu) %{_docdir}/%{name}/tutorials/hu +%lang(id) %{_docdir}/%{name}/help/id %files doc-it %defattr(644,root,root,755) %lang(it) %{_docdir}/%{name}/help/it -%lang(it) %{_docdir}/%{name}/tutorials/it %files doc-ja %defattr(644,root,root,755) %lang(ja) %{_docdir}/%{name}/help/ja -%lang(ja) %{_docdir}/%{name}/tutorials/ja -%files doc-pl +%files doc-nl %defattr(644,root,root,755) -%lang(pl) %{_docdir}/%{name}/help/pl -%lang(pl) %{_docdir}/%{name}/tutorials/pl +%lang(nl) %{_docdir}/%{name}/help/nl -%files doc-pt +%files doc-pl %defattr(644,root,root,755) -%lang(pt) %{_docdir}/%{name}/help/pt +%lang(pl) %{_docdir}/%{name}/help/pl %files doc-ru %defattr(644,root,root,755) %lang(ru) %{_docdir}/%{name}/help/ru -%lang(ru) %{_docdir}/%{name}/tutorials/ru - -%files doc-zh_CN -%defattr(644,root,root,755) -%lang(zh_CN) %{_docdir}/%{name}/tutorials/zh_CN diff --git a/nostrip.patch b/nostrip.patch new file mode 100644 index 0000000..7259f5a --- /dev/null +++ b/nostrip.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec4c5b7..1350307 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -187,7 +187,6 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) + endif() + + if( MINGW ) +- set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" ) + + # _UNICODE definition seems needed under mingw/gcc 4.8 + # (Kicad uses unicode, and on Windows, wxWidgets >= 2.9.4 is mandatory +@@ -236,8 +235,6 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) + set( CMAKE_SHARED_LINKER_FLAGS "${TO_LINKER},--no-undefined" ) + set( CMAKE_MODULE_LINKER_FLAGS "${TO_LINKER},--no-undefined" ) + +- set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" ) +- + # Defeat ELF's ability to use the GOT to replace locally implemented functions + # with ones from another module. + # https://bugs.launchpad.net/kicad/+bug/1322354 -- 2.43.0