summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2015-01-06 14:29:54 +0000
committerPacho Ramos <pacho@gentoo.org>2015-01-06 14:29:54 +0000
commit589f43a7fe56fd43f4cf458ba48204a30faa230c (patch)
tree22193118b4440ffc70b49ddf57c3d2914993f5d9 /x11-libs
parentUpdate flags in metadata (diff)
downloadgentoo-2-589f43a7fe56fd43f4cf458ba48204a30faa230c.tar.gz
gentoo-2-589f43a7fe56fd43f4cf458ba48204a30faa230c.tar.bz2
gentoo-2-589f43a7fe56fd43f4cf458ba48204a30faa230c.zip
Fix build with gcc -Werror=format-security, bug #512404
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'x11-libs')
-rw-r--r--x11-libs/libXaw/ChangeLog8
-rw-r--r--x11-libs/libXaw/files/libXaw-1.0.12-format-security.patch26
-rw-r--r--x11-libs/libXaw/libXaw-1.0.12.ebuild9
3 files changed, 39 insertions, 4 deletions
diff --git a/x11-libs/libXaw/ChangeLog b/x11-libs/libXaw/ChangeLog
index a0d64872b4c2..c34e44646696 100644
--- a/x11-libs/libXaw/ChangeLog
+++ b/x11-libs/libXaw/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for x11-libs/libXaw
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/libXaw/ChangeLog,v 1.130 2014/06/18 21:04:57 mgorny Exp $
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/libXaw/ChangeLog,v 1.131 2015/01/06 14:29:54 pacho Exp $
+
+ 06 Jan 2015; Pacho Ramos <pacho@gentoo.org>
+ +files/libXaw-1.0.12-format-security.patch, libXaw-1.0.12.ebuild:
+ Fix build with gcc -Werror=format-security, bug #512404
18 Jun 2014; Michał Górny <mgorny@gentoo.org> libXaw-1.0.11-r2.ebuild,
libXaw-1.0.12.ebuild:
diff --git a/x11-libs/libXaw/files/libXaw-1.0.12-format-security.patch b/x11-libs/libXaw/files/libXaw-1.0.12-format-security.patch
new file mode 100644
index 000000000000..dfc2e23672f9
--- /dev/null
+++ b/x11-libs/libXaw/files/libXaw-1.0.12-format-security.patch
@@ -0,0 +1,26 @@
+From ec7d7c303385a6bdb0833a5aaae96be697cca7ab Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Thu, 21 Nov 2013 11:43:55 -0500
+Subject: Fix build with gcc -Werror=format-security
+
+DisplayList.c:290:4: error: format not a string literal and no format
+arguments [-Werror=format-security]
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+diff --git a/src/DisplayList.c b/src/DisplayList.c
+index 3e99df4..0581bf7 100644
+--- a/src/DisplayList.c
++++ b/src/DisplayList.c
+@@ -287,7 +287,7 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen,
+ }
+ if (fp)
+ {
+- snprintf(cname, fp - fname + 1, fname);
++ snprintf(cname, fp - fname + 1, "%s", fname);
+ memmove(fname, fp + 1, strlen(fp));
+ lc = cname[0] ? XawGetDisplayListClass(cname) : xlibc;
+ if (!lc)
+--
+cgit v0.10.2
+
diff --git a/x11-libs/libXaw/libXaw-1.0.12.ebuild b/x11-libs/libXaw/libXaw-1.0.12.ebuild
index 1edbc4795f63..65848a80ffd4 100644
--- a/x11-libs/libXaw/libXaw-1.0.12.ebuild
+++ b/x11-libs/libXaw/libXaw-1.0.12.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/libXaw/libXaw-1.0.12.ebuild,v 1.11 2014/06/18 21:04:57 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/libXaw/libXaw-1.0.12.ebuild,v 1.12 2015/01/06 14:29:54 pacho Exp $
EAPI=5
@@ -22,6 +22,11 @@ RDEPEND=">=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
>=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}"
+PATCHES=(
+ # Fix build with gcc -Werror=format-security (from 'master')
+ "${FILESDIR}"/${P}-format-security.patch
+)
+
src_configure() {
XORG_CONFIGURE_OPTIONS=(
$(use_enable deprecated xaw6)