void-packages/srcpkgs/Fritzing/patches/libgit2.patch

21 lines
1.0 KiB
Diff

make compatible with libgit2 >= 0.24.0
https://github.com/fritzing/fritzing-app/commit/4cb5185d464bf98e9da5ceca72d5af907ff824ef
https://github.com/fritzing/fritzing-app/commit/472951243d70eeb40a53b1f7e16e6eab0588d079
--- a/app/src/version/partschecker.cpp 2016-06-01 21:48:27.000000000 +0200
+++ b/app/src/version/partschecker.cpp 2018-01-13 11:30:34.895137270 +0100
@@ -121,7 +121,13 @@
/**
* Connect to the remote.
*/
+#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR > 24)
+ error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL);
+#elif LIBGIT2_VER_MINOR == 24
+ error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL);
+#else
error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks);
+#endif
if (error) {
partsCheckerResult.partsCheckerError = PARTS_CHECKER_ERROR_REMOTE;
partsCheckerResult.errorMessage = QObject::tr("Unable to access network site for '%1'. %2").arg(repoPath).arg(sBoilerPlate1);