aports/community/ruby-rugged/02-extconf-version-check-string.patch
2025-02-24 13:05:51 +00:00

27 lines
970 B
Diff

--- a/ext/rugged/extconf.rb
+++ b/ext/rugged/extconf.rb
@@ -71,12 +71,12 @@
major = minor = nil
File.readlines(File.join("/usr", "include", "git2", "version.h")).each do |line|
- if !major && (matches = line.match(/^#define LIBGIT2_VER_MAJOR\s+([0-9]+)$/))
+ if !major && (matches = line.match(/^#define LIBGIT2_VERSION_MAJOR\s+([0-9]+)$/))
major = matches[1]
next
end
- if !minor && (matches = line.match(/^#define LIBGIT2_VER_MINOR\s+([0-9]+)$/))
+ if !minor && (matches = line.match(/^#define LIBGIT2_VERSION_MINOR\s+([0-9]+)$/))
minor = matches[1]
next
end
@@ -87,7 +87,7 @@
try_compile(<<-SRC) or abort "libgit2 version is not compatible, expected ~> #{major}.#{minor}.0"
#include <git2/version.h>
-#if LIBGIT2_VER_MAJOR != #{major} || LIBGIT2_VER_MINOR != #{minor}
+#if LIBGIT2_VERSION_MAJOR != #{major} || LIBGIT2_VERSION_MINOR != #{minor}
#error libgit2 version is not compatible
#endif
SRC