diff options
author | Arun Raghavan <ford_prefect@gentoo.org> | 2009-04-27 19:11:31 +0000 |
---|---|---|
committer | Arun Raghavan <ford_prefect@gentoo.org> | 2009-04-27 19:11:31 +0000 |
commit | e71a33d7ef3db7c1c804470cdd7be4ee5751f475 (patch) | |
tree | 6f33992a538c4ba21f368984750d128b33aa6e50 /x11-libs/pango | |
parent | old (diff) | |
download | gentoo-2-e71a33d7ef3db7c1c804470cdd7be4ee5751f475.tar.gz gentoo-2-e71a33d7ef3db7c1c804470cdd7be4ee5751f475.tar.bz2 gentoo-2-e71a33d7ef3db7c1c804470cdd7be4ee5751f475.zip |
Fix crashes because of special characters (bug #267560)
(Portage version: 2.2_rc31/cvs/Linux i686)
Diffstat (limited to 'x11-libs/pango')
-rw-r--r-- | x11-libs/pango/ChangeLog | 8 | ||||
-rw-r--r-- | x11-libs/pango/files/pango-1.22.4-special-chars-crash.patch | 55 | ||||
-rw-r--r-- | x11-libs/pango/pango-1.22.4-r1.ebuild | 82 |
3 files changed, 144 insertions, 1 deletions
diff --git a/x11-libs/pango/ChangeLog b/x11-libs/pango/ChangeLog index a5d83b7cb121..08d78a19eab5 100644 --- a/x11-libs/pango/ChangeLog +++ b/x11-libs/pango/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for x11-libs/pango # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/pango/ChangeLog,v 1.247 2009/04/27 13:48:00 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/pango/ChangeLog,v 1.248 2009/04/27 19:11:30 ford_prefect Exp $ + +*pango-1.22.4-r1 (27 Apr 2009) + + 27 Apr 2009; Arun Raghavan <ford_prefect@gentoo.org> + +files/pango-1.22.4-special-chars-crash.patch, +pango-1.22.4-r1.ebuild: + Fix crashes because of special characters (bug #267560) 27 Apr 2009; Jeroen Roovers <jer@gentoo.org> pango-1.22.4: Stable for HPPA (bug #260063). diff --git a/x11-libs/pango/files/pango-1.22.4-special-chars-crash.patch b/x11-libs/pango/files/pango-1.22.4-special-chars-crash.patch new file mode 100644 index 000000000000..71e07a86006b --- /dev/null +++ b/x11-libs/pango/files/pango-1.22.4-special-chars-crash.patch @@ -0,0 +1,55 @@ +From dd6ce709db5872132335fef9f75aa16a33d6e5aa Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Mon, 06 Apr 2009 23:49:02 +0000 +Subject: [layout] Truncate final whitespace in the line before ellipsizing + +Bug 556132 – gnome-panel crashed with SIGSEGV in +g_cclosure_marshal_VOID__BOXED() + +Not after. Also fixes invalid memory access in case line was both +wrapped and ellipsized. +--- +diff --git a/pango/pango-layout.c b/pango/pango-layout.c +index b1b75a4..4326eb4 100644 +--- a/pango/pango-layout.c ++++ b/pango/pango-layout.c +@@ -5166,18 +5166,21 @@ pango_layout_line_postprocess (PangoLayoutLine *line, + ParaBreakState *state, + gboolean wrapped) + { +- PangoLayoutRun *last_run = line->runs->data; + gboolean ellipsized = FALSE; + +- /* NB: the runs are in reverse order at this point, since we prepended them to the list ++ DEBUG ("postprocessing", line, state); ++ ++ /* Truncate the logical-final whitespace in the line if we broke the line at it + */ ++ if (wrapped) ++ /* The runs are in reverse order at this point, since we prepended them to the list. ++ * So, the first run is the last logical run. */ ++ zero_line_final_space (line, state, line->runs->data); + + /* Reverse the runs + */ + line->runs = g_slist_reverse (line->runs); + +- DEBUG ("postprocessing", line, state); +- + /* Ellipsize the line if necessary + */ + if (G_UNLIKELY (state->line_width >= 0 && +@@ -5186,11 +5189,6 @@ pango_layout_line_postprocess (PangoLayoutLine *line, + ellipsized = _pango_layout_line_ellipsize (line, state->attrs, state->line_width); + } + +- /* Truncate the logical-final whitespace in the line if we broke the line at it +- */ +- if (wrapped) +- zero_line_final_space (line, state, last_run); +- + DEBUG ("after removing final space", line, state); + + /* Now convert logical to visual order +-- +cgit v0.8.2 diff --git a/x11-libs/pango/pango-1.22.4-r1.ebuild b/x11-libs/pango/pango-1.22.4-r1.ebuild new file mode 100644 index 000000000000..faba5de50563 --- /dev/null +++ b/x11-libs/pango/pango-1.22.4-r1.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-libs/pango/pango-1.22.4-r1.ebuild,v 1.1 2009/04/27 19:11:30 ford_prefect Exp $ + +inherit eutils gnome2 multilib + +DESCRIPTION="Text rendering and layout library" +HOMEPAGE="http://www.pango.org/" + +LICENSE="LGPL-2 FTL" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="X debug doc" + +RDEPEND=">=dev-libs/glib-2.17.3 + >=media-libs/fontconfig-1.0.1 + >=media-libs/freetype-2 + >=x11-libs/cairo-1.7.6 + X? ( + x11-libs/libXrender + x11-libs/libX11 + x11-libs/libXft + )" +DEPEND="${RDEPEND} + >=dev-util/pkgconfig-0.9 + doc? ( + >=dev-util/gtk-doc-1 + ~app-text/docbook-xml-dtd-4.1.2 + ) + X? ( x11-proto/xproto )" + +DOCS="AUTHORS ChangeLog* NEWS README THANKS" + +function multilib_enabled() { + has_multilib_profile || ( use x86 && [ "$(get_libdir)" == "lib32" ] ) +} + +pkg_setup() { + # Do NOT build with --disable-debug/--enable-debug=no + if use debug ; then + G2CONF="${G2CONF} --enable-debug=yes" + fi + + G2CONF="${G2CONF} $(use_with X x)" +} + +src_unpack() { + gnome2_src_unpack + + # fix crash while handling special characters (bug #267560) + epatch "${FILESDIR}/${P}-special-chars-crash.patch" + + # make config file location host specific so that a 32bit and 64bit pango + # wont fight with each other on a multilib system. Fix building for + # emul-linux-x86-gtklibs + if multilib_enabled ; then + epatch "${FILESDIR}/${PN}-1.2.5-lib64.patch" + fi +} + +src_install() { + gnome2_src_install + rm "${D}/etc/pango/pango.modules" +} + +pkg_postinst() { + if [[ "${ROOT}" == "/" ]] ; then + einfo "Generating modules listing..." + + local PANGO_CONFDIR= + + if multilib_enabled ; then + PANGO_CONFDIR="/etc/pango/${CHOST}" + else + PANGO_CONFDIR="/etc/pango" + fi + + mkdir -p ${PANGO_CONFDIR} + + pango-querymodules > ${PANGO_CONFDIR}/pango.modules + fi +} |