www-client/seamonkey: Fix gcc-9 support to not break plugins
authorJory Pratt <anarchy@gentoo.org>
Mon, 14 Oct 2019 02:58:46 +0000 (21:58 -0500)
committerLars Wendler <polynomial-c@gentoo.org>
Mon, 14 Oct 2019 06:43:38 +0000 (08:43 +0200)
Closes: https://bugs.gentoo.org/685092

Signed-off-by: Jory Pratt <anarchy@gentoo.org>
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
www-client/seamonkey/files/seamonkey-gcc9.patch [deleted file]
www-client/seamonkey/seamonkey-2.49.5-r1.ebuild [moved from www-client/seamonkey/seamonkey-2.49.5.ebuild with 98% similarity]
www-client/seamonkey/seamonkey-2.49.9.1_p0.ebuild

diff --git a/www-client/seamonkey/files/seamonkey-gcc9.patch b/www-client/seamonkey/files/seamonkey-gcc9.patch
deleted file mode 100644 (file)
index 87d14e6..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/mozilla/js/xpconnect/src/XPCWrappedNative.cpp.ORIG       2018-07-09 21:54:43.000000000 +0200
-+++ b/mozilla/js/xpconnect/src/XPCWrappedNative.cpp    2019-05-04 17:49:23.893560494 +0200
-@@ -2218,15 +2218,16 @@
-                 const char* fmt = (i == 0) ?
-                                     "(%s" : (i == count-1) ?
-                                         ", %s)" : ", %s";
-+                
-+                if (!name) {
-+                    return nullptr;
-+                }
-                 name = JS_sprintf_append(name, fmt,
-                                          array[i]->GetNameString());
-             }
-         }
-     }
--    if (!name) {
--        return nullptr;
--    }
-     const char* fmt = "[xpconnect wrapped %s" FMT_ADDR FMT_STR(" (native")
-         FMT_ADDR FMT_STR(")") "]";
-     if (si) {
similarity index 98%
rename from www-client/seamonkey/seamonkey-2.49.5.ebuild
rename to www-client/seamonkey/seamonkey-2.49.5-r1.ebuild
index 42817d46f0a1e4370888d1ea5e4f7db0d2241cee..7bc6b4b0d5fd364a8d5fb8e948a06f951bafe633 100644 (file)
@@ -125,9 +125,6 @@ src_prepare() {
        eapply "${WORKDIR}"/firefox
        popd &>/dev/null || die
 
-       # gcc9 patch #685092
-       eapply "${FILESDIR}"/${PN}-gcc9.patch
-
        if grep -q '^sdkdir.*$(MOZ_APP_NAME)-devel' mozilla/config/baseconfig.mk ; then
                sed '/^sdkdir/s@-devel@@' \
                        -i mozilla/config/baseconfig.mk || die
@@ -147,6 +144,9 @@ src_prepare() {
 
        local ms="${S}/mozilla"
 
+       # Don't error for format with gcc-9
+       grep -rl -- '-Werror=format' | xargs sed -i 's/error=format/no-&/' || die "sed failed"
+
        # Enable gnomebreakpad
        if use debug ; then
                sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
index d841b16c8238165ce92df1df68ad5f2370696877..cf04b840c0a4bbd524efd0b2371ef9e55db6ef3f 100644 (file)
@@ -156,9 +156,6 @@ src_prepare() {
        eapply "${WORKDIR}"/firefox
        popd &>/dev/null || die
 
-       # gcc9 patch #685092
-       eapply "${FILESDIR}"/${PN}-gcc9.patch
-
        if grep -q '^sdkdir.*$(MOZ_APP_NAME)-devel' mozilla/config/baseconfig.mk ; then
                sed '/^sdkdir/s@-devel@@' \
                        -i mozilla/config/baseconfig.mk || die
@@ -183,6 +180,9 @@ src_prepare() {
 
        local ms="${S}/mozilla"
 
+       # Don't error for format with gcc-9
+       grep -rl -- '-Werror=format' | xargs sed -i 's/error=format/no-&/' || die "sed failed"
+
        # Enable gnomebreakpad
        if use debug ; then
                sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \