summary refs log tree commit diff stats
path: root/win32/ext/libxml-wdk
diff options
context:
space:
mode:
authorBerke Viktor <berkeviktor@aol.com>2011-12-11 14:29:37 +0100
committerBerke Viktor <berkeviktor@aol.com>2011-12-11 14:29:37 +0100
commit2012320d0eed36e0461e44ac9be8cc162c135bf5 (patch)
tree6c8674c36fa245b421c38b60f7031a71a0b2ad4b /win32/ext/libxml-wdk
parent1b84f0467a169e2b20018dce0787973a0ba52273 (diff)
restructuring
Diffstat (limited to 'win32/ext/libxml-wdk')
-rw-r--r--win32/ext/libxml-wdk/libxml-wdk.patch57
-rw-r--r--win32/ext/libxml-wdk/win32/build-x64.bat20
-rw-r--r--win32/ext/libxml-wdk/win32/build-x86.bat19
3 files changed, 96 insertions, 0 deletions
diff --git a/win32/ext/libxml-wdk/libxml-wdk.patch b/win32/ext/libxml-wdk/libxml-wdk.patch
new file mode 100644
index 00000000..fa8979b2
--- /dev/null
+++ b/win32/ext/libxml-wdk/libxml-wdk.patch
@@ -0,0 +1,57 @@
+diff -ruN --strip-trailing-cr libxml2-2.7.8.orig/libxml.h libxml2-2.7.8/libxml.h
+--- libxml2-2.7.8.orig/libxml.h	2010-10-12 08:25:32 +0200
++++ libxml2-2.7.8/libxml.h	2011-08-07 09:12:07 +0200
+@@ -94,3 +94,7 @@
+ #  define LIBXML_STATIC
+ #endif
+ #endif /* ! __XML_LIBXML_H__ */
++
++#ifndef vsnprintf
++#define vsnprintf _vsnprintf
++#endif
+diff -ruN --strip-trailing-cr libxml2-2.7.8.orig/win32/Makefile.msvc libxml2-2.7.8/win32/Makefile.msvc
+--- libxml2-2.7.8.orig/win32/Makefile.msvc	2010-11-04 14:58:44 +0100
++++ libxml2-2.7.8/win32/Makefile.msvc	2011-08-07 09:23:47 +0200
+@@ -58,12 +58,20 @@
+ !if "$(WITH_ZLIB)" == "1"
+ CFLAGS = $(CFLAGS) /D "HAVE_ZLIB_H"
+ !endif
+-CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
++CFLAGS = $(CFLAGS)
+ 
+ # The linker and its options.
+ LD = link.exe
+ LDFLAGS = /nologo /VERSION:$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION)
+ LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)
++
++!ifdef X64
++CFLAGS = $(CFLAGS) /favor:AMD64
++LDFLAGS = $(LDFLAGS) msvcrt_win2003.obj
++!else
++LDFLAGS = $(LDFLAGS) msvcrt_winxp.obj
++!endif
++
+ LIBS =
+ !if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1"
+ LIBS = $(LIBS) wsock32.lib ws2_32.lib
+@@ -71,9 +79,9 @@
+ !if "$(WITH_ICONV)" == "1"
+ LIBS = $(LIBS) iconv.lib
+ !endif 
+-+!if "$(WITH_ICU)" == "1"
++!if "$(WITH_ICU)" == "1"
+ +LIBS = $(LIBS) icu.lib
+-+!endif
++!endif
+ !if "$(WITH_ZLIB)" == "1"
+ LIBS = $(LIBS) zdll.lib
+ !endif
+@@ -94,7 +102,7 @@
+ LDFLAGS = $(LDFLAGS) /DEBUG
+ !else
+ CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 
+-LDFLAGS = $(LDFLAGS) /OPT:NOWIN98
++LDFLAGS = $(LDFLAGS)
+ !endif
+ 
+ # Libxml object files.
diff --git a/win32/ext/libxml-wdk/win32/build-x64.bat b/win32/ext/libxml-wdk/win32/build-x64.bat
new file mode 100644
index 00000000..fadfe4c8
--- /dev/null
+++ b/win32/ext/libxml-wdk/win32/build-x64.bat
@@ -0,0 +1,20 @@
+@echo off
+set TARGET="LibXML-WDK 2.7.8 x64.7z"
+set WDK_ROOT=c:\WinDDK\7600.16385.1
+set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt
+set LIB=%WDK_ROOT%\lib\wnet\amd64;%WDK_ROOT%\lib\Crt\amd64
+set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin\amd64;%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A\Bin\x64;%SystemRoot%\SysWOW64
+set X64=1
+cscript configure.js compiler=msvc iconv=no iso8859x=yes
+nmake /nologo /f Makefile.msvc clean
+nmake /nologo /f Makefile.msvc
+rmdir /q /s bin
+rmdir /q /s include
+rmdir /q /s lib
+nmake /nologo /f Makefile.msvc install
+move lib\libxml2.dll bin
+copy /y ..\COPYING LICENSE.LIBXML
+set PATH=%PATH%;%PROGRAMW6432%\7-Zip
+del %TARGET%
+7z a %TARGET% bin include lib LICENSE.LIBXML
+pause
diff --git a/win32/ext/libxml-wdk/win32/build-x86.bat b/win32/ext/libxml-wdk/win32/build-x86.bat
new file mode 100644
index 00000000..961fafc8
--- /dev/null
+++ b/win32/ext/libxml-wdk/win32/build-x86.bat
@@ -0,0 +1,19 @@
+@echo off
+set TARGET="LibXML-WDK 2.7.8 x86.7z"
+set WDK_ROOT=c:\WinDDK\7600.16385.1
+set INCLUDE=%WDK_ROOT%\inc\api;%WDK_ROOT%\inc\crt
+set LIB=%WDK_ROOT%\lib\wxp\i386;%WDK_ROOT%\lib\Crt\i386
+set PATH=%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\bin;%PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\Common7\IDE;%PROGRAMFILES(X86)%\Microsoft SDKs\Windows\v7.0A\Bin;%SystemRoot%\system32
+cscript configure.js compiler=msvc iconv=no iso8859x=yes
+nmake /nologo /f Makefile.msvc clean
+nmake /nologo /f Makefile.msvc
+rmdir /q /s bin
+rmdir /q /s include
+rmdir /q /s lib
+nmake /nologo /f Makefile.msvc install
+move lib\libxml2.dll bin
+copy /y ..\COPYING LICENSE.LIBXML
+set PATH=%PATH%;%PROGRAMW6432%\7-Zip
+del %TARGET%
+7z a %TARGET% bin include lib LICENSE.LIBXML
+pause