Skip to content

Commit 214c416

Browse files
committed
Added patch for build libxslt 1.1.34
1 parent 7850c44 commit 214c416

File tree

3 files changed

+75
-1
lines changed

3 files changed

+75
-1
lines changed

build/helpers/dependencies.cmd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,13 @@ wget -c http://repo.postgrespro.ru/depends/libxslt-%XSLT_VER%.tar.gz -O libxslt-
210210
rm -rf %DEPENDENCIES_BIN_DIR%\libxslt %DEPENDENCIES_SRC_DIR%\libxslt-*
211211
MKDIR %DEPENDENCIES_BIN_DIR%\libxslt
212212
tar xf libxslt-%XSLT_VER%.tar.gz -C %DEPENDENCIES_SRC_UDIR% || GOTO :ERROR
213+
214+
IF EXIST %ROOT%/patches/libxslt/libxslt-%XSLT_VER%.patch (
215+
CD /D %DEPENDENCIES_SRC_DIR%\libxslt-%XSLT_VER%*
216+
cp -v %ROOT%/patches/libxslt/libxslt-%XSLT_VER%.patch libxslt.patch
217+
patch -f -p1 < libxslt.patch || GOTO :ERROR
218+
)
219+
213220
CD /D %DEPENDENCIES_SRC_DIR%\libxslt-*\win32
214221
cscript configure.js compiler=msvc zlib=yes iconv=yes include=%DEPENDENCIES_BIN_DIR%\iconv\include;%DEPENDENCIES_BIN_DIR%\libxml2\include;%DEPENDENCIES_BIN_DIR%\zlib\include lib=%DEPENDENCIES_BIN_DIR%\iconv\lib;%DEPENDENCIES_BIN_DIR%\libxml2\lib;%DEPENDENCIES_BIN_DIR%\zlib\lib
215222
sed -i /NOWIN98/d Makefile.msvc

build/helpers/setvars.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
REM LIBRARY VERSIONS
22
SET ICONV_VER=1.16
3-
SET XSLT_VER=1.1.32
3+
SET XSLT_VER=1.1.34
44
SET ZLIB_VER=1.2.11
55
SET XML_VER=2.9.9
66
rem SET OPENSSL_VER=1.0.2n

patches/libxslt/libxslt-1.1.34.patch

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
commit e2584eed1c84c18f16e42188c30d2c3d8e3e8853
2+
Author: Chun-wei Fan <fanchunwei@src.gnome.org>
3+
Date: Tue Nov 12 17:37:05 2019 +0800
4+
5+
win32: Add configuration for profiler
6+
7+
Without this the generated xsltconfig.h will not be complete as there
8+
will be a configuration variable that is left in the header, breaking
9+
builds.
10+
11+
This will allow one to enable or disable profiler support in Windows
12+
builds, and the default is to enable this.
13+
14+
diff --git a/win32/configure.js b/win32/configure.js
15+
index 56694cce..12c99f30 100644
16+
--- a/win32/configure.js
17+
+++ b/win32/configure.js
18+
@@ -47,6 +47,7 @@ var withIconv = true;
19+
var withZlib = false;
20+
var withCrypto = true;
21+
var withModules = false;
22+
+var withProfiler = true;
23+
/* Win32 build options. */
24+
var dirSep = "\\";
25+
var compiler = "msvc";
26+
@@ -106,6 +107,7 @@ function usage()
27+
txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + ")\n";
28+
txt += " crypto: Enable Crypto support (" + (withCrypto? "yes" : "no") + ")\n";
29+
txt += " modules: Enable Module support (" + (withModules? "yes" : "no") + ")\n";
30+
+ txt += " profiler: Enable Profiler support (" + (withProfiler? "yes" : "no") + ")\n";
31+
txt += "\nWin32 build options, default value given in parentheses:\n\n";
32+
txt += " compiler: Compiler to be used [msvc|mingw] (" + compiler + ")\n";
33+
txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n";
34+
@@ -192,6 +194,7 @@ function discoverVersion()
35+
vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
36+
vf.WriteLine("WITH_CRYPTO=" + (withCrypto? "1" : "0"));
37+
vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0"));
38+
+ vf.WriteLine("WITH_PROFILER=" + (withProfiler? "1" : "0"));
39+
vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0"));
40+
vf.WriteLine("STATIC=" + (buildStatic? "1" : "0"));
41+
vf.WriteLine("PREFIX=" + buildPrefix);
42+
@@ -240,6 +243,8 @@ function configureXslt()
43+
of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, withDebugger? "1" : "0"));
44+
} else if (s.search(/\@WITH_MODULES\@/) != -1) {
45+
of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules? "1" : "0"));
46+
+ } else if (s.search(/\@WITH_PROFILER\@/) != -1) {
47+
+ of.WriteLine(s.replace(/\@WITH_PROFILER\@/, withProfiler? "1" : "0"));
48+
} else if (s.search(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/) != -1) {
49+
of.WriteLine(s.replace(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/, "NULL"));
50+
} else
51+
@@ -343,6 +348,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
52+
withCrypto = strToBool(arg.substring(opt.length + 1, arg.length));
53+
else if (opt == "modules")
54+
withModules = strToBool(arg.substring(opt.length + 1, arg.length));
55+
+ else if (opt == "profiler")
56+
+ withProfiler = strToBool(arg.substring(opt.length + 1, arg.length));
57+
else if (opt == "compiler")
58+
compiler = arg.substring(opt.length + 1, arg.length);
59+
else if (opt == "cruntime")
60+
@@ -477,6 +484,7 @@ txtOut += " Use iconv: " + boolToStr(withIconv) + "\n";
61+
txtOut += " With zlib: " + boolToStr(withZlib) + "\n";
62+
txtOut += " Crypto: " + boolToStr(withCrypto) + "\n";
63+
txtOut += " Modules: " + boolToStr(withModules) + "\n";
64+
+txtOut += " Profiler: " + boolToStr(withProfiler) + "\n";
65+
txtOut += "\n";
66+
txtOut += "Win32 build configuration\n";
67+
txtOut += "-------------------------\n";

0 commit comments

Comments
 (0)