浏览代码

openssl: only install binary on windows (#3741)

* only install binary

* try fix windows android cross

* revert

---------

Co-authored-by: c8ef <[email protected]>
star9029 1 年之前
父节点
当前提交
7e90185ec0
共有 2 个文件被更改,包括 10 次插入4 次删除
  1. 4 1
      packages/o/openssl/xmake.lua
  2. 6 3
      packages/o/openssl3/xmake.lua

+ 4 - 1
packages/o/openssl/xmake.lua

@@ -73,7 +73,10 @@ package("openssl")
         table.insert(configs, "--prefix=" .. package:installdir())
         table.insert(configs, "--openssldir=" .. package:installdir())
         os.vrunv("perl", configs)
-        import("package.tools.nmake").install(package)
+
+        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})
     end)
 
     on_install("mingw", function (package)

+ 6 - 3
packages/o/openssl3/xmake.lua

@@ -1,7 +1,7 @@
 package("openssl3")
-
     set_homepage("https://www.openssl.org/")
     set_description("A robust, commercial-grade, and full-featured toolkit for TLS and SSL.")
+    set_license("Apache-2.0")
 
     add_urls("https://github.com/openssl/openssl/archive/refs/tags/openssl-$(version).zip")
     add_versions("3.0.7", "fcb37203c6bf7376cfd3aeb0be057937b7611e998b6c0d664abde928c8af3eb7")
@@ -43,7 +43,7 @@ package("openssl3")
     end)
 
     on_install("windows", function (package)
-        local configs = {"Configure"}
+        local configs = {"Configure", "no-tests"}
         local target
         if package:is_arch("x86", "i386") then
             target = "VC-WIN32"
@@ -59,7 +59,10 @@ package("openssl3")
         table.insert(configs, "--prefix=" .. package:installdir())
         table.insert(configs, "--openssldir=" .. package:installdir())
         os.vrunv("perl", configs)
-        import("package.tools.nmake").install(package)
+
+        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})
     end)
 
     on_install("mingw", function (package)