openssl: use jom instead nmake (#4740)

* openssl: use jom instead nmake

* openssl: update xmake.lua
pull/4743/head
Bai Miao 4 months ago committed by GitHub
parent a6752bfd23
commit e2164af9c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 21
      packages/o/openssl/xmake.lua

@ -37,6 +37,11 @@ package("openssl")
-- the perl executable found in GitForWindows will fail to build OpenSSL
-- see https://github.com/openssl/openssl/blob/master/NOTES-PERL.md#perl-on-windows
package:add("deps", "strawberry-perl", { system = false, private = true })
-- check xmake tool jom
import("package.tools.jom", {try = true})
if jom then
package:add("deps", "jom", {private = true})
end
end
end
@ -57,6 +62,8 @@ package("openssl")
end)
on_install("windows", function (package)
import("package.tools.jom", {try = true})
import("package.tools.nmake")
local configs = {"Configure", "no-tests"}
local target
if package:is_arch("x86", "i386") then
@ -72,11 +79,19 @@ package("openssl")
table.insert(configs, package:config("shared") and "shared" or "no-shared")
table.insert(configs, "--prefix=" .. package:installdir())
table.insert(configs, "--openssldir=" .. package:installdir())
if jom then
table.insert(configs, "no-makedepend")
table.insert(configs, "/FS")
end
os.vrunv("perl", configs)
local runenvs = import("package.tools.nmake").buildenvs(package)
local nmake = import("lib.detect.find_tool")("nmake", {envs = runenvs})
os.vrunv(nmake.program, {"install_sw"}, {envs = runenvs})
if jom then
jom.build(package)
jom.make(package, {"install_sw"})
else
nmake.build(package)
nmake.make(package, {"install_sw"})
end
end)
on_install("mingw", function (package)

Loading…
Cancel
Save