Accepting request 1219071 from electronics

OBS-URL: https://build.opensuse.org/request/show/1219071
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kicad?expand=0&rev=69
This commit is contained in:
Dominique Leuenberger 2024-10-30 16:34:34 +00:00 committed by Git OBS Bridge
commit c9eea2371f
3 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,38 @@
From 75c2f17b42fd203f2f255adf16ca6b723631d2f1 Mon Sep 17 00:00:00 2001
From: JamesJCode <13408010-JamesJCode@users.noreply.gitlab.com>
Date: Mon, 28 Oct 2024 20:25:32 +0000
Subject: [PATCH] Fix libgit integration for version >= 1.8.3
The API continues to change...
---
kicad/project_tree_pane.cpp | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/kicad/project_tree_pane.cpp b/kicad/project_tree_pane.cpp
index 1b3cd2175c4..5bf388bffff 100644
--- a/kicad/project_tree_pane.cpp
+++ b/kicad/project_tree_pane.cpp
@@ -2310,12 +2310,17 @@ void PROJECT_TREE_PANE::onGitCommit( wxCommandEvent& aEvent )
git_oid oid;
-#if( LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 8 && LIBGIT2_VER_REVISION < 2 )
+#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 reverted for 1.8.2
+ // This change was re-reverted for 1.8.3+
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
const git_commit* parents[1] = { parent };
#endif
--
GitLab

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Oct 29 13:50:00 UTC 2024 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Fix build with libgit2 >= 1.8.3, a previous API break was
reverted, add:
* fix_libgit2_API_breakage.patch
-------------------------------------------------------------------
Tue Oct 22 15:40:07 UTC 2024 - Stefan Brüns <stefan.bruens@rwth-aachen.de>

View File

@ -28,6 +28,8 @@ 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/75c2f17b42fd203f2f255adf16ca6b723631d2f1.patch#/fix_libgit2_API_breakage.patch
BuildRequires: cmake >= 3.16
BuildRequires: fdupes