upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / ruby-rugged / trunk / ruby-rugged-1.6.2-remove_broken_libgit2_detection.patch
blob1b3eef6b70ff93432628469095c1e8c7d36c2ae6
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
4 @@ -65,32 +65,6 @@
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')
11 - major = minor = nil
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]+)$/))
15 - major = matches[1]
16 - next
17 - end
19 - if !minor && (matches = line.match(/^#define LIBGIT2_VER_MINOR\s+([0-9]+)$/))
20 - minor = matches[1]
21 - next
22 - end
24 - break if major && minor
25 - end
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
32 -#endif
33 - SRC
34 else
35 if !find_executable('cmake')
36 abort "ERROR: CMake is required to build Rugged."