diff --git a/.abf.yml b/.abf.yml index 2c0dc15..40ba469 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,7 +1,79 @@ sources: - Epcos-MKT-1.0.tar.bz2: 99dd9e99814a8c2664c76bc6376f2121e21058ae - kicad-2015.03.21.tar.xz: ddfa3b1c20c847b930458cc43e1a4dafeac14e87 - kicad-doc-2015.03.21.tar.xz: c5d4aa5f689e20d5931fd81c31ba36b02b7917ee - kicad-footprints-2015.03.21.tar.xz: 1145acbc7364afa47fd1dc7cab928c4294fd981f - kicad-libraries-2015.03.21.tar.xz: d4cbf42cea39166c23320312d05e85210e6b2c4b - kicad-walter-libraries-2015.03.21.tar.xz: c34c7c18a858923e8cd327a6b7b27d9ae6949e85 + Air_Coils_SML_NEOSID.pretty-4.0.4.tar.gz: c5f0329e5a6eadc646c48bedd480903df271cec6 + Buttons_Switches_SMD.pretty-4.0.4.tar.gz: 6b8116af457a7cbd163b6473be44cf08ed4e699f + Buttons_Switches_ThroughHole.pretty-4.0.4.tar.gz: 355ab23b9d9f9e2b1259b40152984aa83c1aa659 + Buzzers_Beepers.pretty-4.0.4.tar.gz: d145d3589ba62c4aa38be1a668111f2251c422bc + Capacitors_SMD.pretty-4.0.4.tar.gz: 1988190d9f66453d0a53120245b6318a950f0636 + Capacitors_Tantalum_SMD.pretty-4.0.4.tar.gz: c047fb093b454ccf668f22e224d8b87f0b83e39b + Capacitors_ThroughHole.pretty-4.0.4.tar.gz: d63ed75204fca6bea30f375a11ae94dff6501e41 + Choke_Axial_ThroughHole.pretty-4.0.4.tar.gz: 39796518a3b8d9e176678744466bcf155955a619 + Choke_Common-Mode_Wurth.pretty-4.0.4.tar.gz: ff21ecf51fba311c433276f2725f8f5da3015a20 + Choke_Radial_ThroughHole.pretty-4.0.4.tar.gz: 747da2271367e7ae681cf813ac87258189645744 + Choke_SMD.pretty-4.0.4.tar.gz: 38b8d9f04fc3a263708e98de40ece0a8a21e4064 + Choke_Toroid_ThroughHole.pretty-4.0.4.tar.gz: e04711b899d2a02343e20550180645cf81ad2f0a + Connectors_Molex.pretty-4.0.4.tar.gz: fa1dc12380d97ec6398055989683d208e3cc0c75 + Connect.pretty-4.0.4.tar.gz: a31f549f756f500c948b7a71811c5bbd6ba2ea88 + Converters_DCDC_ACDC.pretty-4.0.4.tar.gz: 433864d95f3207ece93880010b9fed81be4482eb + Crystals.pretty-4.0.4.tar.gz: 1c9f7ea689f1f02e166a27573ffb253650f1d1c9 + Diodes_SMD.pretty-4.0.4.tar.gz: b048127eff48e05f64d9dc8b1b800dc1c2a4d0a0 + Diodes_ThroughHole.pretty-4.0.4.tar.gz: 868cd249108be08fa31470fae7db4740371fbf5b + Discret.pretty-4.0.4.tar.gz: 992e43b14af6c4b9dd7c696fea330513088cd7c5 + Display.pretty-4.0.4.tar.gz: 30d956029cc1fd3c051d54eec64bc047b565161a + Displays_7-Segment.pretty-4.0.4.tar.gz: dd347fe0a1172e616c66ef54542c8b51b522420b + Divers.pretty-4.0.4.tar.gz: 6350d4f295327ae7c2c5c20aaa65942da7d86e97 + EuroBoard_Outline.pretty-4.0.4.tar.gz: 4c5494a4bf8f414d638a92db65b4227f138bd964 + Fiducials.pretty-4.0.4.tar.gz: ee1e2b23a119e7ad98c0c11b1f1488ba4e4beddb + Filters_HF_Coils_NEOSID.pretty-4.0.4.tar.gz: 6052c6bad7803e239387c83168fa4a666b084497 + Fuse_Holders_and_Fuses.pretty-4.0.4.tar.gz: ef977308eac0332abd57af3c284a9c97692abe39 + Hall-Effect_Transducers_LEM.pretty-4.0.4.tar.gz: aca13caeba4aa64aca6dca20dc85d5b352db42ce + Heatsinks.pretty-4.0.4.tar.gz: 8a941dc51903674e90a8ab62a70086874ea730ca + Housings_DFN_QFN.pretty-4.0.4.tar.gz: 8632c132618fe8dde031e712a8579ed60b590690 + Housings_DIP.pretty-4.0.4.tar.gz: 2919c8e40deac068d3a1c2cc964d378fb9273899 + Housings_QFP.pretty-4.0.4.tar.gz: 8bb123802f104955087537570cf626cc715b086d + Housings_SIP.pretty-4.0.4.tar.gz: 20a3862d14a7ee8650a50c0d3e8ae2ad9fdf5748 + Housings_SOIC.pretty-4.0.4.tar.gz: 6288a0af3399db5eeb5d3d9a33b6aeefbfeac79e + Housings_SSOP.pretty-4.0.4.tar.gz: 471fce0e70b384b6f938a5284b2d570a5b9ee7e8 + Inductors_NEOSID.pretty-4.0.4.tar.gz: 2799541a59659528a93684c74ff839c8428626a8 + Inductors.pretty-4.0.4.tar.gz: f4c11560cf2223555846ff3cbcc6bc3a52fd16a2 + IR-DirectFETs.pretty-4.0.4.tar.gz: 777183080bce7ce2893c9da8f111005a6cbc94b6 + kicad-doc-4.0.4.tar.gz: 09e07b7bf09cd0be005ae60620307567521e427d + kicad-i18n-4.0.4.tar.gz: 810c5e57559412ee16cdc39d92a8934dec59e77b + kicad-library-4.0.4.tar.gz: 0e48e763138196defdb64fbb284c70f8142952d3 + Labels.pretty-4.0.4.tar.gz: 7cec3133997d713ec666305471477a785ff41991 + LEDs.pretty-4.0.4.tar.gz: 5a605771e2f6f4ddc1aeb4a1fe7e8ead569fd6b6 + Measurement_Points.pretty-4.0.4.tar.gz: 0d5fb713f86480b713342514ff70ce5ae7934f5e + Measurement_Scales.pretty-4.0.4.tar.gz: 0c0dca0eb6411ecffd7283c01c67cfb4ca707ee5 + Mechanical_Sockets.pretty-4.0.4.tar.gz: 5dee3d243bc390f43e8ed25c6fd00efce33c0846 + Microwave.pretty-4.0.4.tar.gz: 2a6afeb583fd384c5b64bb1dc717336ca383bd47 + Mounting_Holes.pretty-4.0.4.tar.gz: 80cb5e8e538d744a81dfb0fe5dd46f950dfe83da + NF-Transformers_ETAL.pretty-4.0.4.tar.gz: 8e566f85d224ba6c78382c6639e0f0520ea17088 + Oddities.pretty-4.0.4.tar.gz: 6ef54dedf4d41c6c32b73d874c920368a452a373 + Opto-Devices.pretty-4.0.4.tar.gz: 5d6b01d9b045d556444f3cc1aa8a0b6ea14d497d + Oscillators.pretty-4.0.4.tar.gz: 7fa2ed2fe5bb84c4cdf0e09a31a73fb631128e9e + PFF_PSF_PSS_Leadforms.pretty-4.0.4.tar.gz: e3630860a15b043faddc0b92d0106f023d15efd0 + Pin_Headers.pretty-4.0.4.tar.gz: 1e391a0297c5861c638806c1b08be54ea015bfc7 + Potentiometers.pretty-4.0.4.tar.gz: 4c714cdde69688a4e4d5d61e6f751c6a29a23f11 + Power_Integrations.pretty-4.0.4.tar.gz: d7e629f0cc77631997cfcf61658285f82572f706 + Relays_ThroughHole.pretty-4.0.4.tar.gz: f01cd1fa6d8825462548c24a873eb0c5ac56902a + Resistors_SMD.pretty-4.0.4.tar.gz: 543d9a7a2d7df8fbd740906a94556251faa18bab + Resistors_ThroughHole.pretty-4.0.4.tar.gz: 53886a45bfa60fc81a7ba01fc1dd55354f70f48b + Resistors_Universal.pretty-4.0.4.tar.gz: ed927548f44766ab38065799d1729ce3cd194973 + SMD_Packages.pretty-4.0.4.tar.gz: 5068729f4d66e7bf93b376b43eb64850daead324 + Sockets_BNC.pretty-4.0.4.tar.gz: 200a3a1dd7f15e216d0a76a5147c94da53837aa2 + Sockets_Mini-Universal.pretty-4.0.4.tar.gz: 7f82f6133f6ef4ff827dc30bf65a1ae0c1b8b91f + Sockets_MOLEX_KK-System.pretty-4.0.4.tar.gz: e0a9a00b2955e94d2671e2935cf194d98d9bbbda + Sockets.pretty-4.0.4.tar.gz: c0a77c96f228ccfae27ae804d4c1aab859351925 + Socket_Strips.pretty-4.0.4.tar.gz: 6ecba67591ff5865e8774fd5b75d46b0241baeb2 + Sockets_WAGO734.pretty-4.0.4.tar.gz: 4313f3c849bbdf3f6724a18fc761d4592022f560 + Symbols.pretty-4.0.4.tar.gz: 1fed5c1de927c2cff821bf632bebc63517ef9518 + Terminal_Blocks.pretty-4.0.4.tar.gz: ace69a2aaa4bac8cbd79855e3a851a9d2af76ce0 + TO_SOT_Packages_SMD.pretty-4.0.4.tar.gz: 38344a8e0c3d77018416a5244c6c1e66c1c1f035 + TO_SOT_Packages_THT.pretty-4.0.4.tar.gz: 208c6d6bacc9720b88cc65a8ddcc35be0d1110f8 + Transformers_CHK.pretty-4.0.4.tar.gz: 4c2b785bf303fcf50336bba8491144d715850ee3 + Transformers_SMPS_ThroughHole.pretty-4.0.4.tar.gz: 240b9b426d5819654d66962f00a3f77dc308eea0 + Transistors_OldSowjetAera.pretty-4.0.4.tar.gz: ef67c96082d3053f23872ae2fd0b406b0fe0776d + Valves.pretty-4.0.4.tar.gz: 067784bd68721d20b2f44d347de41656dcd21775 + Varistors.pretty-4.0.4.tar.gz: 1ba88fb6e9ccba3c842594f6f8271908f30e3cc6 + Wire_Connections_Bridges.pretty-4.0.4.tar.gz: 91955a16908ca08c4459984686cb4390a5da4814 + Wire_Pads.pretty-4.0.4.tar.gz: 8b3255a2a424b168a20eb93ae62e7b5738f2342b + kicad-4.0.4.tar.xz: d0a124218f91cd40958ca0d68f8fe1f36d368cc3 diff --git a/kicad-2015.01.02-freerouting.patch b/kicad-2015.01.02-freerouting.patch deleted file mode 100644 index 6339e4c..0000000 --- a/kicad-2015.01.02-freerouting.patch +++ /dev/null @@ -1,52 +0,0 @@ -From f81cb9527e29c6a6ef21d9040162b42e31c40e44 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Wed, 24 Dec 2014 09:53:49 +0100 -Subject: [PATCH] Try to run freerouting by its JPackage launcher script - -It's a sin to touch the Java tool by its JAR file in Fedora. ---- - pcbnew/dialogs/dialog_freeroute_exchange.cpp | 24 ++++++++++++++++++++++-- - 1 file changed, 22 insertions(+), 2 deletions(-) - -diff -urp kicad-2015.01.02/pcbnew/dialogs/dialog_freeroute_exchange.cpp kicad-2015.01.02.good/pcbnew/dialogs/dialog_freeroute_exchange.cpp ---- kicad-2015.01.02/pcbnew/dialogs/dialog_freeroute_exchange.cpp 2015-01-02 22:15:35.000000000 +0100 -+++ kicad-2015.01.02.good/pcbnew/dialogs/dialog_freeroute_exchange.cpp 2015-01-03 11:25:55.393054653 +0100 -@@ -80,7 +80,12 @@ void DIALOG_FREEROUTE::MyInit() - wxConfigBase* cfg = Kiface().KifaceSettings(); - cfg->Read( FREEROUTE_RUN_KEY, &msg ); - */ -- wxFileName fileName( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX ); -+ wxFileName fileName( FindKicadFile( wxT( "freerouting" ) ), wxPATH_UNIX ); -+ -+ if( !fileName.FileExists() ) -+ { -+ fileName.Assign ( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX ); -+ } - - if( fileName.FileExists() ) - { -@@ -144,8 +149,22 @@ void DIALOG_FREEROUTE::OnLaunchButtonCli - return; - } - -- wxFileName jarfileName( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX ); -- wxString command; -+ wxFileName jarfileName( FindKicadFile( wxT( "freerouting" ) ), wxPATH_UNIX ); -+ wxString command = wxT( "" ); -+ -+ if( jarfileName.FileExists() ) -+ { -+ command << wxChar( '"' ) << jarfileName.GetFullPath() << wxChar( '"' ); -+ // add option to load the .dsn file -+ command << wxT( " -de " ); -+ // add *.dsn full filename (quoted): -+ command << wxChar( '"' ) << dsnFile << wxChar( '"' ); -+ -+ ProcessExecute( command ); -+ return; -+ } else { -+ jarfileName.Assign ( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX ); -+ } - - // Find the Java application on Windows. - // Colud be no more needed since we now have to run only java, not java web start diff --git a/kicad-2015.03.21-boost-1.61.patch b/kicad-2015.03.21-boost-1.61.patch deleted file mode 100644 index 91a6982..0000000 --- a/kicad-2015.03.21-boost-1.61.patch +++ /dev/null @@ -1,372 +0,0 @@ -diff -urN kicad-2015.03.21/common/tool/tool_manager.cpp kicad-2015.03.21-patched/common/tool/tool_manager.cpp ---- kicad-2015.03.21/common/tool/tool_manager.cpp 2015-03-21 23:21:48.000000000 +1000 -+++ kicad-2015.03.21-patched/common/tool/tool_manager.cpp 2016-12-06 22:29:28.103774738 +1000 -@@ -513,11 +513,11 @@ - 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 -urN kicad-2015.03.21/include/tool/coroutine.h kicad-2015.03.21-patched/include/tool/coroutine.h ---- kicad-2015.03.21/include/tool/coroutine.h 2015-03-21 23:21:48.000000000 +1000 -+++ kicad-2015.03.21-patched/include/tool/coroutine.h 2016-12-06 22:29:28.105774738 +1000 -@@ -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,15 @@ - - #include - --#include - #include -+#include - --#include "delegate.h" -+#if BOOST_VERSION <= 106000 -+#include -+#else -+#include -+#include -+#endif - - /** - * Class COROUNTINE. -@@ -53,13 +59,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 +74,7 @@ - */ - 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,26 +82,40 @@ - * 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 ) - { - } - - ~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() - * -@@ -107,7 +125,12 @@ - */ - 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 - } - - /** -@@ -119,7 +142,11 @@ - 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 - } - - /** -@@ -127,9 +154,9 @@ - * - * 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() -@@ -140,6 +167,10 @@ - */ - 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 ); - -@@ -148,22 +179,32 @@ - - // 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::protected_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; - } - -@@ -176,7 +217,12 @@ - */ - 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; - } -@@ -205,61 +251,66 @@ - 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 -urN kicad-2015.03.21/include/tool/tool_base.h kicad-2015.03.21-patched/include/tool/tool_base.h ---- kicad-2015.03.21/include/tool/tool_base.h 2015-03-21 23:21:48.000000000 +1000 -+++ kicad-2015.03.21-patched/include/tool/tool_base.h 2016-12-06 22:30:28.474774500 +1000 -@@ -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 -@@ -29,7 +30,7 @@ - #include // for KICAD_T - - #include --#include -+#include - - class EDA_ITEM; - class TOOL_MANAGER; -@@ -51,7 +52,9 @@ - - /// Unique identifier for tools - typedef int TOOL_ID; --typedef DELEGATE TOOL_STATE_FUNC; -+ -+using TOOL_STATE_FUNC = std::function; -+ - - /** - * Class TOOL_BASE -diff -urN kicad-2015.03.21/include/tool/tool_interactive.h kicad-2015.03.21-patched/include/tool/tool_interactive.h ---- kicad-2015.03.21/include/tool/tool_interactive.h 2015-03-21 23:21:48.000000000 +1000 -+++ kicad-2015.03.21-patched/include/tool/tool_interactive.h 2016-12-06 22:29:28.106774738 +1000 -@@ -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 @@ - 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 ); - } diff --git a/kicad-boost-1_61-boost-context-changes.patch b/kicad-boost-1_61-boost-context-changes.patch new file mode 100644 index 0000000..7841078 --- /dev/null +++ b/kicad-boost-1_61-boost-context-changes.patch @@ -0,0 +1,552 @@ +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 new file mode 100644 index 0000000..a7cfa9d --- /dev/null +++ b/kicad-set-cxx-version.patch @@ -0,0 +1,13 @@ +Index: CMakeLists.txt +=================================================================== +--- CMakeLists.txt.orig ++++ CMakeLists.txt +@@ -142,6 +142,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.spec b/kicad.spec index 7f9e17f..7fc5416 100644 --- a/kicad.spec +++ b/kicad.spec @@ -1,44 +1,122 @@ -%define revision 5528 +%define Werror_cflags %{nil} + +%define docname kicad-doc +%define libname kicad-library +%define i18nname kicad-i18n Summary: EDA software suite for creation of schematic diagrams and PCBs Name: kicad -Version: 2015.03.21 -Release: 0.rev%{revision}.3 -Epoch: 1 +Version: 4.0.4 +Release: 1 +Epoch: 2 License: GPLv2+ Group: Sciences/Computer science Url: http://www.kicad-pcb.org -# URL2: https://launchpad.net/kicad -# URL3: http://orson.net.pl/pub/kicad/ -# Additional librairies from Walter Lain -# URL4: http://smisioto.no-ip.org/elettronica/kicad/kicad-en.htm +Source0: https://launchpad.net/%{name}/4.0/%{version}/+download/%{name}-%{version}.tar.xz +Source1: https://github.com/KiCad/%{docname}/archive/%{docname}-%{version}.tar.gz +Source2: https://github.com/KiCad/%{libname}/archive/%{libname}-%{version}.tar.gz +Source3: https://github.com/KiCad/%{i18nname}/archive/%{i18nname}-%{version}.tar.gz -# Source files created with the following scripts ... -# kicad-clone.sh ... clone BZR repositories of main, libraries, doc -# kicad-update.sh ... update BZR repositories -# kicad-export.sh ... export BZR repositories and create tarballs -# kicad-walter-libs.sh ... download, unpack and prepare tarball with walter libs +# This needs to be aligned with kicad-library-*/template/fp-lib-table.for-pretty +Source4: https://github.com/KiCad/Air_Coils_SML_NEOSID.pretty/archive/Air_Coils_SML_NEOSID.pretty-%{version}.tar.gz +Source5: https://github.com/KiCad/Buttons_Switches_SMD.pretty/archive/Buttons_Switches_SMD.pretty-%{version}.tar.gz +Source6: https://github.com/KiCad/Buttons_Switches_ThroughHole.pretty/archive/Buttons_Switches_ThroughHole.pretty-%{version}.tar.gz +Source7: https://github.com/KiCad/Buzzers_Beepers.pretty/archive/Buzzers_Beepers.pretty-%{version}.tar.gz +Source8: https://github.com/KiCad/Capacitors_SMD.pretty/archive/Capacitors_SMD.pretty-%{version}.tar.gz +Source9: https://github.com/KiCad/Capacitors_Tantalum_SMD.pretty/archive/Capacitors_Tantalum_SMD.pretty-%{version}.tar.gz +Source10: https://github.com/KiCad/Capacitors_ThroughHole.pretty/archive/Capacitors_ThroughHole.pretty-%{version}.tar.gz +Source11: https://github.com/KiCad/Choke_Axial_ThroughHole.pretty/archive/Choke_Axial_ThroughHole.pretty-%{version}.tar.gz +Source12: https://github.com/KiCad/Choke_Common-Mode_Wurth.pretty/archive/Choke_Common-Mode_Wurth.pretty-%{version}.tar.gz +Source13: https://github.com/KiCad/Choke_Radial_ThroughHole.pretty/archive/Choke_Radial_ThroughHole.pretty-%{version}.tar.gz +Source14: https://github.com/KiCad/Choke_SMD.pretty/archive/Choke_SMD.pretty-%{version}.tar.gz +Source15: https://github.com/KiCad/Choke_Toroid_ThroughHole.pretty/archive/Choke_Toroid_ThroughHole.pretty-%{version}.tar.gz +Source16: https://github.com/KiCad/Connectors_Molex.pretty/archive/Connectors_Molex.pretty-%{version}.tar.gz +Source17: https://github.com/KiCad/Connect.pretty/archive/Connect.pretty-%{version}.tar.gz +Source18: https://github.com/KiCad/Converters_DCDC_ACDC.pretty/archive/Converters_DCDC_ACDC.pretty-%{version}.tar.gz +Source19: https://github.com/KiCad/Crystals.pretty/archive/Crystals.pretty-%{version}.tar.gz +Source20: https://github.com/KiCad/Diodes_SMD.pretty/archive/Diodes_SMD.pretty-%{version}.tar.gz +Source21: https://github.com/KiCad/Diodes_ThroughHole.pretty/archive/Diodes_ThroughHole.pretty-%{version}.tar.gz +Source22: https://github.com/KiCad/Discret.pretty/archive/Discret.pretty-%{version}.tar.gz +Source23: https://github.com/KiCad/Display.pretty/archive/Display.pretty-%{version}.tar.gz +Source24: https://github.com/KiCad/Displays_7-Segment.pretty/archive/Displays_7-Segment.pretty-%{version}.tar.gz +Source25: https://github.com/KiCad/Divers.pretty/archive/Divers.pretty-%{version}.tar.gz +Source26: https://github.com/KiCad/EuroBoard_Outline.pretty/archive/EuroBoard_Outline.pretty-%{version}.tar.gz +Source27: https://github.com/KiCad/Fiducials.pretty/archive/Fiducials.pretty-%{version}.tar.gz +Source28: https://github.com/KiCad/Filters_HF_Coils_NEOSID.pretty/archive/Filters_HF_Coils_NEOSID.pretty-%{version}.tar.gz +Source29: https://github.com/KiCad/Fuse_Holders_and_Fuses.pretty/archive/Fuse_Holders_and_Fuses.pretty-%{version}.tar.gz +Source30: https://github.com/KiCad/Hall-Effect_Transducers_LEM.pretty/archive/Hall-Effect_Transducers_LEM.pretty-%{version}.tar.gz +Source31: https://github.com/KiCad/Heatsinks.pretty/archive/Heatsinks.pretty-%{version}.tar.gz +Source32: https://github.com/KiCad/Housings_DFN_QFN.pretty/archive/Housings_DFN_QFN.pretty-%{version}.tar.gz +Source33: https://github.com/KiCad/Housings_DIP.pretty/archive/Housings_DIP.pretty-%{version}.tar.gz +Source34: https://github.com/KiCad/Housings_QFP.pretty/archive/Housings_QFP.pretty-%{version}.tar.gz +Source35: https://github.com/KiCad/Housings_SIP.pretty/archive/Housings_SIP.pretty-%{version}.tar.gz +Source36: https://github.com/KiCad/Housings_SOIC.pretty/archive/Housings_SOIC.pretty-%{version}.tar.gz +Source37: https://github.com/KiCad/Housings_SSOP.pretty/archive/Housings_SSOP.pretty-%{version}.tar.gz +Source38: https://github.com/KiCad/Inductors_NEOSID.pretty/archive/Inductors_NEOSID.pretty-%{version}.tar.gz +Source39: https://github.com/KiCad/Inductors.pretty/archive/Inductors.pretty-%{version}.tar.gz +Source40: https://github.com/KiCad/IR-DirectFETs.pretty/archive/IR-DirectFETs.pretty-%{version}.tar.gz +Source41: https://github.com/KiCad/Labels.pretty/archive/Labels.pretty-%{version}.tar.gz +Source42: https://github.com/KiCad/LEDs.pretty/archive/LEDs.pretty-%{version}.tar.gz +Source43: https://github.com/KiCad/Measurement_Points.pretty/archive/Measurement_Points.pretty-%{version}.tar.gz +Source44: https://github.com/KiCad/Measurement_Scales.pretty/archive/Measurement_Scales.pretty-%{version}.tar.gz +Source45: https://github.com/KiCad/Mechanical_Sockets.pretty/archive/Mechanical_Sockets.pretty-%{version}.tar.gz +Source46: https://github.com/KiCad/Microwave.pretty/archive/Microwave.pretty-%{version}.tar.gz +Source47: https://github.com/KiCad/Mounting_Holes.pretty/archive/Mounting_Holes.pretty-%{version}.tar.gz +Source48: https://github.com/KiCad/NF-Transformers_ETAL.pretty/archive/NF-Transformers_ETAL.pretty-%{version}.tar.gz +Source49: https://github.com/KiCad/Oddities.pretty/archive/Oddities.pretty-%{version}.tar.gz +Source50: https://github.com/KiCad/Opto-Devices.pretty/archive/Opto-Devices.pretty-%{version}.tar.gz +Source51: https://github.com/KiCad/Oscillators.pretty/archive/Oscillators.pretty-%{version}.tar.gz +Source52: https://github.com/KiCad/PFF_PSF_PSS_Leadforms.pretty/archive/PFF_PSF_PSS_Leadforms.pretty-%{version}.tar.gz +Source53: https://github.com/KiCad/Pin_Headers.pretty/archive/Pin_Headers.pretty-%{version}.tar.gz +Source54: https://github.com/KiCad/Potentiometers.pretty/archive/Potentiometers.pretty-%{version}.tar.gz +Source55: https://github.com/KiCad/Power_Integrations.pretty/archive/Power_Integrations.pretty-%{version}.tar.gz +Source56: https://github.com/KiCad/Relays_ThroughHole.pretty/archive/Relays_ThroughHole.pretty-%{version}.tar.gz +Source57: https://github.com/KiCad/Resistors_SMD.pretty/archive/Resistors_SMD.pretty-%{version}.tar.gz +Source58: https://github.com/KiCad/Resistors_ThroughHole.pretty/archive/Resistors_ThroughHole.pretty-%{version}.tar.gz +Source59: https://github.com/KiCad/Resistors_Universal.pretty/archive/Resistors_Universal.pretty-%{version}.tar.gz +Source60: https://github.com/KiCad/SMD_Packages.pretty/archive/SMD_Packages.pretty-%{version}.tar.gz +Source61: https://github.com/KiCad/Sockets_BNC.pretty/archive/Sockets_BNC.pretty-%{version}.tar.gz +Source62: https://github.com/KiCad/Sockets_Mini-Universal.pretty/archive/Sockets_Mini-Universal.pretty-%{version}.tar.gz +Source63: https://github.com/KiCad/Sockets_MOLEX_KK-System.pretty/archive/Sockets_MOLEX_KK-System.pretty-%{version}.tar.gz +Source64: https://github.com/KiCad/Sockets.pretty/archive/Sockets.pretty-%{version}.tar.gz +Source65: https://github.com/KiCad/Socket_Strips.pretty/archive/Socket_Strips.pretty-%{version}.tar.gz +Source66: https://github.com/KiCad/Sockets_WAGO734.pretty/archive/Sockets_WAGO734.pretty-%{version}.tar.gz +Source67: https://github.com/KiCad/Symbols.pretty/archive/Symbols.pretty-%{version}.tar.gz +Source68: https://github.com/KiCad/Terminal_Blocks.pretty/archive/Terminal_Blocks.pretty-%{version}.tar.gz +Source69: https://github.com/KiCad/TO_SOT_Packages_SMD.pretty/archive/TO_SOT_Packages_SMD.pretty-%{version}.tar.gz +Source70: https://github.com/KiCad/TO_SOT_Packages_THT.pretty/archive/TO_SOT_Packages_THT.pretty-%{version}.tar.gz +Source71: https://github.com/KiCad/Transformers_CHK.pretty/archive/Transformers_CHK.pretty-%{version}.tar.gz +Source72: https://github.com/KiCad/Transformers_SMPS_ThroughHole.pretty/archive/Transformers_SMPS_ThroughHole.pretty-%{version}.tar.gz +Source73: https://github.com/KiCad/Transistors_OldSowjetAera.pretty/archive/Transistors_OldSowjetAera.pretty-%{version}.tar.gz +Source74: https://github.com/KiCad/Valves.pretty/archive/Valves.pretty-%{version}.tar.gz +Source75: https://github.com/KiCad/Varistors.pretty/archive/Varistors.pretty-%{version}.tar.gz +Source76: https://github.com/KiCad/Wire_Connections_Bridges.pretty/archive/Wire_Connections_Bridges.pretty-%{version}.tar.gz +Source77: https://github.com/KiCad/Wire_Pads.pretty/archive/Wire_Pads.pretty-%{version}.tar.gz -Source0: %{name}-%{version}.tar.xz -Source1: %{name}-doc-%{version}.tar.xz -Source2: %{name}-libraries-%{version}.tar.xz -Source3: %{name}-footprints-%{version}.tar.xz -Source7: Epcos-MKT-1.0.tar.bz2 -Source8: %{name}-walter-libraries-%{version}.tar.xz -Patch0: kicad-2015.03.21-boost-1.61.patch -Patch1: kicad-2015.01.02-nostrip.patch -Patch2: kicad-2015.01.02-freerouting.patch +Patch0: kicad-boost-1_61-boost-context-changes.patch +Patch1: kicad-set-cxx-version.patch +Patch2: kicad-2015.01.02-nostrip.patch BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: doxygen +BuildRequires: swig BuildRequires: boost-devel BuildRequires: wxgtku3.0-devel +BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glew) +BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(python) +# doc +BuildRequires: asciidoc +BuildRequires: dblatex +BuildRequires: git +BuildRequires: po4a +BuildRequires: source-highlight +BuildRequires: perl(Unicode::GCString) Requires: electronics-menu -Requires: freerouting %rename kicad-library %rename kicad-locales-ca @@ -59,7 +137,6 @@ Requires: freerouting %rename kicad-locales-sv %rename kicad-locales-zh-cn - %description KiCad is an EDA software to design electronic schematic diagrams and printed circuit board artwork up to 16 layers. @@ -79,16 +156,18 @@ KiCad is a set of four softwares and a project manager: %{_datadir}/icons/hicolor/*/apps/*.* %{_datadir}/mime/packages/%{name}.xml %{_datadir}/mimelnk/application/x-%{name}-*.desktop -#%config(noreplace) %{_sysconfdir}/ld.so.conf.d/kicad.conf -%dir %{_docdir}/%{name}/ %{_docdir}/%{name}/*.txt +%{python2_sitelib}/_pcbnew.so +%{python2_sitelib}/pcbnew.* #---------------------------------------------------------------------------- %package doc Summary: Documentation for KiCad Group: Documentation -License: GPLv2+ +Obsoletes: %{name}-doc-hu < %{EVRD} +Obsoletes: %{name}-doc-pt < %{EVRD} +Obsoletes: %{name}-doc-zh_CN < %{EVRD} BuildArch: noarch %description doc @@ -96,16 +175,26 @@ Documentation and tutorials for KiCad in English. %files doc %dir %{_docdir}/%{name}/ -%{_docdir}/%{name}/contrib -#%{_docdir}/%{name}/help/ %{_docdir}/%{name}/help/en -%{_docdir}/%{name}/help/file_formats -#%{_docdir}/%{name}/tutorials -%{_docdir}/%{name}/tutorials/en %{_docdir}/%{name}/scripts #---------------------------------------------------------------------------- +%package doc-ca +Summary: Documentation for KiCad in Catalan +Group: Documentation +Requires: %{name}-doc = %{EVRD} +Requires: locales-ca +BuildArch: noarch + +%description doc-ca +Documentation and tutorials for KiCad in Catalan. + +%files doc-ca +%{_docdir}/%{name}/help/ca + +#---------------------------------------------------------------------------- + %package doc-de Summary: Documentation for KiCad in German Group: Documentation @@ -114,11 +203,10 @@ Requires: locales-de BuildArch: noarch %description doc-de -Documentation and tutorials for KiCad in German +Documentation and tutorials for KiCad in German. %files doc-de %{_docdir}/%{name}/help/de -%{_docdir}/%{name}/tutorials/de #---------------------------------------------------------------------------- @@ -130,11 +218,10 @@ Requires: locales-es BuildArch: noarch %description doc-es -Documentation and tutorials for KiCad in Spanish +Documentation and tutorials for KiCad in Spanish. %files doc-es %{_docdir}/%{name}/help/es -%{_docdir}/%{name}/tutorials/es #---------------------------------------------------------------------------- @@ -146,26 +233,10 @@ Requires: locales-fr BuildArch: noarch %description doc-fr -Documentation and tutorials for KiCad in French +Documentation and tutorials for KiCad in French. %files doc-fr %{_docdir}/%{name}/help/fr -%{_docdir}/%{name}/tutorials/fr - -#---------------------------------------------------------------------------- - -%package doc-hu -Summary: Documentation for KiCad in Hungarian -Group: Documentation -Requires: %{name}-doc = %{EVRD} -Requires: locales-hu -BuildArch: noarch - -%description doc-hu -Documentation and tutorials for KiCad in Hungarian - -%files doc-hu -%{_docdir}/%{name}/tutorials/hu #---------------------------------------------------------------------------- @@ -177,11 +248,10 @@ Requires: locales-it BuildArch: noarch %description doc-it -Documentation and tutorials for KiCad in Italian +Documentation and tutorials for KiCad in Italian. %files doc-it %{_docdir}/%{name}/help/it -%{_docdir}/%{name}/tutorials/it #---------------------------------------------------------------------------- @@ -193,12 +263,25 @@ Requires: locales-ja BuildArch: noarch %description doc-ja -Documentation and tutorials for KiCad in Japanese +Documentation and tutorials for KiCad in Japanese. %files doc-ja %{_docdir}/%{name}/help/ja -%{_docdir}/%{name}/tutorials/ja +#---------------------------------------------------------------------------- + +%package doc-nl +Summary: Documentation for KiCad in Dutch +Group: Documentation +Requires: %{name}-doc = %{EVRD} +Requires: locales-nl +BuildArch: noarch + +%description doc-nl +Documentation and tutorials for KiCad in Dutch. + +%files doc-nl +%{_docdir}/%{name}/help/nl #---------------------------------------------------------------------------- @@ -214,22 +297,6 @@ Documentation and tutorials for KiCad in Polish %files doc-pl %{_docdir}/%{name}/help/pl -%{_docdir}/%{name}/tutorials/pl - -#---------------------------------------------------------------------------- - -%package doc-pt -Summary: Documentation for KiCad in Portuguese -Group: Documentation -Requires: %{name}-doc = %{EVRD} -Requires: locales-pt -BuildArch: noarch - -%description doc-pt -Documentation and tutorials for KiCad in Portuguese - -%files doc-pt -%{_docdir}/%{name}/help/pt #---------------------------------------------------------------------------- @@ -241,122 +308,105 @@ Requires: locales-ru BuildArch: noarch %description doc-ru -Documentation and tutorials for KiCad in Russian +Documentation and tutorials for KiCad in Russian. %files doc-ru %{_docdir}/%{name}/help/ru -%{_docdir}/%{name}/tutorials/ru - -#---------------------------------------------------------------------------- - -%package doc-zh_CN -Summary: Documentation for KiCad in Chinese -Group: Documentation -Requires: %{name}-doc = %{EVRD} -Requires: locales-zh -BuildArch: noarch - -%description doc-zh_CN -Documentation and tutorials for KiCad in Chinese - -%files doc-zh_CN -%{_docdir}/%{name}/tutorials/zh_CN #---------------------------------------------------------------------------- %prep -%setup -q -a 1 -a 2 -a 3 -a 7 -a 8 +%setup -q -a1 -a2 -a3 -%patch0 -p1 -%patch1 -p1 +%patch0 -p0 +%patch1 -p0 %patch2 -p1 -#kicad-doc.noarch: W: file-not-utf8 /usr/share/doc/kicad/AUTHORS.txt -iconv -f iso8859-1 -t utf-8 AUTHORS.txt > AUTHORS.conv && mv -f AUTHORS.conv AUTHORS.txt - - #multilibs -%ifarch x86_64 sparc64 ppc64 amd64 s390x -se} -i "s|KICAD_PLUGINS lib/kicad/plugins|KICAD_PLUGINS lib64/kicad/plugins|" CMakeLists.txt -#%{__sed} -i "s|/usr/lib/kicad|/usr/lib64/kicad|" %{SOURCE3} +%ifarch x86_64 +sed -i "s|KICAD_PLUGINS lib/kicad/plugins|KICAD_PLUGINS lib64/kicad/plugins|" CMakeLists.txt %endif - %build -# Add Epcos library -cd Epcos-MKT-1.0 -cp -pR library ../%{name}-libraries-%{version}/ -cp -pR modules ../%{name}-libraries-%{version}/ -cd .. - -# Add Walter libraries -cd %{name}-walter-libraries-%{version} -cp -pR library ../%{name}-libraries-%{version}/ -cp -pR modules ../%{name}-libraries-%{version}/ -cd .. - -# # Symbols libraries -# -pushd %{name}-libraries-%{version}/ -%cmake -DKICAD_STABLE_VERSION=OFF -%make -j1 VERBOSE=1 +pushd %{libname}-%{version} +%cmake \ + -DKICAD_STABLE_VERSION:BOOL=ON \ + -DCMAKE_BUILD_TYPE=Release +%make popd +# Build kicad-i18n +pushd %{i18nname}-%{version} +%cmake \ + -DKICAD_STABLE_VERSION:BOOL=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DKICAD_I18N_UNIX_STRICT_PATH=ON +%make +popd -# -# Core components -# -%cmake -DKICAD_STABLE_VERSION=OFF -DKICAD_SKIP_BOOST=ON \ - -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-config +# Build kicad-doc +pushd %{docname}-%{version} +%cmake \ + -DKICAD_STABLE_VERSION:BOOL=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_FORMATS=html +%make +popd + +# Build kicad +%cmake \ + -DBUILD_SHARED_LIBS:BOOL=OFF \ + -DKICAD_STABLE_VERSION:BOOL=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DKICAD_SKIP_BOOST=ON \ + -DKICAD_REPO_NAME=stable \ + -DKICAD_BUILD_VERSION=%{version} \ + -DBUILD_GITHUB_PLUGIN=ON \ + -DKICAD_SCRIPTING=ON \ + -DKICAD_SCRIPTING_MODULES=ON \ + -DKICAD_SCRIPTING_WXPYTHON=OFF %make VERBOSE=1 - %install %makeinstall_std -C build -# install localization -cd %{name}-doc-%{version}/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 %{buildroot}%{_datadir}/locale/${dir}/LC_MESSAGES/%{name}.mo -done -cd ../.. - - -# install desktop for desktopfile in %{buildroot}%{_datadir}/applications/*.desktop ; do - desktop-file-install \ - --dir %{buildroot}%{_datadir}/applications \ - --remove-category Development \ - --delete-original \ - ${desktopfile} +desktop-file-install \ + --dir %{buildroot}%{_datadir}/applications \ + --remove-category Development \ + --delete-original \ + ${desktopfile} done -# -# Symbols libraries -# -pushd %{name}-libraries-%{version}/ +# Localization +pushd %{i18nname}-%{version} %makeinstall_std -C build popd -# install template +# Symbols libraries +pushd %{libname}-%{version} +%makeinstall_std -C build +popd + +# Install template install -d %{buildroot}%{_datadir}/%{name}/template install -m 644 template/%{name}.pro %{buildroot}%{_datadir}/%{name}/template # Footprints -pushd %{name}-footprints-%{version}/ -cp -a */ %{buildroot}%{_datadir}/%{name}/modules -popd +mkdir -p %{buildroot}%{_datadir}/%{name}/modules +for S in %{sources}; do + P=$(basename $S |sed -n 's/\.pretty-.*/.pretty/p') + [ "$P" ] || continue + mkdir -p %{buildroot}%{_datadir}/%{name}/modules/$P + tar xzf $S --strip-components=1 -C %{buildroot}%{_datadir}/%{name}/modules/$P +done ln -f %{buildroot}%{_datadir}/%{name}/template/fp-lib-table{.for-pretty,} -# Preparing for documentation pull-ups -rm -f %{name}-doc-%{version}/doc/help/CMakeLists.txt -rm -f %{name}-doc-%{version}/doc/help/makefile -rm -f %{name}-doc-%{version}/doc/tutorials/CMakeLists.txt - -cp -pr %{name}-doc-%{version}/doc/* %{buildroot}%{_docdir}/%{name} -cp -pr AUTHORS.txt CHANGELOG* %{buildroot}%{_docdir}/%{name} +# Install kicad-doc +pushd %{docname}-%{version} +%makeinstall_std -C build +popd %find_lang %{name}