adds sci-electronics/kicad 4.0.5
This commit is contained in:
parent
ec0c71ae82
commit
9b36ed5f78
5 changed files with 360 additions and 0 deletions
5
sci-electronics/kicad/Manifest
Normal file
5
sci-electronics/kicad/Manifest
Normal file
|
@ -0,0 +1,5 @@
|
|||
DIST kicad-4.0.5-i18n.tar.gz 2464569 SHA256 18538b050f7c85eec0aaf3b2fd0a7a37a4eba139bb3d60be3ef80732e8e4b840 SHA512 ff33051202d3aa50284170ca1b0ebd6279ee60559c4ce88c577248d4fe3d5781bb5b75eea6c165fbbd4abc1fd681357a7d7877339c4413fb3774bc8a55264b81 WHIRLPOOL b63b9b59ddaf21485e8e358c356c694e03608989e6d2e13fc96bc620789cf1df66cf7d4fb051713ebcbd756afe6b43d217746ef2c84b593eeae8909c5e4c781f
|
||||
DIST kicad-4.0.5.tar.xz 10626696 SHA256 73f286733bb69b04749279a1848cbedfad908e7dcd1d11363c7fae7677c85331 SHA512 1486a039237e8d97ed21d62905ab74cb953b76c9d15bdfe7edd7380cf93e4c4b9a23aa82c6f523f6d5272e1dbe06ee8853a80eaabb1d0d9db6e304265f53ba7f WHIRLPOOL a7ca4e8183d44423a2076ca81047965166ed5f15504967ac790c18bedd045e61fbce17e197341876eb73aaa4a9a2571242cc5fcc4853abec99a19b3433690c6e
|
||||
DIST kicad-footprints-4.0.5.tar.gz 2330378 SHA256 50cb02d9eb44b30f8fd68434172a25a93c62cd9a07877091116fd8db8238f9ad SHA512 91122127be4b54bec7b37706d6438853463ed66b1c0c205e8d93709c159744e84ea58f3bf0cb1f4e18df6061f6df3d76f2ff0d6e698c6ba5ce3867d89838d95d WHIRLPOOL 44283efb35c3522e73d36fc51d591bc236cf2f17b8901279d28908b5a227f791597c74c94bff3be904417df42248b5d16e93a9aaa061132809ffe0507911b186
|
||||
DIST kicad-libcontext.tar.gz 25599 SHA256 37be6072a6016d402b4341e2ceba719cdd8e279e275ea7275d91e19e813a31a3 SHA512 3b469dcf0e0f4e23f304d0068468a99516e89588d8f36a821af10e751f919cb8a9077d52109fdd43c1c2a443e026b38d0d3aa4774823d05755c9db35742d32d9 WHIRLPOOL d05f43544fa4c9d1fae957445782ad610c07564db81c12491fe6aeaf6948a369b3f55114eacb21916fbc9001f20d0a2c4944c3ab0ccc8e57bf9aa44fea507087
|
||||
DIST kicad-library-4.0.5.tar.gz 91081668 SHA256 7169d1cfa1a55cbe7570252e68dc1242ae91458f16a13f7fc3f7804c504b1af1 SHA512 904d3439d1e76d13fe72a221efe2f9f3b0a4115f8e84e78d44a24d5a727138de0b91eec7733e851b9a6fec138897f203229bdf83b772ea49000a6d828ba6f25f WHIRLPOOL f76975e99d69c3ca36532cd22b05edc7b278dd09d8d810fac5466a84687922b3b013242eca6b1a6ba48bb403fe05d2260bbc60136b718185774923013398e956
|
107
sci-electronics/kicad/files/kicad-4.0.4-boost-context.patch
Normal file
107
sci-electronics/kicad/files/kicad-4.0.4-boost-context.patch
Normal file
|
@ -0,0 +1,107 @@
|
|||
diff -Naur kicad-4.0.2-orig/common/system/libcontext.cpp kicad-4.0.2/common/system/libcontext.cpp
|
||||
--- kicad-4.0.2-orig/common/system/libcontext.cpp 2016-06-16 22:30:58.000000000 -0700
|
||||
+++ kicad-4.0.2/common/system/libcontext.cpp 2016-06-16 22:35:46.654719468 -0700
|
||||
@@ -13,7 +13,7 @@
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
*/
|
||||
-#include "libcontext.h"
|
||||
+#include <system/libcontext.h>
|
||||
#if defined(LIBCONTEXT_PLATFORM_windows_i386) && defined(LIBCONTEXT_COMPILER_gcc)
|
||||
__asm (
|
||||
".text\n"
|
||||
diff -Naur kicad-4.0.2-orig/CMakeLists.txt kicad-4.0.2/CMakeLists.txt
|
||||
--- kicad-4.0.2-orig/CMakeLists.txt 2016-02-13 13:14:42.000000000 -0800
|
||||
+++ kicad-4.0.2/CMakeLists.txt 2016-06-11 01:11:25.623484908 -0700
|
||||
@@ -561,7 +561,7 @@
|
||||
# Download boost and possibly build parts of it
|
||||
#################################################
|
||||
if( KICAD_SKIP_BOOST )
|
||||
- find_package( Boost 1.54.0 REQUIRED COMPONENTS context date_time filesystem iostreams locale
|
||||
+ find_package( Boost 1.54.0 REQUIRED COMPONENTS date_time filesystem iostreams locale
|
||||
program_options regex system thread )
|
||||
|
||||
if( NOT Boost_FOUND )
|
||||
diff -Naur kicad-4.0.2-orig/common/CMakeLists.txt kicad-4.0.2/common/CMakeLists.txt
|
||||
--- kicad-4.0.2-orig/common/CMakeLists.txt 2016-02-13 13:14:42.000000000 -0800
|
||||
+++ kicad-4.0.2/common/CMakeLists.txt 2016-06-11 01:10:04.886830434 -0700
|
||||
@@ -256,6 +256,8 @@
|
||||
view/view_item.cpp
|
||||
view/view_group.cpp
|
||||
|
||||
+ system/libcontext.cpp
|
||||
+
|
||||
math/math_util.cpp
|
||||
|
||||
tool/tool_action.cpp
|
||||
diff -Naur kicad-4.0.2-orig/include/tool/coroutine.h kicad-4.0.2/include/tool/coroutine.h
|
||||
--- kicad-4.0.2-orig/include/tool/coroutine.h 2016-02-13 13:14:42.000000000 -0800
|
||||
+++ kicad-4.0.2/include/tool/coroutine.h 2016-06-11 01:07:06.035378422 -0700
|
||||
@@ -27,8 +27,7 @@
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
-#include <boost/context/fcontext.hpp>
|
||||
-#include <boost/version.hpp>
|
||||
+#include <system/libcontext.h>
|
||||
|
||||
#include "delegate.h"
|
||||
|
||||
@@ -92,10 +91,8 @@
|
||||
if( m_saved )
|
||||
delete m_saved;
|
||||
|
||||
-#if BOOST_VERSION >= 105600
|
||||
if( m_self )
|
||||
delete m_self;
|
||||
-#endif
|
||||
|
||||
if( m_stack )
|
||||
free( m_stack );
|
||||
@@ -156,13 +153,9 @@
|
||||
assert( m_saved == NULL );
|
||||
|
||||
m_args = &aArgs;
|
||||
-#if BOOST_VERSION >= 105600
|
||||
- m_self = new boost::context::fcontext_t();
|
||||
- *m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub );
|
||||
-#else
|
||||
- m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub );
|
||||
-#endif
|
||||
- m_saved = new boost::context::fcontext_t();
|
||||
+ m_self = new fcontext_t();
|
||||
+ *m_self = make_fcontext( sp, m_stackSize, callerStub );
|
||||
+ m_saved = new fcontext_t();
|
||||
|
||||
m_running = true;
|
||||
// off we go!
|
||||
@@ -222,14 +215,10 @@
|
||||
}
|
||||
|
||||
///> 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,
|
||||
+ static inline intptr_t jump(fcontext_t* aOld, fcontext_t* aNew,
|
||||
intptr_t aP, bool aPreserveFPU = true )
|
||||
{
|
||||
-#if BOOST_VERSION >= 105600
|
||||
- return boost::context::jump_fcontext( aOld, *aNew, aP, aPreserveFPU );
|
||||
-#else
|
||||
- return boost::context::jump_fcontext( aOld, aNew, aP, aPreserveFPU );
|
||||
-#endif
|
||||
+ return jump_fcontext( aOld, *aNew, aP, aPreserveFPU );
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@@ -252,10 +241,10 @@
|
||||
ReturnType m_retVal;
|
||||
|
||||
///< saved caller context
|
||||
- boost::context::fcontext_t* m_saved;
|
||||
+ fcontext_t* m_saved;
|
||||
|
||||
///< saved coroutine context
|
||||
- boost::context::fcontext_t* m_self;
|
||||
+ fcontext_t* m_self;
|
||||
|
||||
///< coroutine stack
|
||||
void* m_stack;
|
16
sci-electronics/kicad/files/kicad-footprints-cmakelists.txt
Normal file
16
sci-electronics/kicad/files/kicad-footprints-cmakelists.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
project( kicad-footprints )
|
||||
|
||||
cmake_minimum_required( VERSION 2.6.1 FATAL_ERROR )
|
||||
|
||||
file(GLOB footprint_dirs "*.pretty")
|
||||
|
||||
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
|
||||
set( KICAD_DATA share/kicad
|
||||
CACHE PATH "Location of KiCad data files." )
|
||||
set( KICAD_MODULES ${KICAD_DATA}/modules )
|
||||
|
||||
mark_as_advanced( KICAD_DATA KICAD_MODULES )
|
||||
|
||||
install(DIRECTORY ${footprint_dirs}
|
||||
DESTINATION ${KICAD_MODULES}
|
||||
COMPONENT resources)
|
205
sci-electronics/kicad/kicad-4.0.5.ebuild
Normal file
205
sci-electronics/kicad/kicad-4.0.5.ebuild
Normal file
|
@ -0,0 +1,205 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
WX_GTK_VER="3.0"
|
||||
|
||||
inherit cmake-utils eutils flag-o-matic gnome2-utils python-single-r1 wxwidgets vcs-snapshot versionator xdg
|
||||
|
||||
DESCRIPTION="Electronic Schematic and PCB design tools."
|
||||
HOMEPAGE="http://www.kicad-pcb.org"
|
||||
LIBCONTEXT_COMMIT="3d92a1a50f4749b5a92131a957c9615473be85b4"
|
||||
|
||||
SERIES=$(get_version_component_range 1-2)
|
||||
|
||||
SRC_URI="https://launchpad.net/${PN}/${SERIES}/${PV}/+download/${P}.tar.xz
|
||||
!minimal? (
|
||||
http://downloads.kicad-pcb.org/libraries/${PN}-footprints-${PV}.tar.gz
|
||||
http://downloads.kicad-pcb.org/libraries/kicad-library-${PV}.tar.gz
|
||||
)
|
||||
i18n? ( https://github.com/KiCad/${PN}-i18n/archive/${PV}.tar.gz -> ${P}-i18n.tar.gz )
|
||||
https://github.com/twlostow/libcontext/archive/${LIBCONTEXT_COMMIT}.tar.gz -> ${PN}-libcontext.tar.gz"
|
||||
|
||||
LICENSE="GPL-2+ GPL-3+ Boost-1.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="debug doc examples github i18n libressl minimal +python"
|
||||
LANGS="bg ca cs de el es fi fr hu it ja ko nl pl pt ru sk sl sv zh_CN"
|
||||
for lang in ${LANGS} ; do
|
||||
IUSE="${IUSE} linguas_${lang}"
|
||||
done
|
||||
unset lang
|
||||
unset LANGS
|
||||
|
||||
REQUIRED_USE="
|
||||
python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
COMMON_DEPEND="x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
|
||||
python? (
|
||||
dev-python/wxpython:${WX_GTK_VER}[opengl,${PYTHON_USEDEP}]
|
||||
${PYTHON_DEPS}
|
||||
)
|
||||
>=dev-libs/boost-1.56[nls,threads,python?]
|
||||
github? (
|
||||
libressl? ( dev-libs/libressl:0 )
|
||||
!libressl? ( dev-libs/openssl:0 )
|
||||
)
|
||||
media-libs/glew:0=
|
||||
media-libs/freeglut
|
||||
media-libs/mesa
|
||||
sys-libs/zlib
|
||||
x11-libs/cairo"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
doc? ( app-doc/doxygen )
|
||||
i18n? ( virtual/libintl )
|
||||
python? ( dev-lang/swig:0 )"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
sci-electronics/electronics-menu"
|
||||
|
||||
pkg_setup() {
|
||||
python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
xdg_src_prepare
|
||||
|
||||
# Add separated out libcontext files and patch source to use them
|
||||
mkdir -p "${S}/common/system/" || die
|
||||
mkdir -p "${S}/include/system/" || die
|
||||
cp "${WORKDIR}/${PN}-libcontext/libcontext.cpp" "${S}/common/system/libcontext.cpp" || die
|
||||
cp "${WORKDIR}/${PN}-libcontext/libcontext.h" "${S}/include/system/libcontext.h" || die
|
||||
# Path source to use new "built in" libcontext. Also patch libcontext.cpp to have correct include file.
|
||||
# Path must be applied after new libcontext files have been copied to the kicad source directory.
|
||||
epatch "${FILESDIR}/${PN}-4.0.4-boost-context.patch"
|
||||
|
||||
# remove all the non unix file endings
|
||||
edos2unix $(find "${S}" -type f -name "*.desktop")
|
||||
|
||||
# Remove cvpcb desktop file while it does nothing
|
||||
rm "${WORKDIR}/${P}/resources/linux/mime/applications/cvpcb.desktop" || die
|
||||
|
||||
# Handle optional minimal install.
|
||||
if use minimal; then
|
||||
# remove templates as they are not needed to run binaries
|
||||
sed -e '/add_subdirectory( template )/d' -i CMakeLists.txt || die
|
||||
else
|
||||
# create a link to the parts library in the main project folder
|
||||
ln -s "${WORKDIR}/kicad-library-${PV}" "${S}/${PN}-library" || die
|
||||
# create a link to the footprints library and add cmake build rule for it
|
||||
ln -s "${WORKDIR}/${PN}-footprints-${PV}" "${S}/${PN}-footprints" || die
|
||||
cp "${FILESDIR}/${PN}-footprints-cmakelists.txt" "${WORKDIR}/${PN}-footprints-${PV}/CMakeLists.txt" || die
|
||||
# add the libraries directory to cmake as a subproject to build
|
||||
sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-library )" -i CMakeLists.txt || die
|
||||
# add the footprints directory to cmake as a subproject to build
|
||||
sed "/add_subdirectory( ${PN}-library )/a add_subdirectory( ${PN}-footprints )" -i CMakeLists.txt || die
|
||||
# remove duplicate uninstall directions for the library module
|
||||
sed '/make uninstall/,/# /d' -i ${PN}-library/CMakeLists.txt || die
|
||||
fi
|
||||
|
||||
# Add internationalization for the GUI
|
||||
if use i18n; then
|
||||
# create a link to the translations library in the main project folder
|
||||
ln -s "${WORKDIR}/${P}-i18n" "${S}/${PN}-i18n" || die
|
||||
# Remove unused languages. Project generates only languages specified in the
|
||||
# file in LINGUAS in the subproject folder. By default all languages are added
|
||||
# so we sed out the unused ones based on the user linguas_* settings.
|
||||
local lang
|
||||
for lang in ${LANGS}; do
|
||||
if ! use linguas_${lang}; then
|
||||
sed "/${lang}/d" -i ${PN}-i18n/LINGUAS || die
|
||||
fi
|
||||
done
|
||||
# cmakelists does not respect our build dir variables, so make it point to the right location
|
||||
sed "s|\${CMAKE_BINARY_DIR}|${WORKDIR}/${P}_build|g" -i ${PN}-i18n/CMakeLists.txt || die
|
||||
# we also make from the master project so the source dir is understood incorretly, replace that too
|
||||
sed "s|\${CMAKE_SOURCE_DIR}/\${LANG}|\${CMAKE_SOURCE_DIR}/${PN}-i18n/\${LANG}|g" -i ${PN}-i18n/CMakeLists.txt || die
|
||||
# add the translations directory to cmake as a subproject to build
|
||||
sed "/add_subdirectory( bitmaps_png )/a add_subdirectory( ${PN}-i18n )" -i CMakeLists.txt || die
|
||||
# remove duplicate uninstall directions for the translation module
|
||||
sed '/make uninstall/,$d' -i ${PN}-i18n/CMakeLists.txt || die
|
||||
fi
|
||||
|
||||
# Install examples in the right place if requested
|
||||
if use examples; then
|
||||
# install demos into the examples folder too
|
||||
sed -e 's:${KICAD_DATA}/demos:${KICAD_DOCS}/examples:' -i CMakeLists.txt || die
|
||||
else
|
||||
# remove additional demos/examples as its not strictly required to run the binaries
|
||||
sed -e '/add_subdirectory( demos )/d' -i CMakeLists.txt || die
|
||||
fi
|
||||
|
||||
# Add important missing doc files
|
||||
sed -e 's/INSTALL.txt/AUTHORS.txt CHANGELOG.txt README.txt TODO.txt/' -i CMakeLists.txt || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DPYTHON_DEST="$(python_get_sitedir)"
|
||||
-DPYTHON_EXECUTABLE="${PYTHON}"
|
||||
-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
|
||||
-DPYTHON_LIBRARY="$(python_get_library_path)"
|
||||
-DKICAD_DOCS="/usr/share/doc/${PF}"
|
||||
-DKICAD_HELP="/usr/share/doc/${PF}/help"
|
||||
-DKICAD_REPO_NAME="stable"
|
||||
-DKICAD_BUILD_VERSION="${PV}"
|
||||
-DwxUSE_UNICODE=ON
|
||||
-DKICAD_SKIP_BOOST=ON
|
||||
-DBUILD_GITHUB_PLUGIN="$(usex github)"
|
||||
-DKICAD_SCRIPTING="$(usex python)"
|
||||
-DKICAD_SCRIPTING_MODULES="$(usex python)"
|
||||
-DKICAD_SCRIPTING_WXPYTHON="$(usex python)"
|
||||
-DKICAD_I18N_UNIX_STRICT_PATH="$(usex i18n)"
|
||||
)
|
||||
if use debug; then
|
||||
append-cxxflags "-DDEBUG"
|
||||
append-cflags "-DDEBUG"
|
||||
fi
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake-utils_src_compile
|
||||
if use doc; then
|
||||
doxygen Doxyfile || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
use python && python_optimize
|
||||
if use doc ; then
|
||||
dodoc uncrustify.cfg
|
||||
cd Documentation || die
|
||||
dodoc -r GUI_Translation_HOWTO.pdf guidelines/UIpolicies.txt doxygen/.
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
xdg_pkg_preinst
|
||||
gnome2_icon_savelist
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
gnome2_icon_cache_update
|
||||
|
||||
if use minimal ; then
|
||||
ewarn "If the schematic and/or board editors complain about missing libraries when you"
|
||||
ewarn "open old projects, you will have to take one or more of the following actions :"
|
||||
ewarn "- Install the missing libraries manually."
|
||||
ewarn "- Remove the libraries from the 'Libs and Dir' preferences."
|
||||
ewarn "- Fix the libraries' locations in the 'Libs and Dir' preferences."
|
||||
ewarn "- Emerge ${PN} without the 'minimal' USE flag."
|
||||
fi
|
||||
elog ""
|
||||
elog "You may want to emerge media-gfx/wings if you want to create 3D models of components."
|
||||
elog "For help and extended documentation emerge app-doc/kicad-doc."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_pkg_postrm
|
||||
gnome2_icon_cache_update
|
||||
}
|
27
sci-electronics/kicad/metadata.xml
Normal file
27
sci-electronics/kicad/metadata.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>zoltan@sinustrom.info</email>
|
||||
<name>Zoltan Puskas</name>
|
||||
<description>Proxied maintainer. Assign bugs to him.</description>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="github">Add github support into PCB editor</flag>
|
||||
<flag name="i18n">Allow GUI internationalization through linguas_* use flags</flag>
|
||||
<flag name="minimal">Build only binaries without parts library and examples</flag>
|
||||
<flag name="python">Enable python scripting support</flag>
|
||||
</use>
|
||||
<longdescription>
|
||||
Kicad is an open source (GPL) software for the creation of electronic
|
||||
schematic diagrams and printed circuit board artwork.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="github">KiCad/kicad-i18n</remote-id>
|
||||
<remote-id type="launchpad">kicad</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
Loading…
Add table
Add a link
Reference in a new issue