Description: This patch makes the upstream source use the locally delivered
 libraries instead of the convenience copies of compatible libs included in
 the upstream tarball. Since libgit has not declared a stable interface, upstream
 didn't bother to make the code fall back to the system versions of the libs
 and rejected the respective issue.
Author: Marc Haber <mh+debian-packages@zugschlus.de>
Bug: https://github.com/jacquesg/p5-Git-Raw/issues/195
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -250,12 +250,7 @@ if ($Config{usethreads} && !$is_sunpro)
 my @deps = glob 'deps/libgit2/deps/{http-parser,zlib}/*.c';
 my @srcs = glob 'deps/libgit2/src/{*.c,transports/*.c,xdiff/*.c,streams/*.c}';
 
-if ($is_msvc) {
-	push @srcs, 'deps/libgit2/src/hash/hash_win32.c';
-}
-elsif (!$library_opts{'ssl'}{'use'} && !$is_osx) {
-	push @srcs, 'deps/libgit2/src/hash/hash_generic.c';
-}
+$lib .= ' -lgit2';
 
 # the system regex is broken on Solaris, not available on Windows
 if ($is_windows || $is_solaris) {
@@ -333,7 +328,7 @@ my %WriteMakefileArgs = (
     "Getopt::Long" => "2.35"
   },
   "DISTNAME" => "Git-Raw",
-  "INC" => "-I. -Ideps/libgit2 -Ideps/libgit2/src -Ideps/libgit2/include -Ideps/libgit2/deps/http-parser -Ideps/libgit2/deps/zlib",
+  "INC" => "-I. ",
   "LICENSE" => "perl",
   "MIN_PERL_VERSION" => "5.006",
   "NAME" => "Git::Raw",
