summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2011-03-01 21:53:28 +0000
committerPeter Volkov <pva@gentoo.org>2011-03-01 21:53:28 +0000
commit35ed7c86b55644bff17562f04dfe6e0ae3bf991e (patch)
tree5a49aa3368b4d4d03fb703251d27343cf74c8b08
parentAdd ~amd64-linux/~x86-linux keywords (diff)
downloadhistorical-35ed7c86b55644bff17562f04dfe6e0ae3bf991e.tar.gz
historical-35ed7c86b55644bff17562f04dfe6e0ae3bf991e.tar.bz2
historical-35ed7c86b55644bff17562f04dfe6e0ae3bf991e.zip
Upstream patch to fix occasional segfault when flipping pages very quickly.
Package-Manager: portage-2.1.9.41/cvs/Linux x86_64
-rw-r--r--app-text/djview4/ChangeLog10
-rw-r--r--app-text/djview4/Manifest4
-rw-r--r--app-text/djview4/djview4-4.6-r1.ebuild75
-rw-r--r--app-text/djview4/files/djview4-4.6-segfault.patch79
4 files changed, 165 insertions, 3 deletions
diff --git a/app-text/djview4/ChangeLog b/app-text/djview4/ChangeLog
index 33da8941d9b6..236a8135d270 100644
--- a/app-text/djview4/ChangeLog
+++ b/app-text/djview4/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-text/djview4
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/djview4/ChangeLog,v 1.31 2010/10/15 14:08:07 pva Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/djview4/ChangeLog,v 1.32 2011/03/01 21:53:27 pva Exp $
+
+*djview4-4.6-r1 (01 Mar 2011)
+
+ 01 Mar 2011; Peter Volkov <pva@gentoo.org> +djview4-4.6-r1.ebuild,
+ +files/djview4-4.6-segfault.patch:
+ Upstream patch to fix occasional segfault when flipping pages very quickly.
*djview4-4.6 (15 Oct 2010)
diff --git a/app-text/djview4/Manifest b/app-text/djview4/Manifest
index 35007bc98efc..0139f2642ffc 100644
--- a/app-text/djview4/Manifest
+++ b/app-text/djview4/Manifest
@@ -1,7 +1,9 @@
AUX djview4-4.5-libtool.patch 620 RMD160 197149d84cd3cd1bf89f6f097f6e537616a2c63e SHA1 1d09eb5cd940ffc20b8a283368c2dc80e1b959e9 SHA256 c26dbd8dcc6738bf635f196054222c5c4c69b7d799b7a36f4b29819e9a8c19ec
+AUX djview4-4.6-segfault.patch 2933 RMD160 fe853dbbd75c078aca2509faeadd4f270c5b7bf6 SHA1 08fdab5e01464a81b0b14321b6948f86861196b9 SHA256 e39a07f8bbe957c634ded1eb7b18eddf8e5d0bb93124f69d5e8b4fc87751b594
DIST djview4-4.5.tar.gz 895611 RMD160 256abad9cc6d661ba19caf209b74d9937eec4bce SHA1 d2fd259aa88f80393767f6dec921463da7820143 SHA256 8dc1d8013d51d4026a05d7ef4289c4c9b27de9d9b7d6bf960e4a9636b3b71276
DIST djview4-4.6.tar.gz 893657 RMD160 a9116466ba1dc2441ed385928b2f54d71fab525b SHA1 72d98fde9c6406ee714830118d06767b561941fd SHA256 036205cda1f134301bdbf2db69113a86f014ce47933e9a15da54687fe728d95b
EBUILD djview4-4.5-r1.ebuild 1965 RMD160 574dfb872269618ec86633984ae1752c9a7a8624 SHA1 814192b9b8b438391390ba1ceeeef2a9d1a8637c SHA256 61b77e8acb929c19b8a60869d45e8929faaacd78be05a67353f560d3c8dfc309
+EBUILD djview4-4.6-r1.ebuild 1983 RMD160 ee404d7a096aa42ac7de4cb27e7e584e33b477ea SHA1 1cf5ba11820add70b77f154b7d84d8de020bc241 SHA256 f0494984cda536cb50279d9035c9ac6c6ba96bfc5b576ba46b4b78b2b5370dc6
EBUILD djview4-4.6.ebuild 1931 RMD160 cd48be3536b9914ec4dd6053a9e0c6cbecea3075 SHA1 f54f4612e2732a903878c8d6784b90604da98ca2 SHA256 b79bda5b23f062374bf95cf36bd141e95474d37d61d57b39235dfd3f2ef4d13a
-MISC ChangeLog 3991 RMD160 22a73e9eeb7392c8062426b57d7e712c6801ed98 SHA1 792ba4417ac4b783e72112108452601412a1586e SHA256 dd49a6217126c6b652e533f550f6953451e2d4ad3e43d8027263bc1888fb9cae
+MISC ChangeLog 4207 RMD160 aac8d8d3a9f2777b32dc35ec4de7563f5cceb5f9 SHA1 ad15486fc48387997d1a84b75fd4d2270d932f02 SHA256 767e86a11a470e2865d186aee92e758175c05c72cf45910cf344a378ee62a926
MISC metadata.xml 241 RMD160 82bb30f2baae19cecf35e2619cf41501c4b93c0f SHA1 23319951328fb53159640f97e84a8109eef97220 SHA256 674b443e9f1d7bd038d429926e64c40165401c5347f9a6e9ecb1be33c0e8ab93
diff --git a/app-text/djview4/djview4-4.6-r1.ebuild b/app-text/djview4/djview4-4.6-r1.ebuild
new file mode 100644
index 000000000000..c3a4a48eef8d
--- /dev/null
+++ b/app-text/djview4/djview4-4.6-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/djview4/djview4-4.6-r1.ebuild,v 1.1 2011/03/01 21:53:28 pva Exp $
+
+EAPI="3"
+
+inherit eutils autotools versionator toolchain-funcs multilib nsplugins fdo-mime flag-o-matic
+
+MY_P=${PN}-$(replace_version_separator 2 '-')
+
+DESCRIPTION="Portable DjVu viewer using Qt4"
+HOMEPAGE="http://djvu.sourceforge.net/djview4.html"
+SRC_URI="mirror://sourceforge/djvu/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="debug nsplugin"
+
+RDEPEND="
+ >=app-text/djvu-3.5.22-r1
+ x11-libs/qt-gui:4"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ nsplugin? ( dev-libs/glib:2 )"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-2)
+
+src_prepare() {
+ epatch "${FILESDIR}/djview4-4.6-segfault.patch"
+ # Force XEmbed instead of Xt-based mainloop (disable Xt autodep)
+ sed -e 's:\(ac_xt=\)yes:\1no:' -i configure* || die
+ sed 's/AC_CXX_OPTIMIZE/OPTS=;AC_SUBST(OPTS)/' -i configure.ac || die #263688
+ rm aclocal.m4 config/{libtool.m4,install-sh,ltmain.sh,lt*.m4}
+ AT_M4DIR="config" eautoreconf
+}
+
+src_configure() {
+ # See config/acinclude.m4
+ use debug || append-cppflags "-DNDEBUG"
+
+ # QTDIR is needed because of kde3
+ QTDIR=/usr \
+ econf \
+ --with-x \
+ $(use_enable nsplugin nsdejavu) \
+ --disable-desktopfiles
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) CXX=$(tc-getCXX) || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ plugindir=/usr/$(get_libdir)/${PLUGINS_DIR} \
+ install || die "emake install failed"
+
+ dodoc README TODO NEWS || die "dodoc failed"
+
+ cd desktopfiles
+ insinto /usr/share/icons/hicolor/32x32/apps
+ newins hi32-djview4.png djvulibre-djview4.png
+ insinto /usr/share/icons/hicolor/scalable/apps
+ newins djview.svg djvulibre-djview4.svg
+ domenu djvulibre-djview4.desktop
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/app-text/djview4/files/djview4-4.6-segfault.patch b/app-text/djview4/files/djview4-4.6-segfault.patch
new file mode 100644
index 000000000000..e19d0961f24a
--- /dev/null
+++ b/app-text/djview4/files/djview4-4.6-segfault.patch
@@ -0,0 +1,79 @@
+From: leonb <leonb>
+Date: Wed, 24 Nov 2010 01:57:04 +0000 (+0000)
+Subject: Fixed occasional segfault when flipping pages very quickly.
+X-Git-Tag: debian/4.6-2~27
+X-Git-Url: http://djvu.git.sourceforge.net/git/gitweb.cgi?p=djvu%2Fdjview.git;a=commitdiff_plain;h=108bbca677f58f820cf8ab8653fc41b25ce6436f
+
+Fixed occasional segfault when flipping pages very quickly.
+---
+
+diff --git a/src/qdjvuwidget.cpp b/src/qdjvuwidget.cpp
+index 7635b52..281d12b 100644
+--- a/src/qdjvuwidget.cpp
++++ b/src/qdjvuwidget.cpp
+@@ -1711,14 +1711,17 @@ QDjVuPrivate::updatePosition(const QPoint &point, bool click, bool links)
+ return;
+ // emit pointerposition signal
+ PageInfo info;
+- Page *p = pageMap[pos.pageNo];
+- info.pageno = pos.pageNo;
+- info.width = p->width;
+- info.height = p->height;
+- info.dpi = p->dpi;
+- info.segment = widget->getSegmentForRect(selectedRect, info.pageno);
+- info.selected = selectedRect;
+- emit widget->pointerPosition(pos, info);
++ Page *p = pageMap.value(pos.pageNo,0);
++ if (p != 0)
++ {
++ info.pageno = pos.pageNo;
++ info.width = p->width;
++ info.height = p->height;
++ info.dpi = p->dpi;
++ info.segment = widget->getSegmentForRect(selectedRect, info.pageno);
++ info.selected = selectedRect;
++ emit widget->pointerPosition(pos, info);
++ }
+ // check mapareas
+ if (links)
+ checkCurrentMapArea();
+@@ -5255,16 +5258,16 @@ QDjVuWidget::nextPage(void)
+ int pageNo = page();
+ const QRect &dr = priv->deskRect;
+ const QRect &vr = priv->visibleRect;
+- const QRect &cr = priv->pageMap[pageNo]->rect;
++ const Page *pg = priv->pageMap.value(pageNo,0);
+ while (pageNo < priv->numPages - 1)
+ {
+ pageNo += 1;
+- if (priv->layoutChange || !priv->pageMap.contains(pageNo))
++ if (priv->layoutChange || !priv->pageMap.contains(pageNo) || !pg)
+ break;
+ // Skip pages until we get a meaningful change.
+ const QRect &pr = priv->pageMap[pageNo]->rect;
+ if (! vr.contains(pr))
+- if (pr.top() != cr.top() || vr.width() < dr.width())
++ if (pr.top() != pg->rect.top() || vr.width() < dr.width())
+ break;
+ }
+ setPage(pageNo);
+@@ -5277,16 +5280,16 @@ QDjVuWidget::prevPage(void)
+ int pageNo = page();
+ const QRect &dr = priv->deskRect;
+ const QRect &vr = priv->visibleRect;
+- const QRect &cr = priv->pageMap[pageNo]->rect;
++ const Page *pg = priv->pageMap.value(pageNo,0);
+ while (pageNo > 0)
+ {
+ pageNo -= 1;
+- if (priv->layoutChange || !priv->pageMap.contains(pageNo))
++ if (priv->layoutChange || !priv->pageMap.contains(pageNo) || !pg)
+ break;
+ // Skip pages until we get a meaningful change.
+ const QRect &pr = priv->pageMap[pageNo]->rect;
+ if (! vr.contains(pr))
+- if (pr.top() != cr.top() || vr.width() < dr.width())
++ if (pr.top() != pg->rect.top() || vr.width() < dr.width())
+ break;
+ }
+ setPage(pageNo);