summaryrefslogtreecommitdiffstats
path: root/development/kicad
diff options
context:
space:
mode:
Diffstat (limited to 'development/kicad')
-rw-r--r--development/kicad/README8
-rw-r--r--development/kicad/boost-1.61.patch347
-rw-r--r--development/kicad/kicad.SlackBuild60
-rw-r--r--development/kicad/kicad.info10
-rw-r--r--development/kicad/kicad_boost_hdr.patch14
5 files changed, 34 insertions, 405 deletions
diff --git a/development/kicad/README b/development/kicad/README
index 2a2a2ba8e0..08f2238f63 100644
--- a/development/kicad/README
+++ b/development/kicad/README
@@ -1,7 +1,7 @@
-The KiCad project aims at creating a portable, cross-platform, Free/Libre/
-Open-Source EDA Suite, capable of schematic and printed circuit board
-design. The suite consist of a project manager, schematic editor,
-netlist converter, pcb designer and a gerber viewer.
+The KiCad project aims at creating a portable, cross-platform,
+Free/Libre/Open-Source EDA Suite, capable of schematic and printed
+circuit board design. The suite consists of a project manager,
+schematic editor, netlist converter, pcb designer and a gerber viewer.
There are separate SlackBuilds for the libraries and additional
documentation: kicad-library and kicad-doc.
diff --git a/development/kicad/boost-1.61.patch b/development/kicad/boost-1.61.patch
deleted file mode 100644
index 3ca8711b9f..0000000000
--- a/development/kicad/boost-1.61.patch
+++ /dev/null
@@ -1,347 +0,0 @@
---- a/common/tool/tool_manager.cpp
-+++ b/common/tool/tool_manager.cpp
-@@ -532,11 +532,11 @@
- if( st->cofunc )
- st->Push();
-
-+ st->cofunc = new COROUTINE<int, const TOOL_EVENT&>( tr.second );
-+
- // as the state changes, the transition table has to be set up again
- st->transitions.clear();
-
-- st->cofunc = new COROUTINE<int, const TOOL_EVENT&>( tr.second );
--
- // got match? Run the handler.
- st->cofunc->Call( aEvent );
-
---- a/include/tool/coroutine.h
-+++ b/include/tool/coroutine.h
-@@ -27,10 +28,15 @@
-
- #include <cstdlib>
-
--#include <boost/context/fcontext.hpp>
- #include <boost/version.hpp>
-+#include <type_traits>
-
--#include "delegate.h"
-+#if BOOST_VERSION <= 106000
-+#include <boost/context/fcontext.hpp>
-+#else
-+#include <boost/context/execution_context.hpp>
-+#include <boost/context/protected_fixedsize_stack.hpp>
-+#endif
-
- /**
- * Class COROUNTINE.
-@@ -53,13 +59,12 @@
- * See coroutine_example.cpp for sample code.
- */
-
--template <class ReturnType, class ArgType>
-+template <typename ReturnType, typename ArgType>
- class COROUTINE
- {
- public:
- COROUTINE() :
-- m_saved( NULL ), m_self( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ),
-- m_running( false )
-+ COROUTINE( nullptr )
- {
- }
-
-@@ -69,8 +74,7 @@
- */
- template <class T>
- COROUTINE( T* object, ReturnType(T::* ptr)( ArgType ) ) :
-- m_func( object, ptr ), m_self( NULL ), m_saved( NULL ), m_stack( NULL ),
-- m_stackSize( c_defaultStackSize ), m_running( false )
-+ COROUTINE( std::bind( ptr, object, std::placeholders::_1 ) )
- {
- }
-
-@@ -78,9 +82,15 @@
- * Constructor
- * Creates a coroutine from a delegate object
- */
-- COROUTINE( DELEGATE<ReturnType, ArgType> aEntry ) :
-- m_func( aEntry ), m_saved( NULL ), m_self( NULL ), m_stack( NULL ),
-- m_stackSize( c_defaultStackSize ), m_running( false )
-+ COROUTINE( std::function<ReturnType(ArgType)> aEntry ) :
-+ m_func( std::move( aEntry ) ),
-+ m_running( false ),
-+#if BOOST_VERSION <= 106000
-+ m_stack( nullptr ),
-+ m_stackSize( c_defaultStackSize ),
-+#endif
-+ m_caller( nullptr ),
-+ m_callee( nullptr )
- {
- // Avoid not initialized members, and make static analysers quiet
- m_args = 0;
-@@ -89,18 +99,26 @@
-
- ~COROUTINE()
- {
-- if( m_saved )
-- delete m_saved;
--
- #if BOOST_VERSION >= 105600
-- if( m_self )
-- delete m_self;
-+ delete m_callee;
- #endif
-
-+#if BOOST_VERSION <= 106000
-+ delete m_caller;
-+
- if( m_stack )
- free( m_stack );
-+#endif
- }
-
-+private:
-+#if BOOST_VERSION <= 106000
-+ using context_type = boost::context::fcontext_t;
-+#else
-+ using context_type = boost::context::execution_context<COROUTINE*>;
-+#endif
-+
-+public:
- /**
- * Function Yield()
- *
-@@ -110,7 +128,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
- }
-
- /**
-@@ -122,7 +145,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
- }
-
- /**
-@@ -130,9 +157,9 @@
- *
- * Defines the entry point for the coroutine, if not set in the constructor.
- */
-- void SetEntry( DELEGATE<ReturnType, ArgType> aEntry )
-+ void SetEntry( std::function<ReturnType(ArgType)> aEntry )
- {
-- m_func = aEntry;
-+ m_func = std::move( aEntry );
- }
-
- /* Function Call()
-@@ -143,6 +170,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 );
-
-@@ -151,22 +182,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<intptr_t>( this ) );
-+#if BOOST_VERSION <= 106000
-+ jump( m_caller, m_callee, reinterpret_cast<intptr_t>( this ) );
-+#else
-+ auto result = (*m_callee)( this );
-+ *m_callee = std::move( std::get<0>( result ) );
-+#endif
- return m_running;
- }
-
-@@ -179,7 +220,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;
- }
-@@ -208,61 +254,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<ReturnType, ArgType>* cor = reinterpret_cast<COROUTINE<ReturnType, ArgType>*>( aData );
-+#else
-+ cor->m_caller = &caller;
-+#endif
-
- // call the coroutine method
-- cor->m_retVal = cor->m_func( *cor->m_args );
-+ cor->m_retVal = cor->m_func( *( cor->m_args ) );
- cor->m_running = false;
-
- // go back to wherever we came from.
-- jump( cor->m_self, cor->m_saved, 0 ); // reinterpret_cast<intptr_t>( this ));
-+#if BOOST_VERSION <= 106000
-+ jump( cor->m_callee, cor->m_caller, 0 );
-+#else
-+ return caller;
-+#endif
- }
-
- ///> Wrapper for jump_fcontext to assure compatibility between different boost versions
-- static inline intptr_t jump(boost::context::fcontext_t* aOld, boost::context::fcontext_t* aNew,
-+#if BOOST_VERSION <= 106000
-+ static inline intptr_t jump( context_type* aOld, context_type* aNew,
- intptr_t aP, bool aPreserveFPU = true )
- {
--#if BOOST_VERSION >= 105600
-- return boost::context::jump_fcontext( aOld, *aNew, aP, aPreserveFPU );
--#else
-+#if BOOST_VERSION < 105600
- return boost::context::jump_fcontext( aOld, aNew, aP, aPreserveFPU );
-+#else
-+ return boost::context::jump_fcontext( aOld, *aNew, aP, aPreserveFPU );
- #endif
- }
-+#endif
-
-- template <typename T>
-- struct strip_ref
-- {
-- typedef T result;
-- };
-+ std::function<ReturnType(ArgType)> m_func;
-
-- template <typename T>
-- struct strip_ref<T&>
-- {
-- typedef T result;
-- };
-+ bool m_running;
-
-- DELEGATE<ReturnType, ArgType> m_func;
-+#if BOOST_VERSION <= 106000
-+ ///< coroutine stack
-+ void* m_stack;
-+
-+ size_t m_stackSize;
-+#endif
-
- ///< pointer to coroutine entry arguments. Stripped of references
- ///< to avoid compiler errors.
-- typename strip_ref<ArgType>::result* m_args;
-+ typename std::remove_reference<ArgType>::type* m_args;
-+
- ReturnType m_retVal;
-
- ///< saved caller context
-- boost::context::fcontext_t* m_saved;
-+ context_type* m_caller;
-
- ///< saved coroutine context
-- boost::context::fcontext_t* m_self;
--
-- ///< coroutine stack
-- void* m_stack;
--
-- size_t m_stackSize;
--
-- bool m_running;
-+ context_type* m_callee;
- };
-
- #endif
---- a/include/tool/tool_base.h
-+++ b/include/tool/tool_base.h
-@@ -31,7 +32,7 @@
- #include <tool/tool_event.h>
- #include <tool/tool_settings.h>
-
--#include <tool/delegate.h>
-+#include <functional>
-
- class EDA_ITEM;
- class TOOL_MANAGER;
-@@ -53,7 +54,9 @@
-
- /// Unique identifier for tools
- typedef int TOOL_ID;
--typedef DELEGATE<int, const TOOL_EVENT&> TOOL_STATE_FUNC;
-+
-+using TOOL_STATE_FUNC = std::function<int(const TOOL_EVENT&)>;
-+
-
- /**
- * Class TOOL_BASE
---- a/include/tool/tool_interactive.h
-+++ b/include/tool/tool_interactive.h
-@@ -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<T*>( this ), aStateFunc );
-+ TOOL_STATE_FUNC sptr = std::bind( aStateFunc, static_cast<T*>( this ), std::placeholders::_1 );
-
- goInternal( sptr, aConditions );
- }
-
diff --git a/development/kicad/kicad.SlackBuild b/development/kicad/kicad.SlackBuild
index b2942d5e3f..c49c5fcc54 100644
--- a/development/kicad/kicad.SlackBuild
+++ b/development/kicad/kicad.SlackBuild
@@ -1,9 +1,10 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for KiCad
# Open-Source EDA Suite
-# Copyright 2019 Fernando Lopez Jr. <fernando.lopezjr@gmail.com>
+# Copyright 2019-2023 Fernando Lopez Jr. <fernando.lopezjr@gmail.com>
+# Copyright 2023 Steven Voges <Oregon, USA>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,12 +24,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Revision date: 2019/Jun/02
+# Revision date: 2023/Apr/19
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=kicad
-VERSION=${VERSION:-5.1.5}
+VERSION=${VERSION:-8.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -38,22 +42,26 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686 -std=c++11"
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686 -std=c++11"
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC -std=c++11"
+ SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
- SLKCFLAGS="-O2 -std=c++11"
+ SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
@@ -63,7 +71,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -72,39 +80,19 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# KiCad 4.0.5 cannot be compiled with boost 1.61 and higher since the latter requires C++11.
-# If you insist to use boost 1.61 and higher, you can apply this patch manually and compile
-# with a C++11 capable compiler and its appropriate compiler switches.
-#patch -p1 --verbose < $CWD/boost-1.61.patch
-
-# KiCad 5.1.2 patch:
-patch -p1 --verbose < $CWD/kicad_boost_hdr.patch
-
-# Additional notes:
-#
-# - wxWidgets and wxPython use different toolkits (gtk2 vs (gtk2-unicode)). It
-# will result in a broken build. Please either install wxPython built using
-# gtk2 or add '-DKICAD_SCRIPTING_WXPYTHON=OFF' to cmake parameters to disable
-# wxPython support.
-
mkdir -p build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
-DKICAD_DOCS=/usr/doc/$PRGNAM-$VERSION \
-DKICAD_PLUGINS=/usr/lib${LIBDIRSUFFIX}/$PRGNAM/plugins \
- -DKICAD_STABLE_VERSION=ON \
- -DKICAD_SKIP_BOOST=ON \
- -DKICAD_SCRIPTING=ON \
- -DKICAD_SCRIPTING_MODULES=ON \
-DKICAD_SCRIPTING_WXPYTHON=ON \
- -DKICAD_USE_SPICE=ON \
- -DKICAD_USE_OCC=ON \
- -DKICAD_USE_OCE=OFF \
+ -DKICAD_USE_EGL=ON \
-DCMAKE_BUILD_TYPE=Release ..
- make VERBOSE=1
+ make
make install DESTDIR=$PKG
cd ..
@@ -112,7 +100,9 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a *.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS.txt *.md LICENSE* \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@@ -120,4 +110,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/development/kicad/kicad.info b/development/kicad/kicad.info
index db640050a1..a8f61628ec 100644
--- a/development/kicad/kicad.info
+++ b/development/kicad/kicad.info
@@ -1,10 +1,10 @@
PRGNAM="kicad"
-VERSION="5.1.5"
-HOMEPAGE="http://kicad-pcb.org"
-DOWNLOAD="https://launchpad.net/kicad/5.0/5.1.5/+download/kicad-5.1.5.tar.xz"
-MD5SUM="58e884272563e4636c9b83c275eea637"
+VERSION="8.0"
+HOMEPAGE="https://kicad.org"
+DOWNLOAD="https://gitlab.com/kicad/code/kicad/-/archive/8.0/kicad-8.0.tar.bz2"
+MD5SUM="301a2f31b038a78cb75dd537275c0f9b"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="wxPython3 ngspice OpenCASCADE glm"
+REQUIRES="OpenCASCADE glm ngspice unixODBC wxPython4 wxWidgets libgit2"
MAINTAINER="Fernando Lopez Jr."
EMAIL="fernando.lopezjr@gmail.com"
diff --git a/development/kicad/kicad_boost_hdr.patch b/development/kicad/kicad_boost_hdr.patch
deleted file mode 100644
index 10469b2210..0000000000
--- a/development/kicad/kicad_boost_hdr.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Add missing "boost/version.hpp" before version checking macro
-<https://github.com/Kawashima-Azumi/kicad-source-mirror/commit/0921e66957971796285c5a47f64678a78c84dcec>
-diff --git a/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h b/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h
-index 08ae0b949..72314d56a 100644
---- a/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h
-+++ b/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h
-@@ -24,6 +24,7 @@
- #ifndef UNIT_TEST_UTILS__H
- #define UNIT_TEST_UTILS__H
-
-+#include <boost/version.hpp>
- #include <boost/test/test_case_template.hpp>
- #include <boost/test/unit_test.hpp>
-