diff options
author | 2013-11-27 23:11:56 +0000 | |
---|---|---|
committer | 2013-11-27 23:11:56 +0000 | |
commit | d6960e5a4c2ff0a914ea7071e4145121944e9f66 (patch) | |
tree | e7eb4d947a88426af387f431e3cbd2b52d44b1fb /media-gfx | |
parent | Stable for amd64 wrt bug #490612 (diff) | |
download | gentoo-2-d6960e5a4c2ff0a914ea7071e4145121944e9f66.tar.gz gentoo-2-d6960e5a4c2ff0a914ea7071e4145121944e9f66.tar.bz2 gentoo-2-d6960e5a4c2ff0a914ea7071e4145121944e9f66.zip |
Fix from Debian for crash when importing the python module.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/zbar/ChangeLog | 8 | ||||
-rw-r--r-- | media-gfx/zbar/files/zbar-0.10-python-crash.patch | 19 | ||||
-rw-r--r-- | media-gfx/zbar/zbar-0.10-r4.ebuild | 67 |
3 files changed, 93 insertions, 1 deletions
diff --git a/media-gfx/zbar/ChangeLog b/media-gfx/zbar/ChangeLog index fff0edc70b93..77023dafb80c 100644 --- a/media-gfx/zbar/ChangeLog +++ b/media-gfx/zbar/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-gfx/zbar # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/zbar/ChangeLog,v 1.13 2013/06/29 09:37:13 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/zbar/ChangeLog,v 1.14 2013/11/27 23:11:56 vapier Exp $ + +*zbar-0.10-r4 (27 Nov 2013) + + 27 Nov 2013; Mike Frysinger <vapier@gentoo.org> + +files/zbar-0.10-python-crash.patch, +zbar-0.10-r4.ebuild: + Fix from Debian for crash when importing the python module. 29 Jun 2013; Agostino Sarubbo <ago@gentoo.org> zbar-0.10-r3.ebuild: Stable for x86, wrt bug #474522 diff --git a/media-gfx/zbar/files/zbar-0.10-python-crash.patch b/media-gfx/zbar/files/zbar-0.10-python-crash.patch new file mode 100644 index 000000000000..a6f7a96e34db --- /dev/null +++ b/media-gfx/zbar/files/zbar-0.10-python-crash.patch @@ -0,0 +1,19 @@ +https://sourceforge.net/p/zbar/patches/37/ + +fix from Debian for crashes when importing the python module. +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702499 + +this doesn't happen on some arches as the data naturally ends up with zero +data after the structure, but on some (like arm), it isn't so we crash when +python walks the list. + +--- a/python/imagescanner.c ++++ b/python/imagescanner.c +@@ -68,6 +68,7 @@ imagescanner_get_results (zbarImageScanner *self, + + static PyGetSetDef imagescanner_getset[] = { + { "results", (getter)imagescanner_get_results, }, ++ { NULL }, + }; + + static PyObject* diff --git a/media-gfx/zbar/zbar-0.10-r4.ebuild b/media-gfx/zbar/zbar-0.10-r4.ebuild new file mode 100644 index 000000000000..0838330ca674 --- /dev/null +++ b/media-gfx/zbar/zbar-0.10-r4.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/zbar/zbar-0.10-r4.ebuild,v 1.1 2013/11/27 23:11:55 vapier Exp $ + +EAPI=5 +PYTHON_DEPEND="2:2.6" + +inherit autotools eutils flag-o-matic python + +DESCRIPTION="Library and tools for reading barcodes from images or video" +HOMEPAGE="http://zbar.sourceforge.net/" +SRC_URI="mirror://sourceforge/zbar/${P}.tar.bz2" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="gtk imagemagick jpeg python qt4 static-libs +threads v4l X xv" + +RDEPEND="gtk? ( dev-libs/glib:2 x11-libs/gtk+:2 ) + imagemagick? ( + || ( media-gfx/imagemagick + media-gfx/graphicsmagick[imagemagick] ) ) + jpeg? ( virtual/jpeg ) + python? ( gtk? ( >=dev-python/pygtk-2 ) ) + qt4? ( dev-qt/qtcore:4 dev-qt/qtgui:4 ) + X? ( x11-libs/libXext + xv? ( x11-libs/libXv ) )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-no-v4l1-check.patch + epatch "${FILESDIR}"/${P}-errors.patch + epatch "${FILESDIR}"/${P}-python-crash.patch + + python_convert_shebangs 2 examples/upcrpc.py test/{barcodetest,test_pygtk}.py + + sed -i -e '/AM_INIT_AUTOMAKE/s:-Werror ::' configure.ac || die #423581 + eautoreconf +} + +src_configure() { + append-cppflags -DNDEBUG + econf \ + $(use_with jpeg) \ + $(use_with gtk) \ + $(use_with imagemagick) \ + $(use_with python) \ + $(use_with qt4 qt) \ + $(use_enable static-libs static) \ + $(use_enable threads pthread) \ + $(use_with X x) \ + $(use_with xv xv) \ + $(use_enable v4l video) +} + +src_install() { + emake DESTDIR="${D}" install + dodoc HACKING NEWS README TODO + rm -r "${ED}"/usr/share/doc/${PN} + prune_libtool_files --all +} |