blob: 7b29fc49b4dd70b05f652f3aa5e419f06e8f364a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
$NetBSD: patch-ext_rugged_extconf.rb,v 1.1 2022/09/03 15:06:52 taca Exp $
More general match.
--- ext/rugged/extconf.rb.orig 2022-07-30 14:13:40.613688545 +0000
+++ ext/rugged/extconf.rb
@@ -71,12 +71,12 @@ if arg_config("--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]+)$/))
+ if !major && (matches = line.match(/^#define LIBGIT2_VER_MAJOR[ \t]+([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[ \t]+([0-9]+)$/))
minor = matches[1]
next
end
|