1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-26 03:02:17 -05:00

add patch and build files of external dependencies

This commit is contained in:
berkeviktor@aol.com 2010-08-16 13:19:54 +02:00
parent 7eeccd2ce2
commit d194c520e7
6 changed files with 171 additions and 0 deletions

17
ext/lua-wdk/build-x64.bat Normal file
View File

@ -0,0 +1,17 @@
@echo off
set OPATH=%PATH%
set INCLUDE=c:\WinDDK\7600.16385.1\inc\api;c:\WinDDK\7600.16385.1\inc\crt;c:\WinDDK\7600.16385.1\inc\ddk
set LIB=c:\WinDDK\7600.16385.1\lib\wnet\amd64;c:\WinDDK\7600.16385.1\lib\Crt\amd64
set PATH=c:\WinDDK\7600.16385.1\bin\x86\amd64;c:\WinDDK\7600.16385.1\bin\x86;c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin
set DEST=..\lua-5.1.4-2-wdk-x64
call etc\luavs-x64.bat
@echo off
echo.Press return when ready to install!
pause
set PATH=%OPATH%
rmdir /Q /S %DEST%
xcopy /S /I src %DEST%
xcopy COPYRIGHT %DEST%
del %DEST%\Makefile
echo.Finished!
pause

17
ext/lua-wdk/build-x86.bat Normal file
View File

@ -0,0 +1,17 @@
@echo off
set OPATH=%PATH%
set INCLUDE=c:\WinDDK\7600.16385.1\inc\api;c:\WinDDK\7600.16385.1\inc\crt;c:\WinDDK\7600.16385.1\inc\ddk
set LIB=c:\WinDDK\7600.16385.1\lib\wxp\i386;c:\WinDDK\7600.16385.1\lib\Crt\i386
set PATH=c:\WinDDK\7600.16385.1\bin\x86\x86;c:\WinDDK\7600.16385.1\bin\x86;c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin
set DEST=..\lua-5.1.4-2-wdk-x86
call etc\luavs.bat
@echo off
echo.Press return when ready to install!
pause
set PATH=%OPATH%
rmdir /Q /S %DEST%
xcopy /S /I src %DEST%
xcopy COPYRIGHT %DEST%
del %DEST%\Makefile
echo.Finished!
pause

46
ext/lua-wdk/lua-wdk.patch Normal file
View File

@ -0,0 +1,46 @@
diff -ruN --strip-trailing-cr lua-5.1.4.orig/etc/luavs-x64.bat lua-5.1.4/etc/luavs-x64.bat
--- lua-5.1.4.orig/etc/luavs-x64.bat 1970-01-01 01:00:00 +0100
+++ lua-5.1.4/etc/luavs-x64.bat 2010-08-16 13:02:08 +0200
@@ -0,0 +1,28 @@
+@rem Script to build Lua under "Visual Studio .NET Command Prompt".
+@rem Do not run from this directory; run it from the toplevel: etc\luavs.bat .
+@rem It creates lua51.dll, lua51.lib, lua.exe, and luac.exe in src.
+@rem (contributed by David Manura and Mike Pall)
+
+@setlocal
+@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c
+@set MYLINK=link /nologo msvcrt_win2003.obj
+@set MYMT=mt /nologo
+
+cd src
+%MYCOMPILE% /DLUA_BUILD_AS_DLL l*.c
+del lua.obj luac.obj
+%MYLINK% /DLL /out:lua51.dll l*.obj
+if exist lua51.dll.manifest^
+ %MYMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2
+%MYCOMPILE% /DLUA_BUILD_AS_DLL lua.c
+%MYLINK% /out:lua.exe lua.obj lua51.lib
+if exist lua.exe.manifest^
+ %MYMT% -manifest lua.exe.manifest -outputresource:lua.exe
+%MYCOMPILE% l*.c print.c
+del lua.obj linit.obj lbaselib.obj ldblib.obj liolib.obj lmathlib.obj^
+ loslib.obj ltablib.obj lstrlib.obj loadlib.obj
+%MYLINK% /out:luac.exe *.obj
+if exist luac.exe.manifest^
+ %MYMT% -manifest luac.exe.manifest -outputresource:luac.exe
+del *.obj *.manifest
+cd ..
diff -ruN --strip-trailing-cr lua-5.1.4.orig/etc/luavs.bat lua-5.1.4/etc/luavs.bat
--- lua-5.1.4.orig/etc/luavs.bat 2008-01-20 17:40:10 +0100
+++ lua-5.1.4/etc/luavs.bat 2010-08-16 13:02:18 +0200
@@ -4,8 +4,8 @@
@rem (contributed by David Manura and Mike Pall)
@setlocal
-@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE
-@set MYLINK=link /nologo
+@set MYCOMPILE=cl /nologo /MD /O2 /W3 /c
+@set MYLINK=link /nologo msvcrt_winxp.obj
@set MYMT=mt /nologo
cd src

View File

@ -0,0 +1,14 @@
@echo off
set INCLUDE=c:\WinDDK\7600.16385.1\inc\api;c:\WinDDK\7600.16385.1\inc\crt;c:\WinDDK\7600.16385.1\inc\ddk;c:\mozilla-build\build\openssl-1.0.0a\ms;c:\mozilla-build\build\zlib-x64\include
set LIB=c:\WinDDK\7600.16385.1\lib\wnet\amd64;c:\WinDDK\7600.16385.1\lib\Crt\amd64;c:\mozilla-build\build\zlib-x64\lib
set PATH=c:\WinDDK\7600.16385.1\bin\x86\amd64;c:\WinDDK\7600.16385.1\bin\x86;c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;c:\mozilla-build\perl-5.12-x64\bin;c:\Windows\System32;c:\mozilla-build\nasm;c:\mozilla-build\build\zlib-x64\bin\
perl Configure VC-WIN64A enable-camellia no-asm zlib-dynamic --openssldir=c:/mozilla-build/build/openssl-1.0.0a-wdk-x64
call ms\do_win64a
nmake -f ms\ntdll.mak vclean
nmake -f ms\ntdll.mak
nmake -f ms\ntdll.mak test
echo.Press return when ready to install!
pause
nmake -f ms\ntdll.mak install
perl util\copy.pl c:/mozilla-build/build/zlib-x64/bin/zlib1.dll c:/mozilla-build/build/openssl-1.0.0a-wdk-x64/bin
echo.Finished!

View File

@ -0,0 +1,15 @@
@echo off
set INCLUDE=c:\WinDDK\7600.16385.1\inc\api;c:\WinDDK\7600.16385.1\inc\crt;c:\WinDDK\7600.16385.1\inc\ddk;c:\mozilla-build\build\openssl-1.0.0a\ms;c:\mozilla-build\build\zlib-x86\include
set LIB=c:\WinDDK\7600.16385.1\lib\wxp\i386;c:\WinDDK\7600.16385.1\lib\Crt\i386;c:\mozilla-build\build\zlib-x86\lib
set PATH=c:\WinDDK\7600.16385.1\bin\x86\x86;c:\WinDDK\7600.16385.1\bin\x86;c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;c:\mozilla-build\perl-5.12-x86\bin;c:\Windows\System32;c:\mozilla-build\nasm;c:\mozilla-build\build\zlib-x86\bin
perl Configure VC-WIN32 enable-camellia zlib-dynamic --openssldir=c:/mozilla-build/build/openssl-1.0.0a-wdk-x86
call ms\do_nasm
@echo off
nmake -f ms\ntdll.mak vclean
nmake -f ms\ntdll.mak
nmake -f ms\ntdll.mak test
echo.Press return when ready to install!
pause
nmake -f ms\ntdll.mak install
perl util\copy.pl c:/mozilla-build/build/zlib-x86/bin/zlib1.dll c:/mozilla-build/build/openssl-1.0.0a-wdk-x86/bin
echo.Finished!

View File

@ -0,0 +1,62 @@
diff -ruN openssl-1.0.0a.orig/Configure openssl-1.0.0a/Configure
--- openssl-1.0.0a.orig/Configure 2010-06-01 07:53:35 +0200
+++ openssl-1.0.0a/Configure 2010-08-11 02:31:03 +0200
@@ -491,10 +491,10 @@
#
# Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
"VC-WIN64I","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ias:win32",
-"VC-WIN64A","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:auto:win32",
+"VC-WIN64A","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:auto:win32",
# x86 Win32 target defaults to ANSI API, if you want UNICODE, complement
# 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE'
-"VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
+"VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
# Unified CE target
"debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
"VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32",
diff -ruN openssl-1.0.0a.orig/engines/e_aep.c openssl-1.0.0a/engines/e_aep.c
--- openssl-1.0.0a.orig/engines/e_aep.c 2008-12-22 13:54:12 +0100
+++ openssl-1.0.0a/engines/e_aep.c 2010-08-11 02:31:03 +0200
@@ -61,7 +61,12 @@
#include <sys/types.h>
#include <unistd.h>
#else
+#ifdef _MSC_VER
+#include <windows.h>
+#define _getpid GetCurrentProcessId
+#else
#include <process.h>
+#endif
typedef int pid_t;
#endif
diff -ruN openssl-1.0.0a.orig/util/pl/VC-32.pl openssl-1.0.0a/util/pl/VC-32.pl
--- openssl-1.0.0a.orig/util/pl/VC-32.pl 2010-06-01 08:03:20 +0200
+++ openssl-1.0.0a/util/pl/VC-32.pl 2010-08-11 02:31:03 +0200
@@ -37,7 +37,7 @@
$lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
$opt_cflags=$f.' /Ox';
$dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
- $lflags="/nologo /subsystem:console /opt:ref";
+ $lflags="/nologo /subsystem:console /opt:ref msvcrt_win2003.obj";
*::perlasm_compile_target = sub {
my ($target,$source,$bname)=@_;
@@ -118,7 +118,7 @@
$lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
$opt_cflags=$f.' /Ox /O2 /Ob2';
$dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
- $lflags="/nologo /subsystem:console /opt:ref";
+ $lflags="/nologo /subsystem:console /opt:ref msvcrt_winxp.obj";
}
$mlflags='';
@@ -179,7 +179,7 @@
$lfile='/out:';
$shlib_ex_obj="";
-$app_ex_obj="setargv.obj" if ($FLAVOR !~ /CE/);
+$app_ex_obj="" if ($FLAVOR !~ /CE/);
if ($FLAVOR =~ /WIN64A/) {
if (`nasm -v 2>NUL` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 2.0) {
$asm='nasm -f win64 -DNEAR -Ox -g';