diff --git a/build-openresty.ps1 b/build-openresty.ps1 index 68f3817b0e7d6c..915db644bd587b 100644 --- a/build-openresty.ps1 +++ b/build-openresty.ps1 @@ -69,28 +69,20 @@ git apply --verbose 0001-fix-link-with-vcpkg-static-openssl.patch ..\..\luarocks.bat make "CRYPTO_DIR=$vcpkg" "OPENSSL_DIR=$vcpkg" cd ..\.. - -# zipwriter depends on struct, bit32, lua-zlib, luaossl .\luarocks.bat install lua-zlib 1.2-2 "ZLIB_DIR=$vcpkg\lib" "ZLIB_INCDIR=$vcpkg\include" .\luarocks.bat install bit32 5.3.5.1-1 .\luarocks.bat install struct 1.4-1 +.\luarocks.bat install aesfileencrypt 0.1.3-1 .\luarocks.bat install zipwriter 0.1.5-1 - -.\luarocks.bat install fly-bgcrypto-sha 0.0.1-1 -.\luarocks.bat install fly-bgcrypto-pbkdf2 0.0.1-1 -.\luarocks.bat install lua-easy-crypto 1.0.0-1 # uses luossl to easily encrypt/decrypt files. not installing because need exactly luaossl 20171028-0 - - -# .\luarocks.bat unpack zipwriter 0.1.5-1 -# cd zipwriter-0.1.5-1 -# cp "$patches\zipwriter\*" .\ -# git init . -# git apply --verbose 0001-replace-luacrypto-with-luaossl.patch -# cd zipwriter -# ..\..\luarocks.bat make -# cd ..\.. - +.\luarocks.bat unpack lua-zip 0.2-0 +cd lua-zip-0.2-0 +cp "$patches\lua-zip\*" .\ +git init . +git apply --verbose 0001-fix-deps.patch +cd lua-zip +..\..\luarocks.bat make "lua-zip-0.2-0.rockspec" "ZIP_DIR=$vcpkg" +cd ..\.. .\luarocks.bat unpack phpass 1.0-1 cd phpass-1.0-1 diff --git a/build-vcpkg.ps1 b/build-vcpkg.ps1 index f6adc7f1a63ab3..539ff2fbad082a 100644 --- a/build-vcpkg.ps1 +++ b/build-vcpkg.ps1 @@ -11,6 +11,7 @@ if (!(Test-Path vcpkg.exe)) { } Invoke-VcpkgBuild "zlib" +Invoke-VcpkgBuild "libzip[core,default-aes,openssl,wincrypto]" Invoke-VcpkgBuild "sqlite3" Invoke-VcpkgBuild "boost-circular-buffer" Invoke-VcpkgBuild "boost-random" @@ -34,6 +35,7 @@ Invoke-VcpkgBuild "curl" Invoke-VcpkgBuild "cryptlex" Invoke-VcpkgBuild "gtest" + # export created libraries and set version .\vcpkg.exe export --x-all-installed --raw --vcpkg-root . Move-Item -Path .\vcpkg-export-* -Destination .\vcpkg diff --git a/openresty/patches/lua-zip/0001-fix-deps.patch b/openresty/patches/lua-zip/0001-fix-deps.patch new file mode 100644 index 00000000000000..50334f5b472f4e --- /dev/null +++ b/openresty/patches/lua-zip/0001-fix-deps.patch @@ -0,0 +1,48 @@ +From c7013f3287524591b61c3743f0396d89348e8f49 Mon Sep 17 00:00:00 2001 +From: thomas-creel <137831176+thomas-creel@users.noreply.github.com> +Date: Thu, 22 Aug 2024 22:41:22 -0400 +Subject: [PATCH] fix-deps + +--- + lua-zip/lua-zip-0.2-0.rockspec | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +diff --git a/lua-zip/lua-zip-0.2-0.rockspec b/lua-zip/lua-zip-0.2-0.rockspec +index 0f45def..875b713 100644 +--- a/lua-zip/lua-zip-0.2-0.rockspec ++++ b/lua-zip/lua-zip-0.2-0.rockspec +@@ -33,11 +33,30 @@ build = { + "$(ZIP_LIBDIR)" + }, + libraries = { +- "zip" ++ "zip", ++ "zlib" + }, + sources = { + "lua_zip.c" + } + } ++ }, ++ platforms = { ++ windows = { ++ modules = { ++ ["brimworks.zip"] = { ++ libraries = { ++ "zip", ++ "zlib", ++ "advapi32", ++ "kernel32", ++ "user32" ++ }, ++ defines = { ++ "ZIP_STATIC" ++ } ++ } ++ } ++ } + } + } +-- +2.44.0.windows.1 +