www-client/firefox: fix hard-coded libc.so.6 for ctypes.util.find_library('c')
authorIan Stakenvicius <axs@gentoo.org>
Sun, 23 Aug 2015 13:17:04 +0000 (09:17 -0400)
committerIan Stakenvicius <axs@gentoo.org>
Sun, 23 Aug 2015 13:17:04 +0000 (09:17 -0400)
Mozilla codebase starting with version 36 had a couple of hard-coded CDLL('libc.so.6'),
which causes compilation failures on linu systems that don't have a libc.so.6, such
as ia64 and possibly others.

Gentoo Bug: 557956

Package-Manager: portage-2.2.20

www-client/firefox/files/firefox-38-dont-hardcode-libc-soname.patch [new file with mode: 0644]
www-client/firefox/firefox-38.2.0.ebuild
www-client/firefox/firefox-40.0.2.ebuild

diff --git a/www-client/firefox/files/firefox-38-dont-hardcode-libc-soname.patch b/www-client/firefox/files/firefox-38-dont-hardcode-libc-soname.patch
new file mode 100644 (file)
index 0000000..83779bc
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/testing/mozbase/mozinfo/mozinfo/mozinfo.py       2015-08-06 13:41:02.000000000 -0400
++++ b/testing/mozbase/mozinfo/mozinfo/mozinfo.py       2015-08-21 21:17:00.320766493 -0400
+@@ -96,7 +96,7 @@
+     import errno
+     PR_SET_SECCOMP = 22
+     SECCOMP_MODE_FILTER = 2
+-    ctypes.CDLL("libc.so.6", use_errno=True).prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, 0)
++    ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True).prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, 0)
+     info['has_sandbox'] = ctypes.get_errno() == errno.EFAULT
+ else:
+     info['has_sandbox'] = True
+--- a/testing/mochitest/runtests.py    2015-08-06 13:41:02.000000000 -0400
++++ b/testing/mochitest/runtests.py    2015-08-21 21:17:36.060766000 -0400
+@@ -1097,7 +1097,7 @@
+     if not mozinfo.isLinux:
+         return False, ''
+-    libc = ctypes.cdll.LoadLibrary('libc.so.6')
++    libc = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c'))
+     O_RDWR = 2
+     # These are from linux/videodev2.h
index 7d755db55bcfc6faaacef8cc8dfc20b4949402da..c83df852bae327dece9b5835715a1ca6bf531e24 100644 (file)
@@ -140,6 +140,7 @@ src_prepare() {
        EPATCH_SUFFIX="patch" \
        EPATCH_FORCE="yes" \
        epatch "${WORKDIR}/firefox"
+       epatch "${FILESDIR}"/${PN}-38-dont-hardcode-libc-soname.patch
 
        # Allow user to apply any additional patches without modifing ebuild
        epatch_user
index 6bf44befe992832618f3bc77371456dad00cc34f..b7f82187b5fd577a066a154ad07629015d93e621 100644 (file)
@@ -143,7 +143,7 @@ src_prepare() {
        EPATCH_EXCLUDE="8010_bug114311-freetype26.patch" \
        epatch "${WORKDIR}/firefox"
        epatch "${FILESDIR}"/${PN}-38-hppa-js-syntax-error.patch #556196
-
+       epatch "${FILESDIR}"/${PN}-38-dont-hardcode-libc-soname.patch #557956
        # Allow user to apply any additional patches without modifing ebuild
        epatch_user