From 4688dbb168ba51fe0ecb236caf5217a7cf32d4439576380ab7e50c196661e079 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Thu, 2 Aug 2018 16:36:44 +0000 Subject: [PATCH] Accepting request 625282 from home:plater Update to new release version 5.0.0 Removed incorporated patches: kicad-4.0.7-remove-internal-CheckCXXSymbolExists.patch, kicad-boost-1_61-boost-context-changes.patch and kicad-set-cxx-version.patch. OBS-URL: https://build.opensuse.org/request/show/625282 OBS-URL: https://build.opensuse.org/package/show/electronics/kicad?expand=0&rev=41 --- ...remove-internal-CheckCXXSymbolExists.patch | 58 -- kicad-4.0.7.tar.xz | 3 - kicad-5.0.0.tar.xz | 3 + kicad-boost-1_61-boost-context-changes.patch | 552 ------------------ kicad-set-cxx-version.patch | 13 - kicad-user-library.patch | 12 +- kicad.changes | 14 + kicad.spec | 57 +- 8 files changed, 55 insertions(+), 657 deletions(-) delete mode 100644 kicad-4.0.7-remove-internal-CheckCXXSymbolExists.patch delete mode 100644 kicad-4.0.7.tar.xz create mode 100644 kicad-5.0.0.tar.xz delete mode 100644 kicad-boost-1_61-boost-context-changes.patch delete mode 100644 kicad-set-cxx-version.patch diff --git a/kicad-4.0.7-remove-internal-CheckCXXSymbolExists.patch b/kicad-4.0.7-remove-internal-CheckCXXSymbolExists.patch deleted file mode 100644 index 0f48706..0000000 --- a/kicad-4.0.7-remove-internal-CheckCXXSymbolExists.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 2e0b75c058d676f427328506bbf3bc10079da117 Mon Sep 17 00:00:00 2001 -From: Seth Hillbrand -Date: Fri, 30 Mar 2018 14:47:16 -0700 -Subject: Remove internal CheckCXXSymbolExists - -Since Cmake 2.8.6, Cmake provides this macro. Our use references -internal Cmake variables that have changes in Cmake 3.11. - -diff --git a/CMakeModules/CheckCXXSymbolExists.cmake b/CMakeModules/CheckCXXSymbolExists.cmake -deleted file mode 100644 -index 2100973..0000000 ---- a/CMakeModules/CheckCXXSymbolExists.cmake -+++ /dev/null -@@ -1,42 +0,0 @@ --# - Check if a symbol exists as a function, variable, or macro in C++ --# CHECK_CXX_SYMBOL_EXISTS( ) --# --# Check that the is available after including given header --# and store the result in a . Specify the list --# of files in one argument as a semicolon-separated list. --# CHECK_CXX_SYMBOL_EXISTS() can be used to check in C++ files, as opposed --# to CHECK_SYMBOL_EXISTS(), which works only for C. --# --# If the header files define the symbol as a macro it is considered --# available and assumed to work. If the header files declare the --# symbol as a function or variable then the symbol must also be --# available for linking. If the symbol is a type or enum value --# it will not be recognized (consider using CheckTypeSize or --# CheckCSourceCompiles). --# --# The following variables may be set before calling this macro to --# modify the way the check is run: --# --# CMAKE_REQUIRED_FLAGS = string of compile command line flags --# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) --# CMAKE_REQUIRED_INCLUDES = list of include directories --# CMAKE_REQUIRED_LIBRARIES = list of libraries to link -- --#============================================================================= --# Copyright 2003-2011 Kitware, Inc. --# --# Distributed under the OSI-approved BSD License (the "License"); --# see accompanying file Copyright.txt for details. --# --# This software is distributed WITHOUT ANY WARRANTY; without even the --# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --# See the License for more information. --#============================================================================= --# (To distribute this file outside of CMake, substitute the full --# License text for the above reference.) -- --include(CheckSymbolExists) -- --macro(CHECK_CXX_SYMBOL_EXISTS SYMBOL FILES VARIABLE) -- _CHECK_SYMBOL_EXISTS("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.cxx" "${SYMBOL}" "${FILES}" "${VARIABLE}" ) --endmacro() --- -cgit v0.10.2 \ No newline at end of file diff --git a/kicad-4.0.7.tar.xz b/kicad-4.0.7.tar.xz deleted file mode 100644 index 9429223..0000000 --- a/kicad-4.0.7.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09074c77c6097d0f2ae49711c6d6f6c4490f0c068bba69b17f5f07319255fdc1 -size 10678656 diff --git a/kicad-5.0.0.tar.xz b/kicad-5.0.0.tar.xz new file mode 100644 index 0000000..b85ef5c --- /dev/null +++ b/kicad-5.0.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:377582e4287146186593d42a5a7fe761590a79404982524ce445b4edbf96d89e +size 14284708 diff --git a/kicad-boost-1_61-boost-context-changes.patch b/kicad-boost-1_61-boost-context-changes.patch deleted file mode 100644 index 1006baf..0000000 --- a/kicad-boost-1_61-boost-context-changes.patch +++ /dev/null @@ -1,552 +0,0 @@ -From 06d4894fdbeb00727cdcc667b8899ad73d8eb1c2 Mon Sep 17 00:00:00 2001 -From: Michael Steinberg -Date: Tue, 5 Jul 2016 00:14:32 +0200 -Subject: boost::context fixes to make it compatible with boost 1.61 - - -Index: common/tool/tool_manager.cpp -=================================================================== ---- common/tool/tool_manager.cpp.orig -+++ common/tool/tool_manager.cpp -@@ -528,7 +528,7 @@ void TOOL_MANAGER::dispatchInternal( con - } - } - -- BOOST_FOREACH( TOOL_STATE* st, m_toolState | boost::adaptors::map_values ) -+ BOOST_FOREACH( 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( con - 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 ); - -Index: include/tool/coroutine.h -=================================================================== ---- include/tool/coroutine.h.orig -+++ 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,53 @@ - - #include - --#include - #include -+#include - --#include "delegate.h" -+#if BOOST_VERSION < 106100 -+#include -+#else -+#include -+#include -+#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. -@@ -53,13 +97,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 ) - { - } - -@@ -68,9 +111,8 @@ public: - * Creates a coroutine from a member method of an object - */ - 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( T* object, ReturnType(T::*ptr)( ArgType ) ) : -+ COROUTINE( std::bind( ptr, object, std::placeholders::_1 ) ) - { - } - -@@ -78,29 +120,29 @@ 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 ) -- { -- // Avoid not initialized members, and make static analysers quiet -- m_args = 0; -- m_retVal = 0; -+ COROUTINE( std::function aEntry ) : -+ m_func( std::move( aEntry ) ), -+ m_running( false ), -+ m_args( 0 ), -+#if BOOST_VERSION < 106100 // -> m_callee = void* or void** -+ m_callee( nullptr ), -+#endif -+ m_retVal( 0 ) -+ { - } - - ~COROUTINE() - { -- if( m_saved ) -- delete m_saved; -+ } - --#if BOOST_VERSION >= 105600 -- if( m_self ) -- delete m_self; -+private: -+#if BOOST_VERSION < 106100 -+ using context_type = boost::context::fcontext_t; -+#else -+ using context_type = boost::context::execution_context; - #endif - -- if( m_stack ) -- free( m_stack ); -- } -- -+public: - /** - * Function Yield() - * -@@ -110,7 +152,7 @@ public: - */ - void Yield() - { -- jump( m_self, m_saved, 0 ); -+ jumpOut(); - } - - /** -@@ -122,7 +164,20 @@ public: - void Yield( ReturnType& aRetVal ) - { - m_retVal = aRetVal; -- jump( m_self, m_saved, 0 ); -+ 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; - } - - /** -@@ -130,9 +185,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,43 +198,37 @@ public: - */ - bool Call( ArgType aArgs ) - { -+ assert( m_func ); -+ assert( !m_callee ); -+ -+ m_args = &aArgs; -+ -+#if BOOST_VERSION < 106100 -+ assert( m_stack == nullptr ); -+ - // 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 ); -- -- assert( m_self == NULL ); -- assert( m_saved == NULL ); -+ stackSize -= size_t( ( (ptrdiff_t) m_stack.get() + stackSize) - (ptrdiff_t) sp ); - -- m_args = &aArgs; --#if BOOST_VERSION >= 105600 -- m_self = new boost::context::fcontext_t(); -- *m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub ); -+ m_callee = boost::context::make_fcontext( sp, stackSize, callerStub ); - #else -- m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub ); -+ m_callee = context_type( -+ std::allocator_arg_t(), -+ boost::context::protected_fixedsize_stack( c_defaultStackSize ), -+ &COROUTINE::callerStub -+ ); - #endif -- m_saved = new boost::context::fcontext_t(); - - m_running = true; -- // off we go! -- jump( m_saved, m_self, reinterpret_cast( this ) ); -- 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() -- { -- jump( m_saved, m_self, 0 ); -+ // off we go! -+ jumpIn(); - - return m_running; - } -@@ -208,61 +257,82 @@ private: - static const int c_defaultStackSize = 2000000; // fixme: make configurable - - /* real entry point of the coroutine */ -+#if BOOST_VERSION < 106100 - static void callerStub( intptr_t aData ) - { - // get pointer to self -- 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_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 )); -+ cor->jumpOut(); - } -+#else -+ /* 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_running = false; -+ -+ // go back to wherever we came from. -+ return std::move( cor->m_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, -- intptr_t aP, bool aPreserveFPU = true ) -+ void jumpIn() - { --#if BOOST_VERSION >= 105600 -- return boost::context::jump_fcontext( aOld, *aNew, aP, aPreserveFPU ); -+#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 boost::context::jump_fcontext( aOld, aNew, aP, aPreserveFPU ); -+ auto result = m_callee( this ); -+ m_callee = std::move( std::get<0>( result ) ); - #endif - } - -- template -- struct strip_ref -+ void jumpOut() - { -- typedef T result; -- }; -+#if BOOST_VERSION < 105600 -+ boost::context::jump_fcontext( m_callee, &m_caller, 0 ); -+#elif BOOST_VERSION < 106100 -+ boost::context::jump_fcontext( &m_callee, m_caller, 0 ); -+#else -+ auto result = m_caller( nullptr ); -+ m_caller = std::move( std::get<0>( result ) ); -+#endif -+ } - -- template -- struct strip_ref -- { -- typedef T result; -- }; -+ std::function m_func; - -- DELEGATE m_func; -+ bool m_running; -+ -+#if BOOST_VERSION < 106100 -+ ///< coroutine stack -+ std::unique_ptr m_stack; -+#endif - - ///< pointer to coroutine entry arguments. Stripped of references - ///< to avoid compiler errors. -- typename strip_ref::result* m_args; -- ReturnType m_retVal; -+ typename std::remove_reference::type* m_args; - - ///< 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; -+#if BOOST_VERSION < 105600 -+ context_type* m_callee; -+#else -+ context_type m_callee; -+#endif - -- bool m_running; -+ ReturnType m_retVal; - }; - - #endif -Index: include/tool/tool_base.h -=================================================================== ---- include/tool/tool_base.h.orig -+++ 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 -Index: include/tool/tool_interactive.h -=================================================================== ---- include/tool/tool_interactive.h.orig -+++ 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 ); - } -Index: include/tool/delegate.h -=================================================================== ---- 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 diff --git a/kicad-set-cxx-version.patch b/kicad-set-cxx-version.patch deleted file mode 100644 index 449e371..0000000 --- a/kicad-set-cxx-version.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: CMakeLists.txt -=================================================================== ---- CMakeLists.txt.orig 2017-08-28 16:31:31.000000000 +0200 -+++ CMakeLists.txt 2017-09-04 15:36:13.027522479 +0200 -@@ -161,6 +161,8 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CX - # subsequently on the command line, such as in pcbnew/github/CMakeLists.txt - set( CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}" ) - set( CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}" ) -+ -+ set( CMAKE_CXX_STANDARD 14 ) - - # The optimization level is -O1 instead of the usual -O2 level because - # boost::polygon has a function (inflate polygon) broken by the -O2 level diff --git a/kicad-user-library.patch b/kicad-user-library.patch index be91532..f55c753 100644 --- a/kicad-user-library.patch +++ b/kicad-user-library.patch @@ -1,16 +1,16 @@ Index: common/kiface_i.cpp =================================================================== ---- common/kiface_i.cpp.orig -+++ common/kiface_i.cpp -@@ -53,6 +53,7 @@ static void setSearchPaths( SEARCH_STACK +--- common/kiface_i.cpp.orig 2018-07-13 21:53:52.000000000 +0200 ++++ common/kiface_i.cpp 2018-07-20 16:03:55.529317649 +0200 +@@ -54,6 +54,7 @@ static void setSearchPaths( SEARCH_STACK fn.AppendDir( wxT( "library" ) ); aDst->AddPaths( fn.GetPath() ); -+ ++ fn.AppendDir( wxT( "doc" ) ); aDst->AddPaths( fn.GetPath() ); -@@ -60,6 +61,13 @@ static void setSearchPaths( SEARCH_STACK +@@ -61,6 +62,13 @@ static void setSearchPaths( SEARCH_STACK fn.RemoveLastDir(); fn.RemoveLastDir(); // "../../" up twice, removing library/doc/ } @@ -20,7 +20,7 @@ Index: common/kiface_i.cpp + aDst->AddPaths( homeDir + wxT( "/.local/share/kicad/library-repos/kicad-library/modules" ) ); + aDst->AddPaths( homeDir + wxT( "/.local/share/kicad/library-repos/kicad-library/modules/packages3d" ) ); + aDst->AddPaths( homeDir + wxT( "/.local/share/kicad/library-repos/kicad-library/template" ) ); -+ ++ // Add PCB library file path to search path list. if( aId == KIWAY::FACE_PCB || aId == KIWAY::FACE_CVPCB ) diff --git a/kicad.changes b/kicad.changes index faf71ee..1aa5785 100644 --- a/kicad.changes +++ b/kicad.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Wed Jul 25 08:51:47 UTC 2018 - davejplater@gmail.com + +- Update to new release version 5.0.0 +- Removed incorporated patches: + kicad-4.0.7-remove-internal-CheckCXXSymbolExists.patch, + kicad-boost-1_61-boost-context-changes.patch and + kicad-set-cxx-version.patch. +- Rebased kicad-user-library.patch. +- Upstream changes: + This version has many new features and improvments over 4.0.7. + See kicad-pcb.org/blog/2018/07/KiCad-5--a-new-generation/ for + all the details. + ------------------------------------------------------------------- Fri May 25 09:05:03 UTC 2018 - antoine.belvire@opensuse.org diff --git a/kicad.spec b/kicad.spec index b46907d..6634ebf 100644 --- a/kicad.spec +++ b/kicad.spec @@ -1,7 +1,7 @@ # # spec file for package kicad # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,13 +17,13 @@ Name: kicad -Version: 4.0.7 +Version: 5.0.0 Release: 0 Summary: EDA software suite for the creation of schematics and PCB License: GPL-2.0-or-later AND GPL-3.0-or-later Group: Productivity/Scientific/Electronics Url: http://kicad-pcb.org -Source: https://launchpad.net/kicad/4.0/%{version}/+download/kicad-%{version}.tar.xz +Source: https://launchpad.net/kicad/5.0/%{version}/+download/kicad-%{version}.tar.xz # License file was removed due to GPL-3.0+ code # https://github.com/KiCad/kicad-source-mirror/commit/681090b8ef3a362af75e8ca4417e18622747b63b Source2: COPYRIGHT.txt @@ -34,14 +34,7 @@ Patch2: kicad-library-repos-install.patch # PATCH-FIX-OPENSUSE davejplater@gmail.com -kicad-suse-help-path.patch - kicad looks in /usr/share/doc/kicad for help files and doesn't find them. # this patch adds packges/ befor kicad. Patch3: kicad-suse-help-path.patch -%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315 -# PATCH-FIX-UPSTREAM kicad-boost-1_61-boost-context-changes.patch -- Fix build with boost 1.61 -Patch4: kicad-boost-1_61-boost-context-changes.patch -# PATCH-OPENSUSE kicad-set-cxx-standard.diff -- use C++14 by default and decay to 11, required by boost 1.61 patch -Patch5: kicad-set-cxx-version.patch -%endif -# PATCH-FIX-UPSTREAM kicad-4.0.7-remove-internal-CheckCXXSymbolExists.patch -- Fix build with latest CMake, picked from upstream -Patch6: kicad-4.0.7-remove-internal-CheckCXXSymbolExists.patch + %if 0%{?suse_version} > 1325 BuildRequires: libboost_context-devel BuildRequires: libboost_filesystem-devel @@ -49,6 +42,7 @@ BuildRequires: libboost_iostreams-devel BuildRequires: libboost_locale-devel BuildRequires: libboost_program_options-devel BuildRequires: libboost_regex-devel +BuildRequires: libboost_test-devel BuildRequires: libboost_thread-devel %else BuildRequires: boost-devel >= 1.56 @@ -58,9 +52,12 @@ BuildRequires: doxygen BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: libcurl-devel +BuildRequires: libngspice-devel +BuildRequires: oce-devel BuildRequires: pkg-config BuildRequires: python-devel BuildRequires: update-desktop-files +BuildRequires: cmake(glm) # Use direct version to avoid problems with wx 3.2 BuildRequires: wxWidgets-3_0-devel >= 3 # Fix bug in old python-wxWidgets-3_0-devel @@ -78,9 +75,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: python-wxWidgets-3_0 >= 3 # The help function doesn't work without the doc package Requires: %{name}-doc = %{version} -Recommends: %{name}-library = %{version} +Requires: %{name}-symbols = %{version} Recommends: %{name}-library-install = %{version} Recommends: %{name}-footprints = %{version} +Recommends: %{name}-packages3D Obsoletes: kicad = 20140120 %description @@ -112,12 +110,6 @@ This package contains script for KiCad libraries downloading. %patch1 -p0 %patch2 -p1 %patch3 -# patch requires C++11, CMAKE_CXX_STANDARD requires cmake 3.1 -> Leap 42.1 or TW -%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315 -%patch4 -%patch5 -p0 -%endif -%patch6 -p1 cp %{SOURCE2} . @@ -125,6 +117,9 @@ cp %{SOURCE2} . sed -i 's|KICAD_PLUGINS lib/kicad/plugins|KICAD_PLUGINS %{_lib}/kicad/plugins|' CMakeLists.txt # Fix documentation directory sed -i 's|KICAD_DOCS share/doc/kicad|KICAD_DOCS share/doc/packages/kicad|' CMakeLists.txt +# Fix python shebangs +for i in `grep -rl "/usr/bin/env python"`;do sed -i '1s/^#!.*/#!\/usr\/bin\/python2/' ${i} ;done +for i in `grep -rl "/usr/bin/env python2"`;do sed -i '1s/^#!.*/#!\/usr\/bin\/python2/' ${i} ;done %build export CFLAGS="%{optflags} -fPIE" @@ -147,15 +142,23 @@ make %{?_smp_mflags} find %{buildroot}%{_datadir}/kicad/scripting/plugins -name "*.py" -exec chmod 0644 "{}" "+" #Change permissions back for executable scripts chmod -f 0755 `find %{buildroot}%{_datadir}/kicad/scripting/plugins -name "*.py" -perm 0644 -print0|xargs -0r grep -l '#!/usr'` +# Move scripts under doc to kicad directory. +mv %{buildroot}%{_datadir}/doc/%{name}/scripts %{buildroot}%{_datadir}/%{name} +rm -rf %{buildroot}%{_datadir}/doc +chmod -f 0755 `find %{buildroot}%{_datadir}/kicad/scripts -name "*py" -perm 0644 -print0|xargs -0r grep -l '#!/usr'` +chmod -f 0755 `find %{buildroot}%{_datadir}/kicad/scripts -name "*sh" -perm 0644 -print0|xargs -0r grep -l '#!/bin'` +chmod 0644 %{buildroot}%{_datadir}/kicad/scripting/kicad_pyshell/__init__.py %suse_update_desktop_file -r bitmap2component "Education;Engineering" -%suse_update_desktop_file -r cvpcb "Education;Engineering" %suse_update_desktop_file -r eeschema "Education;Engineering" %suse_update_desktop_file -r gerbview "Education;Engineering" %suse_update_desktop_file -r kicad "Education;Engineering" %suse_update_desktop_file -r pcbcalculator "Education;Engineering" %suse_update_desktop_file -r pcbnew "Education;Engineering" +# Link to library libkicad_3dsg.so.2.0.0 has no use +rm -rf %{buildroot}%{_libdir}/libkicad_3dsg.so + install -D scripts/library-repos-install.sh %{buildroot}%{_bindir}/kicad-library-install.sh %fdupes -s %{buildroot}%{_datadir}/kicad @@ -163,33 +166,37 @@ install -D scripts/library-repos-install.sh %{buildroot}%{_bindir}/kicad-library %if 0%{?suse_version} < 1330 %post +/sbin/ldconfig %desktop_database_post %icon_theme_cache_post %mime_database_post %postun +/sbin/ldconfig %desktop_database_postun %icon_theme_cache_postun %mime_database_postun +%else +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig %endif %files %defattr(-,root,root) -%doc CHANGELOG.txt +%doc README.txt Documentation/changelogs %license COPYRIGHT.txt %{_bindir}/* %exclude %{_bindir}/kicad-library-install.sh %{_libdir}/kicad/ %{_datadir}/kicad/ -%{_datadir}/doc/packages/kicad/ %{python_sitelib}/* +%{_datadir}/appdata/kicad.appdata.xml %{_datadir}/applications/*.desktop -%{_datadir}/mime/packages/kicad.xml -%{_datadir}/mimelnk/application/x-kicad-*.desktop -%dir %{_datadir}/mimelnk/ -%dir %{_datadir}/mimelnk/application/ +%{_datadir}/mime/packages/%{name}-*.xml %{_datadir}/icons/hicolor/*/mimetypes/application-x-* %{_datadir}/icons/hicolor/*/apps/*.* +%{_libdir}/libkicad_3dsg.so.2.0.0 %files library-install %defattr(-,root,root)