summaryrefslogtreecommitdiff
path: root/Build/OSXMkLibs.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-12-09 13:42:30 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-12-09 13:42:30 -0400
commit0dab523220965b8740cf423a48751f4753153294 (patch)
treefa99bee54a7c94ce899b5a91956cfb517383a6bb /Build/OSXMkLibs.hs
parent0f286ff189d0e8be29e9be17cb18ec290593a40d (diff)
install libs in subdirs again
Diffstat (limited to 'Build/OSXMkLibs.hs')
-rw-r--r--Build/OSXMkLibs.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Build/OSXMkLibs.hs b/Build/OSXMkLibs.hs
index b6e679d73..23f5a8f78 100644
--- a/Build/OSXMkLibs.hs
+++ b/Build/OSXMkLibs.hs
@@ -15,7 +15,6 @@ import System.Directory
import System.IO
import Control.Monad
import Data.List
-import Data.String.Utils
import Utility.PartialPrelude
import Utility.Directory
@@ -42,13 +41,13 @@ installLibs appbase libmap = do
(needlibs, libmap') <- otool appbase libmap
libs <- forM needlibs $ \lib -> do
let shortlib = fromMaybe (error "internal") (M.lookup lib libmap')
- let fulllib = replace "/" "_" lib
+ let fulllib = dropWhile (== '/') lib
let dest = appbase </> fulllib
let symdest = appbase </> shortlib
ifM (doesFileExist dest)
( return Nothing
, do
- createDirectoryIfMissing True appbase
+ createDirectoryIfMissing True (parentDir fulllib)
putStrLn $ "installing " ++ lib ++ " as " ++ shortlib
_ <- boolSystem "cp" [File lib, File dest]
_ <- boolSystem "chmod" [Param "644", File dest]