summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-12-29 10:35:10 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-12-29 10:35:10 +0000
commitfb546ca1b5910964bdebf8da8c8e15ff94a95069 (patch)
tree082b759611327ba8f74ff288c098d2897a37de42
parentAdd missing eet dependency (diff)
downloadgentoo-2-fb546ca1b5910964bdebf8da8c8e15ff94a95069.tar.gz
gentoo-2-fb546ca1b5910964bdebf8da8c8e15ff94a95069.tar.bz2
gentoo-2-fb546ca1b5910964bdebf8da8c8e15ff94a95069.zip
Print the filename and line being parsed if g-ir-scanner crashes while parsing a gtk-doc annotation. Update to EAPI5 and python-single-r1.
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key CF0ADD61)
-rw-r--r--dev-libs/gobject-introspection/ChangeLog10
-rw-r--r--dev-libs/gobject-introspection/files/gobject-introspection-1.34.2-better-traceback.patch43
-rw-r--r--dev-libs/gobject-introspection/gobject-introspection-1.34.2-r1.ebuild87
3 files changed, 139 insertions, 1 deletions
diff --git a/dev-libs/gobject-introspection/ChangeLog b/dev-libs/gobject-introspection/ChangeLog
index f7412124e856..c8a12896bc52 100644
--- a/dev-libs/gobject-introspection/ChangeLog
+++ b/dev-libs/gobject-introspection/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-libs/gobject-introspection
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/gobject-introspection/ChangeLog,v 1.84 2012/12/09 18:33:49 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/gobject-introspection/ChangeLog,v 1.85 2012/12/29 10:35:10 tetromino Exp $
+
+*gobject-introspection-1.34.2-r1 (29 Dec 2012)
+
+ 29 Dec 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
+ +gobject-introspection-1.34.2-r1.ebuild,
+ +files/gobject-introspection-1.34.2-better-traceback.patch:
+ Print the filename and line being parsed if g-ir-scanner crashes while
+ parsing a gtk-doc annotation. Update to EAPI5 and python-single-r1.
09 Dec 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
gobject-introspection-1.30.0-r2.ebuild, gobject-introspection-1.32.1.ebuild,
diff --git a/dev-libs/gobject-introspection/files/gobject-introspection-1.34.2-better-traceback.patch b/dev-libs/gobject-introspection/files/gobject-introspection-1.34.2-better-traceback.patch
new file mode 100644
index 000000000000..296ef17b07f7
--- /dev/null
+++ b/dev-libs/gobject-introspection/files/gobject-introspection-1.34.2-better-traceback.patch
@@ -0,0 +1,43 @@
+From 3e452d88e285531f78707de9a0326649d537e59f Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Sat, 29 Dec 2012 05:22:08 -0500
+Subject: [PATCH] scanner: add filename/line to the backtrace if
+ parse_comment_block() raised an exception
+
+In most cases, such exceptions are caused by gtk-doc syntax errors in
+annotations, and developers want to see which annotation made g-ir-scanner
+crash.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=690850
+---
+ giscanner/annotationparser.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
+index f545590..f33e956 100644
+--- a/giscanner/annotationparser.py
++++ b/giscanner/annotationparser.py
+@@ -24,6 +24,7 @@
+
+
+ import re
++import traceback
+
+ from . import message
+ from .odict import odict
+@@ -766,7 +767,11 @@ class AnnotationParser(object):
+ comment_blocks = {}
+
+ for comment in comments:
+- comment_block = self.parse_comment_block(comment)
++ try:
++ comment_block = self.parse_comment_block(comment)
++ except:
++ message.fatal("error when parsing comment block\n%s" % traceback.format_exc(),
++ message.Position(comment[1], comment[2]))
+
+ if comment_block is not None:
+ # Note: previous versions of this parser did not check
+--
+1.8.0.2
+
diff --git a/dev-libs/gobject-introspection/gobject-introspection-1.34.2-r1.ebuild b/dev-libs/gobject-introspection/gobject-introspection-1.34.2-r1.ebuild
new file mode 100644
index 000000000000..10a9f26f2588
--- /dev/null
+++ b/dev-libs/gobject-introspection/gobject-introspection-1.34.2-r1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/gobject-introspection/gobject-introspection-1.34.2-r1.ebuild,v 1.1 2012/12/29 10:35:10 tetromino Exp $
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="xml"
+
+inherit eutils gnome2 python-single-r1 toolchain-funcs
+
+DESCRIPTION="Introspection infrastructure for generating gobject library bindings for various languages"
+HOMEPAGE="http://live.gnome.org/GObjectIntrospection/"
+
+LICENSE="LGPL-2+ GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+IUSE="doctool test"
+
+RDEPEND="
+ >=dev-libs/gobject-introspection-common-${PV}
+ >=dev-libs/glib-2.34.1:2
+ doctool? ( dev-python/mako )
+ virtual/libffi:=
+"
+# Wants real bison, not virtual/yacc
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.15
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+# PDEPEND to avoid circular dependencies, bug #391213
+PDEPEND="x11-libs/cairo[glib]"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # To prevent crosscompiling problems, bug #414105
+ CC=$(tc-getCC)
+
+ DOCS="AUTHORS CONTRIBUTORS ChangeLog NEWS README TODO"
+ G2CONF="${G2CONF}
+ --disable-static
+ YACC=$(type -p yacc)
+ $(use_enable doctool)
+ $(use_enable test tests)"
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=690850
+ epatch "${FILESDIR}/${PN}-1.34.2-better-traceback.patch"
+
+ gnome2_src_prepare
+
+ # avoid GNU-isms
+ sed -i -e 's/\(if test .* \)==/\1=/' configure || die
+
+ gi_skip_tests=
+ if ! has_version "x11-libs/cairo[glib]"; then
+ # Bug #391213: enable cairo-gobject support even if it's not installed
+ # We only PDEPEND on cairo to avoid circular dependencies
+ export CAIRO_LIBS="-lcairo -lcairo-gobject"
+ export CAIRO_CFLAGS="-I${EPREFIX}/usr/include/cairo"
+ if use test; then
+ G2CONF="${G2CONF} --disable-tests"
+ gi_skip_tests=yes
+ ewarn "Tests will be skipped because x11-libs/cairo[glib] is not present"
+ ewarn "on your system. Consider installing it to get tests to run."
+ fi
+ fi
+}
+
+src_test() {
+ [[ -z ${gi_skip_tests} ]] && default
+}
+
+src_install() {
+ gnome2_src_install
+
+ # Prevent collision with gobject-introspection-common
+ rm -v "${ED}"usr/share/aclocal/introspection.m4 \
+ "${ED}"usr/share/gobject-introspection-1.0/Makefile.introspection || die
+ rmdir "${ED}"usr/share/aclocal || die
+}