commit 47edb1a661f03ef4f624de02c87e356146c72360 Author: Jan Palus <at...@pld-linux.org> Date: Thu Dec 12 14:22:34 2024 +0100
upstream fixes for libgit2 1.8.x kicad.spec | 2 + libgit2-1.8.patch | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+) --- diff --git a/kicad.spec b/kicad.spec index f1a176c..7b9a977 100644 --- a/kicad.spec +++ b/kicad.spec @@ -29,6 +29,7 @@ Source5: https://gitlab.com/kicad/libraries/kicad-packages3D/-/archive/%{version # Source5-md5: d6e3242a55c5c28699b50cd4f85e191c Source6: https://gitlab.com/kicad/libraries/kicad-templates/-/archive/%{version}/%{name}-templates-%{version}.tar.bz2 # Source6-md5: 20932897d55d49386a1e2431a2aeef5f +Patch0: libgit2-1.8.patch URL: http://www.kicad.org/ BuildRequires: EGL-devel BuildRequires: GLM-devel >= 0.9.9.4 @@ -224,6 +225,7 @@ Documentation and tutorials for Kicad in Chinese. %prep %setup -q -a 1 -a 3 -a 4 %{?with_packages3D:-a 5} -a 6 +%patch -P 0 -p1 %ifarch x32 # fails on x32 diff --git a/libgit2-1.8.patch b/libgit2-1.8.patch new file mode 100644 index 0000000..98005e6 --- /dev/null +++ b/libgit2-1.8.patch @@ -0,0 +1,178 @@ +From 74e15a3fc29085d489028505dc5946d37535779b Mon Sep 17 00:00:00 2001 +From: Alex Shvartzkop <dudesuchamaz...@gmail.com> +Date: Mon, 7 Oct 2024 17:11:38 +0300 +Subject: [PATCH] Support libgit 1.8.2+ + +In v1.8.2-rc1, the type change introduced in v1.8.0 was reverted. + +See https://github.com/libgit2/libgit2/commit/49d3fadfca4ce8e7a643525eb301a2d45956641e +--- + kicad/project_tree_pane.cpp | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/kicad/project_tree_pane.cpp b/kicad/project_tree_pane.cpp +index 5701f79eda5..abae20d3833 100644 +--- a/kicad/project_tree_pane.cpp ++++ b/kicad/project_tree_pane.cpp +@@ -2304,9 +2304,12 @@ void PROJECT_TREE_PANE::onGitCommit( wxCommandEvent& aEvent ) + } + + 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 == 0 || LIBGIT2_VER_REVISION == 1 ) ) ++ ++ // For libgit2 versions 1.8.0, 1.8.1. ++ // This change was reverted for 1.8.2+ + git_commit* const parents[1] = { parent }; + #else + // For libgit2 versions older than 1.8.0 +-- +GitLab + +From 4c196e14861ef08192a9d431ccb1c4955cba362c Mon Sep 17 00:00:00 2001 +From: Alex Shvartzkop <dudesuchamaz...@gmail.com> +Date: Mon, 7 Oct 2024 17:22:28 +0300 +Subject: [PATCH] Improve libgit2 check formatting. + +--- + kicad/project_tree_pane.cpp | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/kicad/project_tree_pane.cpp b/kicad/project_tree_pane.cpp +index abae20d3833..a1ab5a8d070 100644 +--- a/kicad/project_tree_pane.cpp ++++ b/kicad/project_tree_pane.cpp +@@ -2303,11 +2303,9 @@ void PROJECT_TREE_PANE::onGitCommit( wxCommandEvent& aEvent ) + return; + } + +- git_oid oid; +- +-#if( LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 8 \ +- && ( LIBGIT2_VER_REVISION == 0 || LIBGIT2_VER_REVISION == 1 ) ) ++ git_oid oid; + ++#if( LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 8 && LIBGIT2_VER_REVISION < 2 ) + // For libgit2 versions 1.8.0, 1.8.1. + // This change was reverted for 1.8.2+ + git_commit* const parents[1] = { parent }; +-- +GitLab + +From 75c2f17b42fd203f2f255adf16ca6b723631d2f1 Mon Sep 17 00:00:00 2001 +From: JamesJCode <13408010-jamesjc...@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 + +From 9f579f787bc6b62ca456f87f92d8e96107b24206 Mon Sep 17 00:00:00 2001 +From: John Beard <john.j.be...@gmail.com> +Date: Tue, 5 Nov 2024 20:55:26 +0800 +Subject: [PATCH] Libgit2: the const git_commit* saga continues + +The change wasn't re-reverted in 1.8.3, it was just not +included. It was than _also_ reverted in 1.8.4, as it was for +1.8.2 (those two tags are on different branches - main and maint/v1.8). + +Hopefully, this means that we're done here, and v1.8.5 will also be +const-y, whether it is based on main or maint/v1.8. + +The current state of play: + +* 1.7.0 and older: const +* 1.8.0, 1.8.1: no const +* 1.8.2: const +* 1.8.3: no const +* 1.8.4: const +Future: +* 1.8.5/1.9.0: presumably/hopefully, const + +This is currently breaking at least Arch and Fedora Rawhide + +Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19062 +--- + kicad/project_tree_pane.cpp | 30 +++++++++++++++++++++--------- + 1 file changed, 21 insertions(+), 9 deletions(-) + +diff --git a/kicad/project_tree_pane.cpp b/kicad/project_tree_pane.cpp +index 5bf388bffff..002ad7d6de2 100644 +--- a/kicad/project_tree_pane.cpp ++++ b/kicad/project_tree_pane.cpp +@@ -2310,17 +2310,29 @@ void PROJECT_TREE_PANE::onGitCommit( wxCommandEvent& aEvent ) + + git_oid oid; + +-#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+ ++#if( LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 8 \ ++ && ( LIBGIT2_VER_REVISION < 2 || LIBGIT2_VER_REVISION == 3 ) ) ++ /* ++ * For libgit2 versions 1.8.0, 1.8.1. (cf19ddc52) ++ * This change was reverted for 1.8.2 (49d3fadfc, main branch) ++ * The revert for 1.8.2 was not included for 1.8.3 (which is on the maint/v1.8 branch, not main) ++ * This change was also reverted for 1.8.4 (94ba816f6, also maint/v1.8 branch) ++ * ++ * As of 1.8.4, the history is like this: ++ * ++ * * 3f4182d15 (tag: v1.8.4, maint/v1.8) ++ * * 94ba816f6 Revert "commit: fix const declaration" [puts const back] ++ * * 3353f78e8 (tag: v1.8.3) ++ * | * 4ce872a0f (tag: v1.8.2-rc1, tag: v1.8.2) ++ * | * 49d3fadfc Revert "commit: fix const declaration" [puts const back] ++ * |/ ++ * * 36f7e21ad (tag: v1.8.1) ++ * * d74d49148 (tag: v1.8.0) ++ * * cf19ddc52 commit: fix const declaration [removes const] ++ */ + git_commit* const parents[1] = { parent }; + #else +- // For libgit2 versions older than 1.8.0, or equal to 1.8.2 ++ // For libgit2 versions older than 1.8.0, or equal to 1.8.2, or 1.8.4+ + const git_commit* parents[1] = { parent }; + #endif + +-- +GitLab + ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/kicad.git/commitdiff/47edb1a661f03ef4f624de02c87e356146c72360 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit