[libxml2] Fix version parsing in win32/configure.js
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix version parsing in win32/configure.js
- Date: Mon, 21 Sep 2020 08:57:25 +0000 (UTC)
commit 5614c0785470e906eb5fcffad10c6032e56ff31d
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Mon Sep 21 10:55:45 2020 +0200
Fix version parsing in win32/configure.js
Adjust to configure.ac changes.
Should fix #185.
win32/configure.js | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/win32/configure.js b/win32/configure.js
index e2ab31da2..3d407b8e2 100644
--- a/win32/configure.js
+++ b/win32/configure.js
@@ -208,15 +208,15 @@ function discoverVersion()
while (cf.AtEndOfStream != true) {
ln = cf.ReadLine();
s = new String(ln);
- if (s.search(/^LIBXML_MAJOR_VERSION=/) != -1) {
- vf.WriteLine(s);
- verMajor = s.substring(s.indexOf("=") + 1, s.length);
- } else if(s.search(/^LIBXML_MINOR_VERSION=/) != -1) {
- vf.WriteLine(s);
- verMinor = s.substring(s.indexOf("=") + 1, s.length);
- } else if(s.search(/^LIBXML_MICRO_VERSION=/) != -1) {
- vf.WriteLine(s);
- verMicro = s.substring(s.indexOf("=") + 1, s.length);
+ if (m = s.match(/^m4_define\(\[MAJOR_VERSION\], (\w+)\)/)) {
+ vf.WriteLine("LIBXSLT_MAJOR_VERSION=" + m[1]);
+ verMajor = m[1];
+ } else if(m = s.match(/^m4_define\(\[MINOR_VERSION\], (\w+)\)/)) {
+ vf.WriteLine("LIBXSLT_MINOR_VERSION=" + m[1]);
+ verMinor = m[1];
+ } else if(m = s.match(/^m4_define\(\[MICRO_VERSION\], (\w+)\)/)) {
+ vf.WriteLine("LIBXSLT_MICRO_VERSION=" + m[1]);
+ verMicro = m[1];
} else if(s.search(/^LIBXML_MICRO_VERSION_SUFFIX=/) != -1) {
vf.WriteLine(s);
verMicroSuffix = s.substring(s.indexOf("=") + 1, s.length);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]