Various updates and fixes

This commit is contained in:
Torsten Kurbad
2024-11-05 12:51:21 +01:00
parent 1b59ab7cfc
commit 430bf5360d
22 changed files with 1445 additions and 0 deletions
+4
View File
@@ -1,3 +1,7 @@
AUX kicad-8.0.5-boost-1.86.patch 1826 BLAKE2B 40ea53bf5f9a23e3a2cf7a244a164dea426d4046623130187b9c73274f4bc768c799365211b2d57ad6cd51e0a69476fa0beebe90682266f669030a1b96aedab0 SHA512 c481ff6905fa2434958b755c408e293dfd488d5a5a028ce7c21380a3704138be343ebecb8087f70684864de82ba40c6ac13d1f4c220a956d143df46dfd930871
AUX kicad-8.0.5-libgit2-1.8.4.patch 1433 BLAKE2B 2ebe5e8254c27720d9f119d57b09ba7ad5b821f4b0681192d961830dbd91ca385b54286c30411717c7a52473bdd4b5086e860bf489f758d455cfde2d5d49e719 SHA512 cc56a039d44b7e36af4f270f457077939a6cb31f8155afb9a1e8f3333260e87cd7744a70756ade1b44cc3003893358e738e2a549f57b0075e0b0e28fb657a55a
DIST kicad-8.0.2.tar.bz2 72713030 BLAKE2B ba47a16b5c435970a45aef9988a5f6d218df043a5ce3547a191991ef63620125989e6218e97266a62c76ece604248bdf0652a10d423346fe3648c8ba240651c4 SHA512 192bcd494f00eccc430ddf9e9034f252bae177f06da81e730fb82f000a58bac9201d49ecba93c3bd17608b6df6a944beea85849050e306e11c1abfbd0028ff4a
DIST kicad-8.0.5.tar.bz2 72957862 BLAKE2B ae5c9c96a723bae7bc40577f5275b622d741d3ec8038ed11f5e1fac81b767be42d222a5ce1a121e26462f75998d296a07178e51dd61a08a2419583bd7e5ac1ad SHA512 a093debe0029d18db89d341ce1767a7cc2cf0598c5e36be2781ba6d72c25a8fbd16e12d7c9f184f3628984be31c375000fd5b702ccc9851702e126aeba15dbea
EBUILD kicad-8.0.2-r1.ebuild 4477 BLAKE2B e80525202782c7e7e58d976a0b495150e3d8ba9b4073c9dac854933ad22973927c6dea3fd39099928f675ce866979ef094e182334cd5e9c5e03c26a03f5ba5a5 SHA512 7c1b65eb3ef115346140cabea04ab4f64f791872bd999136e32bba2a1c2c172c70a3757b17412826f32c2793c80d7d60050f47630e50bcd7c032e592fef0c152
EBUILD kicad-8.0.5.ebuild 4609 BLAKE2B e818be339b6a6b9a4a962ececbf90dd6c67a085f4f984a2d2708ed81d4069b7c0f621c9c66f711f153b788882df6d735858e0778fa4e76ba175301a01a9ebef3 SHA512 7aa8e2178455fcdb8d1ff8a38683266e2ccf3e1f8682965d8ffb90f016bb0c8febb6db734422542d13fd9be12058d3e9d3cd541dc65e5d33151d0d6559b45ea8
MISC metadata.xml 811 BLAKE2B 4f2150b49b1bebf73aa3440ae1ace1624ce02e022d361051e895a18d28f2ab802fed04c94552b36fc0265335a1eacd5d3a7c407fc88f0c4f7de9e4fa6afa6c5f SHA512 c09c2143516f361a8553ab5c44ffa47c77c7a8dbf53596dfe9ba81378c1a7e3aee8378353950cd8805b675d0a29444848fddd4acfe107a54e3f56e87183a1c6c
@@ -0,0 +1,49 @@
diff '--color=auto' -ur kicad-8.0.5.orig/3d-viewer/3d_cache/3d_cache.cpp kicad-8.0.5/3d-viewer/3d_cache/3d_cache.cpp
--- kicad-8.0.5.orig/3d-viewer/3d_cache/3d_cache.cpp 2024-09-06 18:28:40.000000000 +0200
+++ kicad-8.0.5/3d-viewer/3d_cache/3d_cache.cpp 2024-11-05 11:40:58.773367999 +0100
@@ -381,7 +381,13 @@
fclose( fp );
unsigned int digest[5];
- dblock.get_digest( digest );
+ // V8 only
+ // Boost 1.86 and later changed digest_type from uchar[20] from int[5]
+ // But KiCad 8.99 and later use MurmurHash3 here, so just do a fairly ugly cast to keep
+ // this going for another few months.
+ static_assert( sizeof( digest ) == sizeof( boost::uuids::detail::sha1::digest_type& ),
+ "SHA1 digest size mismatch" );
+ dblock.get_digest( reinterpret_cast<boost::uuids::detail::sha1::digest_type&>( digest ) );
// ensure MSB order
for( int i = 0; i < 5; ++i )
diff '--color=auto' -ur kicad-8.0.5.orig/common/kiid.cpp kicad-8.0.5/common/kiid.cpp
--- kicad-8.0.5.orig/common/kiid.cpp 2024-09-06 18:28:40.000000000 +0200
+++ kicad-8.0.5/common/kiid.cpp 2024-11-05 11:40:49.030394379 +0100
@@ -25,9 +25,9 @@
#include <kiid.h>
+#include <boost/random/mersenne_twister.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>
-#include <boost/functional/hash.hpp>
#if BOOST_VERSION >= 106700
#include <boost/uuid/entropy_error.hpp>
@@ -235,15 +235,7 @@
size_t KIID::Hash() const
{
- size_t hash = 0;
-
- // Note: this is NOT little-endian/big-endian safe, but as long as it's just used
- // at runtime it won't matter.
-
- for( int i = 0; i < 4; ++i )
- boost::hash_combine( hash, reinterpret_cast<const uint32_t*>( m_uuid.data )[i] );
-
- return hash;
+ return boost::uuids::hash_value( m_uuid );
}
@@ -0,0 +1,27 @@
diff '--color=auto' -ur kicad-8.0.5.orig/kicad/project_tree_pane.cpp kicad-8.0.5/kicad/project_tree_pane.cpp
--- kicad-8.0.5.orig/kicad/project_tree_pane.cpp 2024-09-06 18:28:40.000000000 +0200
+++ kicad-8.0.5/kicad/project_tree_pane.cpp 2024-11-05 12:20:14.524026741 +0100
@@ -2240,12 +2240,19 @@
}
git_oid oid;
- // Check if the libgit2 library version is 1.8.0 or higher
-#if( LIBGIT2_VER_MAJOR > 1 ) || ( LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR >= 8 )
- // For libgit2 version 1.8.0 and above
+
+#if ( ( LIBGIT2_VER_MAJOR == 1 \
+ && ( ( LIBGIT2_VER_MINOR == 8 \
+ && ( LIBGIT2_VER_REVISION < 2 || LIBGIT2_VER_REVISION == 3 ) ) \
+ || ( LIBGIT2_VER_MINOR > 8 ) ) ) \
+ || LIBGIT2_VER_MAJOR > 1 )
+ // For libgit2 versions 1.8.0, 1.8.1.
+ // This change was reverted for 1.8.2
+ // This change was re-reverted for 1.8.3
+ // This change was re-re-reverted for 1.8.4+
git_commit* const parents[1] = { parent };
#else
- // For libgit2 versions older than 1.8.0
+ // For libgit2 versions older than 1.8.0, or equal to 1.8.2/1.8.4
const git_commit* parents[1] = { parent };
#endif
+189
View File
@@ -0,0 +1,189 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
WX_GTK_VER="3.2-gtk3"
inherit check-reqs cmake flag-o-matic optfeature python-single-r1 toolchain-funcs wxwidgets xdg-utils
DESCRIPTION="Electronic Schematic and PCB design tools"
HOMEPAGE="https://www.kicad.org"
if [[ ${PV} == *9999* ]]; then
EGIT_REPO_URI="https://gitlab.com/kicad/code/kicad.git"
inherit git-r3
else
MY_PV="${PV/_rc/-rc}"
MY_P="${PN}-${MY_PV}"
SRC_URI="https://gitlab.com/kicad/code/${PN}/-/archive/${MY_PV}/${MY_P}.tar.bz2 -> ${P}.tar.bz2"
S="${WORKDIR}/${PN}-${MY_PV}"
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
fi
fi
# BSD for bundled pybind
LICENSE="GPL-2+ GPL-3+ Boost-1.0 BSD"
SLOT="0"
IUSE="doc examples nls openmp test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
# Contains bundled pybind but it's patched for wx
# See https://gitlab.com/kicad/code/kicad/-/commit/74e4370a9b146b21883d6a2d1df46c7a10bd0424
# Depend on opencascade:0 to get unslotted variant (so we know path to it), bug #833301
# Depend wxGTK version needs to be limited due to switch from EGL to GLX, bug #911120
COMMON_DEPEND="
app-crypt/libsecret
dev-db/unixODBC
dev-libs/boost:=[context,nls]
dev-libs/libgit2:=
media-libs/freeglut
media-libs/glew:0=
>=media-libs/glm-0.9.9.1
media-libs/mesa[X(+)]
net-misc/curl
>=sci-libs/opencascade-7.5.0:0=
>=x11-libs/cairo-1.8.8:=
>=x11-libs/pixman-0.30
>sci-electronics/ngspice-27[shared]
sys-libs/zlib
>=x11-libs/wxGTK-3.2.2.1-r3:${WX_GTK_VER}[X,opengl]
$(python_gen_cond_dep '
dev-libs/boost:=[context,nls,python,${PYTHON_USEDEP}]
>=dev-python/wxpython-4.2.0:*[${PYTHON_USEDEP}]
')
${PYTHON_DEPS}
nls? (
sys-devel/gettext
)
test? (
media-gfx/cairosvg
)
"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}
sci-electronics/electronics-menu
"
BDEPEND=">=dev-lang/swig-4.0
doc? ( app-text/doxygen )"
if [[ ${PV} == 9999 ]] ; then
# x11-misc-util/macros only required on live ebuilds
BDEPEND+=" >=x11-misc/util-macros-1.18"
fi
CHECKREQS_DISK_BUILD="1500M"
PATCHES=(
"${FILESDIR}/${P}"-boost-1.86.patch
"${FILESDIR}/${P}"-libgit2-1.8.4.patch
)
pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
python-single-r1_pkg_setup
check-reqs_pkg_setup
}
src_unpack() {
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
else
default_src_unpack
fi
}
src_prepare() {
filter-lto # Bug 927482
cmake_src_prepare
}
src_configure() {
xdg_environment_reset
local mycmakeargs=(
-DKICAD_DOCS="${EPREFIX}/usr/share/doc/${PN}-doc-${PV}"
-DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_USE_EGL=OFF
-DKICAD_BUILD_I18N="$(usex nls)"
-DKICAD_I18N_UNIX_STRICT_PATH="$(usex nls)"
-DPYTHON_DEST="$(python_get_sitedir)"
-DPYTHON_EXECUTABLE="${PYTHON}"
-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-DPYTHON_LIBRARY="$(python_get_library_path)"
-DKICAD_INSTALL_DEMOS="$(usex examples)"
-DCMAKE_SKIP_RPATH="ON"
-DOCC_INCLUDE_DIR="${CASROOT}"/include/opencascade
-DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)/opencascade
-DKICAD_SPICE_QA="$(usex test)"
-DKICAD_BUILD_QA_TESTS="$(usex test)"
)
setup-wxwidgets
cmake_src_configure
}
src_compile() {
cmake_src_compile
if use doc; then
cmake_src_compile doxygen-docs
fi
}
src_test() {
# Test cannot find library in Portage's sandbox. Let's create a link so test can run.
mkdir -p "${BUILD_DIR}/qa/eeschema/" || die
ln -s "${BUILD_DIR}/eeschema/_eeschema.kiface" "${BUILD_DIR}/qa/eeschema/_eeschema.kiface" || die
export CMAKE_SKIP_TESTS=(
qa_cli
)
# LD_LIBRARY_PATH is there to help it pick up the just-built libraries
LD_LIBRARY_PATH="${BUILD_DIR}/common:${BUILD_DIR}/common/gal:${BUILD_DIR}/3d-viewer/3d_cache/sg:${LD_LIBRARY_PATH}" \
cmake_src_test
}
src_install() {
cmake_src_install
python_optimize
dodoc doxygen/eagle-plugin-notes.txt
if use doc ; then
cd doxygen || die
dodoc -r out/html/.
fi
}
pkg_postinst() {
optfeature "Component symbols library" sci-electronics/kicad-symbols
optfeature "Component footprints library" sci-electronics/kicad-footprints
optfeature "3D models of components " sci-electronics/kicad-packages3d
optfeature "Project templates" sci-electronics/kicad-templates
optfeature "Extended documentation" app-doc/kicad-doc
optfeature "Creating 3D models of components" media-gfx/wings
xdg_desktop_database_update
xdg_mimeinfo_database_update
xdg_icon_cache_update
}
pkg_postrm() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
xdg_icon_cache_update
}