Accepting request 1203720 from electronics
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/1203720 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kicad?expand=0&rev=67
This commit is contained in:
commit
f0b4f5f789
47
fix_bad_cast_boost_1_86.patch
Normal file
47
fix_bad_cast_boost_1_86.patch
Normal file
@ -0,0 +1,47 @@
|
||||
From 9fdd825681fb5c639470f8a68f1bf4cf73cc5cd1 Mon Sep 17 00:00:00 2001
|
||||
From: John Beard <john.j.beard@gmail.com>
|
||||
Date: Sat, 7 Sep 2024 16:13:42 +0100
|
||||
Subject: [PATCH] KIID: Use Boost uuids own hash function (fix Boost 1.86)
|
||||
|
||||
Not only is this simpler, but it should be compatible
|
||||
with all Boost versions (the cast is a problem in 1.86)
|
||||
and it was also 'improved' in 1.86 for better mixing.
|
||||
|
||||
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18651
|
||||
(cherry picked from commit 9a3ebfba404e43d82b5c194e01f6afb67909bf88)
|
||||
---
|
||||
common/kiid.cpp | 11 +----------
|
||||
1 file changed, 1 insertion(+), 10 deletions(-)
|
||||
|
||||
diff --git a/common/kiid.cpp b/common/kiid.cpp
|
||||
index 80aea3e55da..81266cbd226 100644
|
||||
--- a/common/kiid.cpp
|
||||
+++ b/common/kiid.cpp
|
||||
@@ -28,7 +28,6 @@
|
||||
#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>
|
||||
@@ -236,15 +235,7 @@ timestamp_t KIID::AsLegacyTimestamp() const
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
29
fix_boost_1_86_compat.patch
Normal file
29
fix_boost_1_86_compat.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From f4f9513f808fae515acf8253269a4eec9a667cd5 Mon Sep 17 00:00:00 2001
|
||||
From: Ian McInerney <ian.s.mcinerney@ieee.org>
|
||||
Date: Tue, 27 Aug 2024 11:49:28 +0100
|
||||
Subject: [PATCH] Fix compilation with Boost 1.86
|
||||
|
||||
Boost 1.86 removed the boost::random dependency from boost::uuid, so
|
||||
we need to include those headers on our own now to use the random
|
||||
mersenne twister implementation.
|
||||
|
||||
(cherry picked from commit a9e115925a5168034f60d0fe1e7b369861f84b82)
|
||||
---
|
||||
common/kiid.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/common/kiid.cpp b/common/kiid.cpp
|
||||
index 4c7e8eb18cd..80aea3e55da 100644
|
||||
--- a/common/kiid.cpp
|
||||
+++ b/common/kiid.cpp
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#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>
|
||||
--
|
||||
GitLab
|
||||
|
57
fix_boost_1_86_sha1_detail.patch
Normal file
57
fix_boost_1_86_sha1_detail.patch
Normal file
@ -0,0 +1,57 @@
|
||||
diff --git a/3d-viewer/3d_cache/3d_cache.cpp b/3d-viewer/3d_cache/3d_cache.cpp
|
||||
index 33c04d0..1abc22c 100644
|
||||
--- a/3d-viewer/3d_cache/3d_cache.cpp
|
||||
+++ b/3d-viewer/3d_cache/3d_cache.cpp
|
||||
@@ -345,7 +345,7 @@ SCENEGRAPH* S3D_CACHE::checkCache( const wxString& aFileName, S3D_CACHE_ENTRY**
|
||||
}
|
||||
|
||||
|
||||
-bool S3D_CACHE::getSHA1( const wxString& aFileName, unsigned char* aSHA1Sum )
|
||||
+bool S3D_CACHE::getSHA1( const wxString& aFileName, unsigned char (&aSHA1Sum)[20] )
|
||||
{
|
||||
if( aFileName.empty() )
|
||||
{
|
||||
@@ -380,22 +380,7 @@ bool S3D_CACHE::getSHA1( const wxString& aFileName, unsigned char* aSHA1Sum )
|
||||
dblock.process_bytes( block, bsize );
|
||||
|
||||
fclose( fp );
|
||||
- unsigned int digest[5];
|
||||
- dblock.get_digest( digest );
|
||||
-
|
||||
- // ensure MSB order
|
||||
- for( int i = 0; i < 5; ++i )
|
||||
- {
|
||||
- int idx = i << 2;
|
||||
- unsigned int tmp = digest[i];
|
||||
- aSHA1Sum[idx+3] = tmp & 0xff;
|
||||
- tmp >>= 8;
|
||||
- aSHA1Sum[idx+2] = tmp & 0xff;
|
||||
- tmp >>= 8;
|
||||
- aSHA1Sum[idx+1] = tmp & 0xff;
|
||||
- tmp >>= 8;
|
||||
- aSHA1Sum[idx] = tmp & 0xff;
|
||||
- }
|
||||
+ dblock.get_digest( aSHA1Sum );
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -696,4 +681,4 @@ void S3D_CACHE::CleanCacheDir( int aNumDaysOld )
|
||||
}
|
||||
}
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/3d-viewer/3d_cache/3d_cache.h b/3d-viewer/3d_cache/3d_cache.h
|
||||
index 4abc62e..fd5076e 100644
|
||||
--- a/3d-viewer/3d_cache/3d_cache.h
|
||||
+++ b/3d-viewer/3d_cache/3d_cache.h
|
||||
@@ -156,7 +156,7 @@ private:
|
||||
* @param aSHA1Sum a 20 byte character array to hold the SHA1 hash.
|
||||
* @return true on success, otherwise false.
|
||||
*/
|
||||
- bool getSHA1( const wxString& aFileName, unsigned char* aSHA1Sum );
|
||||
+ bool getSHA1( const wxString& aFileName, unsigned char (&aSHA1Sum)[20] );
|
||||
|
||||
// load scene data from a cache file
|
||||
bool loadCacheData( S3D_CACHE_ENTRY* aCacheItem );
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c61b02011c1a56c40c8eaf8d2685a346789c99b25cc6d0434e5cbc1c03e2bba0
|
||||
size 72958676
|
3
kicad-8.0.5.tar.bz2
Normal file
3
kicad-8.0.5.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:04e539d2b48957d2808fdf57274557021391e622f963b5cd8840b8331ee91b99
|
||||
size 72957862
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 18 10:28:24 UTC 2024 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- update to 8.0.5:
|
||||
See https://www.kicad.org/blog/2024/09/KiCad-8.0.5-Release/ for details
|
||||
- Fix compilation with Boost 1.86:
|
||||
* fix_boost_1_86_compat.patch
|
||||
* fix_bad_cast_boost_1_86.patch
|
||||
* fix_boost_1_86_sha1_detail.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 29 08:21:59 UTC 2024 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
|
10
kicad.spec
10
kicad.spec
@ -20,14 +20,20 @@
|
||||
# symbol libraries from version 8.0.0
|
||||
%define compatversion 8.0.0
|
||||
Name: kicad
|
||||
Version: 8.0.4
|
||||
%define file_version 8.0.4
|
||||
Version: 8.0.5
|
||||
%define file_version 8.0.5
|
||||
Release: 0
|
||||
Summary: EDA software suite for the creation of schematics and PCB
|
||||
License: AGPL-3.0-or-later AND GPL-3.0-or-later
|
||||
Group: Productivity/Scientific/Electronics
|
||||
URL: https://www.kicad.org
|
||||
Source: https://gitlab.com/kicad/code/kicad/-/archive/%{file_version}/kicad-%{file_version}.tar.bz2
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch0: https://gitlab.com/kicad/code/kicad/-/commit/f4f9513f808fae515acf8253269a4eec9a667cd5.patch#/fix_boost_1_86_compat.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch1: https://gitlab.com/kicad/code/kicad/-/commit/9fdd825681fb5c639470f8a68f1bf4cf73cc5cd1.patch#/fix_bad_cast_boost_1_86.patch
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch2: fix_boost_1_86_sha1_detail.patch
|
||||
|
||||
BuildRequires: cmake >= 3.16
|
||||
BuildRequires: fdupes
|
||||
|
Loading…
Reference in New Issue
Block a user