1 diff -ruN a/ext/rugged/extconf.rb b/ext/rugged/extconf.rb
2 --- a/ext/rugged/extconf.rb 2023-03-17 12:08:41.000000000 +0100
3 +++ b/ext/rugged/extconf.rb 2023-03-28 21:08:17.593554575 +0200
6 if arg_config("--use-system-libraries", !!ENV['RUGGED_USE_SYSTEM_LIBRARIES'])
7 puts "Building Rugged using system libraries.\n"
9 - dir_config('git2').any? or pkg_config('libgit2')
13 - File.readlines(File.join(LIBGIT2_DIR, "include", "git2", "version.h")).each do |line|
14 - if !major && (matches = line.match(/^#define LIBGIT2_VER_MAJOR\s+([0-9]+)$/))
19 - if !minor && (matches = line.match(/^#define LIBGIT2_VER_MINOR\s+([0-9]+)$/))
24 - break if major && minor
27 - try_compile(<<-SRC) or abort "libgit2 version is not compatible, expected ~> #{major}.#{minor}.0"
28 -#include <git2/version.h>
30 -#if LIBGIT2_VER_MAJOR != #{major} || LIBGIT2_VER_MINOR != #{minor}
31 -#error libgit2 version is not compatible
35 if !find_executable('cmake')
36 abort "ERROR: CMake is required to build Rugged."