2
0
ruki 6 жил өмнө
parent
commit
6c3025fada

+ 11 - 1
packages/l/libcurl/xmake.lua

@@ -34,7 +34,17 @@ package("libcurl")
             table.insert(configs, "--disable-debug")
             table.insert(configs, "--disable-debug")
         end
         end
         if is_plat("macosx") then
         if is_plat("macosx") then
-            table.insert(configs, "--with-darwinssl")
+            local with_darwinssl = false
+            local xcode_sdkver = get_config("xcode_sdkver")
+            if xcode_sdkver then
+                -- fix undefined symbols: _SSLCopyALPNProtocols, _SSLSetALPNProtocols
+                with_darwinssl = import("core.base.semver").compare(xcode_sdkver, "9.4.1") > 0 
+            end
+            if with_darwinssl then
+                table.insert(configs, "--with-darwinssl")
+            else
+                table.insert(configs, "--without-darwinssl")
+            end
         end
         end
         table.insert(configs, "--without-ca-bundle")
         table.insert(configs, "--without-ca-bundle")
         table.insert(configs, "--without-ca-path")
         table.insert(configs, "--without-ca-path")