diff options
author | Huang Rui <vowstar@gmail.com> | 2024-03-22 19:22:21 +0800 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2024-03-27 11:41:10 +0000 |
commit | ded5389f065b99454f2478b9559bf3a6dc43247f (patch) | |
tree | f4990b2e50fef4d98dd2cf9d28fc927f11f47519 /sci-electronics | |
parent | dev-util/bugbite-cli: fix description (diff) | |
download | gentoo-ded5389f065b99454f2478b9559bf3a6dc43247f.tar.gz gentoo-ded5389f065b99454f2478b9559bf3a6dc43247f.tar.bz2 gentoo-ded5389f065b99454f2478b9559bf3a6dc43247f.zip |
sci-electronics/kicad: fix build error with libgit2-1.8.0
See also: https://gitlab.com/kicad/code/kicad/-/issues/17536
Closes: https://bugs.gentoo.org/927503
Closes: https://github.com/gentoo/gentoo/pull/35865
Signed-off-by: Huang Rui <vowstar@gmail.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'sci-electronics')
-rw-r--r-- | sci-electronics/kicad/files/kicad-8.0.1-libgit2.patch | 36 | ||||
-rw-r--r-- | sci-electronics/kicad/kicad-8.0.0.ebuild | 4 | ||||
-rw-r--r-- | sci-electronics/kicad/kicad-8.0.1.ebuild | 4 |
3 files changed, 44 insertions, 0 deletions
diff --git a/sci-electronics/kicad/files/kicad-8.0.1-libgit2.patch b/sci-electronics/kicad/files/kicad-8.0.1-libgit2.patch new file mode 100644 index 000000000000..d2523993e6fe --- /dev/null +++ b/sci-electronics/kicad/files/kicad-8.0.1-libgit2.patch @@ -0,0 +1,36 @@ +From: Huang Rui <vowstar@gmail.com> +Date: Fri, 22 Mar 2024 18:18:40 +0800 +Subject: [PATCH] libgit2-1.8.0 compatibility: adjusted parent pointer type + +- Adjusted parent pointer type in git_commit_create call for compatibility + with libgit2 1.8.0 and above. +- Included preprocessor checks to maintain support for versions older than + 1.8.0. +- Ensures consistent function behavior across different libgit2 versions. + +Fixes https://gitlab.com/kicad/code/kicad/-/issues/17536 +Signed-off-by: Huang Rui <vowstar@gmail.com> +--- + kicad/project_tree_pane.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/kicad/project_tree_pane.cpp ++++ b/kicad/project_tree_pane.cpp +@@ -2233,7 +2233,14 @@ 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 ++ git_commit* const parents[1] = { parent }; ++#else ++ // For libgit2 versions older than 1.8.0 + const git_commit* parents[1] = { parent }; ++#endif + + if( git_commit_create( &oid, repo, "HEAD", author, author, nullptr, commit_msg.mb_str(), tree, + 1, parents ) != 0 ) +-- +2.44.0 + diff --git a/sci-electronics/kicad/kicad-8.0.0.ebuild b/sci-electronics/kicad/kicad-8.0.0.ebuild index 8c9a6b4dc5eb..96b4a708d332 100644 --- a/sci-electronics/kicad/kicad-8.0.0.ebuild +++ b/sci-electronics/kicad/kicad-8.0.0.ebuild @@ -81,6 +81,10 @@ fi CHECKREQS_DISK_BUILD="1500M" +PATCHES=( + "${FILESDIR}"/${PN}-8.0.1-libgit2.patch +) + pkg_setup() { [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp diff --git a/sci-electronics/kicad/kicad-8.0.1.ebuild b/sci-electronics/kicad/kicad-8.0.1.ebuild index 8c9a6b4dc5eb..96b4a708d332 100644 --- a/sci-electronics/kicad/kicad-8.0.1.ebuild +++ b/sci-electronics/kicad/kicad-8.0.1.ebuild @@ -81,6 +81,10 @@ fi CHECKREQS_DISK_BUILD="1500M" +PATCHES=( + "${FILESDIR}"/${PN}-8.0.1-libgit2.patch +) + pkg_setup() { [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |