ayaports/user/ruby3.0-rugged/fix-extconf-version-check.patch

22 lines
867 B
Diff
Raw Normal View History

2023-03-10 05:36:54 +00:00
diff --git a/ext/rugged/extconf.rb b/ext/rugged/extconf.rb
index 47d13a6..92251e3 100644
--- a/ext/rugged/extconf.rb
+++ b/ext/rugged/extconf.rb
@@ -70,13 +70,13 @@ if arg_config("--use-system-libraries", !!ENV['RUGGED_USE_SYSTEM_LIBRARIES'])
major = minor = nil
- File.readlines(File.join(LIBGIT2_DIR, "include", "git2", "version.h")).each do |line|
- if !major && (matches = line.match(/^#define LIBGIT2_VER_MAJOR ([0-9]+)$/))
+ File.readlines(File.join("/usr", "include", "git2", "version.h")).each do |line|
+ if !major && (matches = line.match(/^#define LIBGIT2_VER_MAJOR\s+([0-9]+)$/))
major = matches[1]
next
end
- if !minor && (matches = line.match(/^#define LIBGIT2_VER_MINOR ([0-9]+)$/))
+ if !minor && (matches = line.match(/^#define LIBGIT2_VER_MINOR\s+([0-9]+)$/))
minor = matches[1]
next
end