[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. 08ed00124d8b6b445d3b91a9aa15eec638b02f05

Clint Adams schizo at debian.org
Sun Nov 15 03:17:13 UTC 2009


The following commit has been merged in the upstream branch:
commit c527bc52390fd67b6d8bc4b1629adfc7f62878ff
Author: Clint Adams <schizo at debian.org>
Date:   Sun Feb 25 16:37:33 2007 +0000

    Apply patch from Heikki Lindholm to fix MacOS X support.
    
    git-archimport-id: fakeroot at packages.debian.org--fakeroot/fakeroot--main--0.0--patch-112

diff --git a/configure.ac b/configure.ac
index f02f2e0..afb94b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -313,7 +313,10 @@ else
 fi
 
 dnl This should really be done intelligently.
-
+DLSUFFIX=".so"
+LDLIBPATHVAR="LD_LIBRARY_PATH"
+LDPRELOADVAR="LD_PRELOAD"
+LDEXTRAVAR=""
 case $target_cpu:$target_os in
 	(alpha*:linux*|ia64*:linux*)
       		libcpath="/lib/libc.so.6.1"
@@ -342,6 +345,13 @@ case $target_cpu:$target_os in
 	(*:solaris*)
 		libcpath="/lib/libc.so.1"
 		;;
+	(*:darwin*)
+		libcpath="/usr/lib/libSystem.dylib"
+		DLSUFFIX=".dylib"
+		LDLIBPATHVAR="DYLD_LIBRARY_PATH"
+		LDPRELOADVAR="DYLD_INSERT_LIBRARIES"
+		LDEXTRAVAR="DYLD_FORCE_FLAT_NAMESPACE=1"
+		;;
 	(*)
 		AC_MSG_WARN([don't know where libc is for $target_os on
 			     $target_cpu, setting to /lib/libc.so])
@@ -350,6 +360,10 @@ case $target_cpu:$target_os in
 esac
 
 AC_DEFINE_UNQUOTED([LIBCPATH], "$libcpath", [path to libc shared object])
+AC_SUBST(DLSUFFIX)
+AC_SUBST(LDLIBPATHVAR)
+AC_SUBST(LDPRELOADVAR)
+AC_SUBST(LDEXTRAVAR)
 
 dnl Checks for library functions.
 AC_CHECK_FUNCS(strdup strstr getresuid setresuid getresgid setresgid setfsuid setfsgid)
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index be2f0a0..863dba5 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -10,7 +10,11 @@ do_subst = sed -e 's,[@]prefix[@],$(prefix),g' \
 	   -e 's,[@]faked_transformed[@],'`echo faked | sed -e '$(transform)'`',g' \
 	   -e 's,[@]signal[@],$(signal),g' \
 	   -e 's,[@]SHELL[@],$(SHELL),g' \
-	   -e 's,[@]VERSION[@],$(VERSION),g' 
+	   -e 's,[@]VERSION[@],$(VERSION),g' \
+	   -e 's,[@]DLSUFFIX[@],$(DLSUFFIX),g' \
+	   -e 's,[@]LDLIBPATHVAR[@],$(LDLIBPATHVAR),g' \
+	   -e 's,[@]LDPRELOADVAR[@],$(LDPRELOADVAR),g' \
+	   -e 's,[@]LDEXTRAVAR[@],$(LDEXTRAVAR),g'
 
 fakeroot: $(srcdir)/fakeroot.in Makefile
 	$(do_subst) < $(srcdir)/fakeroot.in > fakeroot
diff --git a/scripts/fakeroot.in b/scripts/fakeroot.in
index f68038d..c61e490 100755
--- a/scripts/fakeroot.in
+++ b/scripts/fakeroot.in
@@ -18,7 +18,7 @@ EOF
 PREFIX=@prefix@
 BINDIR=@bindir@
     
-LIB=lib at fakeroot_transformed@.so
+LIB=lib at fakeroot_transformed@@DLSUFFIX@
 PATHS=@libdir@:${PREFIX}/lib64/libfakeroot:${PREFIX}/lib32/libfakeroot
 FAKED=${BINDIR}/@faked_transformed@
 
@@ -133,21 +133,21 @@ if test -z "$FAKEROOTKEY" || test -z "$PID"; then
 fi
 
 # Keep other library paths
-if test -n "$LD_LIBRARY_PATH"; then
-  PATHS="$PATHS:$LD_LIBRARY_PATH"
+if test -n "$@LDLIBPATHVAR@"; then
+  PATHS="$PATHS:$@LDLIBPATHVAR@"
 fi
 # ...and preloaded libs
-if test -n "$LD_PRELOAD"; then
-  LIB="$LIB $LD_PRELOAD"
+if test -n "$@LDPRELOADVAR@"; then
+  LIB="$LIB $@LDPRELOADVAR@"
 fi
 
 export FAKEROOT_FD_BASE
 
 if test -z "$*"; then
-  FAKEROOTKEY=$FAKEROOTKEY LD_LIBRARY_PATH="$PATHS" LD_PRELOAD="$LIB" ${SHELL:-/bin/sh}
+  FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" ${SHELL:-/bin/sh}
   RESULT=$?
 else
-  FAKEROOTKEY=$FAKEROOTKEY LD_LIBRARY_PATH="$PATHS" LD_PRELOAD="$LIB" "$@"
+  FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" "$@"
   RESULT=$?
 fi
 

-- 
fakeroot



More information about the Fakeroot-commits mailing list