• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisão5bffb285ebb603b11c18e449bcdbe819fef36003 (tree)
Hora2024-08-17 19:25:02
AutorFs <Fsu0413@vip....>
CommiterFs

Mensagem de Log

deal with OpenSSL rpath (Trial 1)

Mudança Sumário

Diff

--- a/Compile/lib/Configuration.lua
+++ b/Compile/lib/Configuration.lua
@@ -862,6 +862,33 @@ conf.OpenSSL.generateConfTable = function(self, host, job)
862862 ret.INSTALLROOT = installRoot
863863 ret.INSTALLPATH = installFolderName
864864
865+ ret.EXTRAINSTALL = ""
866+
867+ if (not jobConfigureDetail.crossCompile) and (string.sub(conf.hostToConfMap[host], 1, 3) == "mac") then
868+ -- macOS hosts needs the library id changed. By default OpenSSL builds with full path in ID.
869+ local libs = {}
870+ for _, l in ipairs(jobConfigureDetail.libPath) do
871+ local s, e = string.find(l, "/", 1, true)
872+ local e2
873+ while s do
874+ e2 = e
875+ s, e = string.find(l, "/", e + 1, true)
876+ end
877+ table.insert(libs, {p = string.sub(l, 1, e2 - 1), n = string.sub(l, e2 + 1)})
878+ end
879+
880+ for _, lib in ipairs(libs) do
881+ ret.EXTRAINSTALL = ret.EXTRAINSTALL .. "\ncd \"" .. installRoot .. "/" .. lib.p .. "\""
882+ for _, lib2 in ipairs(libs) do
883+ if (lib.p == lib2.p) and (lib.n == lib2.n) then
884+ ret.EXTRAINSTALL = ret.EXTRAINSTALL .. "\ninstall_name_tool -id \"" .. lib.n .. "\" \"" .. lib.n .. "\""
885+ else
886+ ret.EXTRAINSTALL = ret.EXTRAINSTALL .. "\ninstall_name_tool -change \"" .. installRoot .. "/" .. lib2.p .. "/" .. lib2.n .. "\" \"" .. lib2.n .. "\" \"" .. lib.n .. "\"\n"
887+ end
888+ end
889+ end
890+ end
891+
865892 -- finally, data required for generating website data
866893 ret.buildContentVersion = jobConfigureDetail.opensslVersion
867894 ret.buildHost = host
--- a/Compile/lib/Generate.lua
+++ b/Compile/lib/Generate.lua
@@ -483,6 +483,7 @@ exit 0
483483 -- INSTALLCOMMANDLINE
484484 -- INSTALLROOT
485485 -- INSTALLPATH
486+-- EXTRAINSTALL
486487 gen.unix.template4OpenSSL = [[
487488 set -x
488489
@@ -580,6 +581,10 @@ if &INSTALLCOMMANDLINE&; then break; fi
580581 if [ $i -eq 4 ]; then exit 1; fi
581582 done
582583
584+cd &WORKSPACE&/buildDir
585+
586+&EXTRAINSTALL&
587+
583588 cd &INSTALLROOT&/..
584589
585590 $TAR -cf - &INSTALLPATH& | $SEVENZIP a -txz -m0=LZMA2:d256m:fb273 -mmt=3 -myx -si -- &INSTALLPATH&.tar.xz