aboutsummaryrefslogtreecommitdiffstats
path: root/main/xulrunner/moz-libc-filename.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-06-07 15:00:38 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2013-06-07 16:24:37 +0200
commit6e93ecc0689c6f8effe251d39e7820c06d536704 (patch)
tree915e304ea84a0db9d05edc4c1b7fc67e49c55a54 /main/xulrunner/moz-libc-filename.patch
parenteba2ff5582f72f0f98a070958e4f1d151829280d (diff)
downloadaports-6e93ecc0689c6f8effe251d39e7820c06d536704.tar.bz2
aports-6e93ecc0689c6f8effe251d39e7820c06d536704.tar.xz
main/xulrunner: autodetect libc.so filename properly
Submitted upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=878791#c7
Diffstat (limited to 'main/xulrunner/moz-libc-filename.patch')
-rw-r--r--main/xulrunner/moz-libc-filename.patch41
1 files changed, 41 insertions, 0 deletions
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)) {