OSX link libs into git-core directory

So that binaries in that directory can find the library next to them,
where they get modified to look.

This is a hack; it would be better for OSXMkLibs to build a list of what
libraries are needed where.

Unsure if this is needed due to a recent reversion, or is an older
problem, so updated changelog accordingly.
This commit is contained in:
Joey Hess 2019-11-14 18:31:58 -04:00
parent 5cc8cfe57b
commit b321526473
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 24 additions and 6 deletions

View file

@ -50,8 +50,12 @@ installLibs appbase replacement_libs libmap = do
let symdest = appbase </> shortlib
-- This is a hack; libraries need to be in the same
-- directory as the program, so also link them into the
-- extra directory.
let symdestextra = appbase </> "extra" </> shortlib
-- extra and git-core directories so programs in those will
-- find them.
let symdestextra =
[ appbase </> "extra" </> shortlib
, appbase </> "git-core" </> shortlib
]
ifM (doesFileExist dest)
( return Nothing
, do
@ -59,9 +63,11 @@ installLibs appbase replacement_libs libmap = do
putStrLn $ "installing " ++ pathlib ++ " as " ++ shortlib
unlessM (boolSystem "cp" [File pathlib, File dest]
<&&> boolSystem "chmod" [Param "644", File dest]
<&&> boolSystem "ln" [Param "-s", File fulllib, File symdest]
<&&> boolSystem "ln" [Param "-s", File (".." </> fulllib), File symdestextra]) $
<&&> boolSystem "ln" [Param "-s", File fulllib, File symdest]) $
error "library install failed"
forM_ symdestextra $ \d ->
unlessM (boolSystem "ln" [Param "-s", File (".." </> fulllib), File d]) $
error "library linking failed"
return $ Just appbase
)
return (catMaybes libs, replacement_libs', libmap')