From 6e93ecc0689c6f8effe251d39e7820c06d536704 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 7 Jun 2013 15:00:38 +0200 Subject: main/xulrunner: autodetect libc.so filename properly Submitted upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=878791#c7 --- main/xulrunner/moz-libc-filename.patch | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 main/xulrunner/moz-libc-filename.patch (limited to 'main/xulrunner/moz-libc-filename.patch') diff --git a/main/xulrunner/moz-libc-filename.patch b/main/xulrunner/moz-libc-filename.patch new file mode 100644 index 0000000000..c8dfa1d84e --- /dev/null +++ b/main/xulrunner/moz-libc-filename.patch @@ -0,0 +1,41 @@ +--- ./configure.in.orig 2013-06-07 09:49:55.984387546 +0000 ++++ ./configure.in 2013-06-07 10:48:53.749411262 +0000 +@@ -273,6 +273,13 @@ + AC_SUBST(OBJCOPY) + + dnl ======================================================== ++dnl Check the libc filename ++dnl ======================================================== ++MOZ_LIBC_FILENAME=`$PYTHON -c "from ctypes.util import find_library; print(find_library('c'))"` ++AC_DEFINE_UNQUOTED(MOZ_LIBC_FILENAME, "$MOZ_LIBC_FILENAME") ++AC_SUBST(MOZ_LIBC_FILENAME) ++ ++dnl ======================================================== + dnl Checks for compilers. + dnl ======================================================== + dnl Set CROSS_COMPILE in the environment when running configure +--- ./toolkit/components/osfile/osfile_unix_allthreads.jsm.orig 2013-06-07 11:06:38.269792499 +0000 ++++ ./toolkit/components/osfile/osfile_unix_allthreads.jsm 2013-06-07 11:09:36.714870364 +0000 +@@ -39,7 +39,8 @@ + + // Open libc + let libc; +- let libc_candidates = [ "libSystem.B.dylib", ++ let libc_candidates = [ OS.Constants.Path.libcFilename, ++ "libSystem.B.dylib", + "libc.so.6", + "libc.so" ]; + for (let i = 0; i < libc_candidates.length; ++i) { +--- ./dom/system/OSFileConstants.cpp.orig 2013-06-07 11:48:56.341786916 +0000 ++++ ./dom/system/OSFileConstants.cpp 2013-06-07 11:53:13.181079983 +0000 +@@ -756,6 +753,10 @@ + return false; + } + ++ if (!SetStringProperty(cx, objPath, "libcFilename", NS_LITERAL_STRING(MOZ_LIBC_FILENAME))) { ++ return false; ++ } ++ + // Configure profileDir only if it is available at this stage + if (!gPaths->profileDir.IsVoid() + && !SetStringProperty(cx, objPath, "profileDir", gPaths->profileDir)) { -- cgit v1.2.3