]> dgit.raspbian.org Git - git-annex.git/commitdiff
OSXMkLibs: skip @loader_path
authorJoey Hess <joeyh@joeyh.name>
Tue, 15 Dec 2020 16:47:24 +0000 (12:47 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 15 Dec 2020 16:47:24 +0000 (12:47 -0400)
This may or may not make the OSX build work on a newer version of OSX
than the one that's currently being used for release builds. I have not
been able to find good docs about how exactly to get back from such a
value to the actual path to the library that the linker would use.

Build/OSXMkLibs.hs
Makefile

index 196650bae11a75ebba8746df9d168fd199aca284..fed88de88cceb5ab0215261d42670370af20b06b 100644 (file)
@@ -34,10 +34,7 @@ type LibMap = M.Map FilePath String
 
 mklibs :: FilePath -> M.Map FilePath FilePath -> IO Bool
 mklibs appbase installedbins = do
-       usl <- getEnv "USE_SYSTEM_LIBS"
-       case usl of
-               Nothing -> mklibs' appbase installedbins [] [] M.empty
-               Just _ -> hPutStrLn stderr "dmg will use system libraries (USE_SYSTEM_LIBS)"
+       mklibs' appbase installedbins [] [] M.empty
        return True
 
 {- Recursively find and install libs, until nothing new to install is found. -}
@@ -92,7 +89,12 @@ otool appbase installedbins replacement_libs libmap = do
        files <- filterM doesFileExist =<< dirContentsRecursive appbase
        process [] files replacement_libs libmap
   where
-       want s = not ("@executable_path" `isInfixOf` s)
+       want s = 
+               -- This seems to be about finding libraries next
+               -- to executables or something. May need further resolving
+               -- to find real path to library, but for now, skip it.
+               not ("@executable_path" `isInfixOf` s)
+               && not ("@loader_path" `isInfixOf` s)
                -- OSX framekworks such as Cocoa are too tightly tied to
                -- a specific OSX version, so don't bundle.
                && not (".framework" `isInfixOf` s)
index 5b6754cfaef66c2a2ead6215a2ead3686cb30d9e..dce3173a47a88c93f7164c1ec681099eea3c2305 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -205,7 +205,6 @@ dpkg-buildpackage%: prep-standalone
        umask 022; dpkg-buildpackage -rfakeroot $*
        $(MAKE) undo-standalone
 
-# Run this with USE_SYSTEM_LIBS=1 to build without bundling system libraries.
 OSXAPP_DEST=tmp/build-dmg/git-annex.app
 OSXAPP_TOP=$(OSXAPP_DEST)/Contents/MacOS/bundle
 osxapp: