diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2011-10-18 22:22:16 +0000 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2011-10-18 22:22:16 +0000 |
commit | ad497dd02e49985b683ecbb8c803e7ff242e5bc5 (patch) | |
tree | 7f82e9417d1a40eef75cc8cc3c3d36ddbaa80b4d /app-misc | |
parent | Does not work with python-3, bug 387533 (diff) | |
download | gentoo-2-ad497dd02e49985b683ecbb8c803e7ff242e5bc5.tar.gz gentoo-2-ad497dd02e49985b683ecbb8c803e7ff242e5bc5.tar.bz2 gentoo-2-ad497dd02e49985b683ecbb8c803e7ff242e5bc5.zip |
Fix crash when parsing pdf, bug 387049
(Portage version: 2.1.10.28/cvs/Linux x86_64)
Diffstat (limited to 'app-misc')
-rw-r--r-- | app-misc/strigi/ChangeLog | 8 | ||||
-rw-r--r-- | app-misc/strigi/files/strigi-0.7.6-crash.patch | 27 | ||||
-rw-r--r-- | app-misc/strigi/strigi-0.7.6-r1.ebuild | 94 |
3 files changed, 128 insertions, 1 deletions
diff --git a/app-misc/strigi/ChangeLog b/app-misc/strigi/ChangeLog index ad386ee8adfd..ef19c6ad7f80 100644 --- a/app-misc/strigi/ChangeLog +++ b/app-misc/strigi/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-misc/strigi # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/strigi/ChangeLog,v 1.73 2011/09/27 19:31:56 dilfridge Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/strigi/ChangeLog,v 1.74 2011/10/18 22:22:16 dilfridge Exp $ + +*strigi-0.7.6-r1 (18 Oct 2011) + + 18 Oct 2011; Andreas K. Huettel <dilfridge@gentoo.org> + +strigi-0.7.6-r1.ebuild, +files/strigi-0.7.6-crash.patch: + Fix crash when parsing pdf, bug 387049 27 Sep 2011; Andreas K. Huettel <dilfridge@gentoo.org> strigi-0.7.6.ebuild: Add missing boost dependency, bug 384519 diff --git a/app-misc/strigi/files/strigi-0.7.6-crash.patch b/app-misc/strigi/files/strigi-0.7.6-crash.patch new file mode 100644 index 000000000000..8696a47dc51b --- /dev/null +++ b/app-misc/strigi/files/strigi-0.7.6-crash.patch @@ -0,0 +1,27 @@ +this was originally (now adapted for gentoo) +commit 23d5ce636b7897dc3f233a5293f3164dac50566d +Author: Jos van den Oever <jos@vandenoever.info> +Date: Sun Jul 31 12:32:44 2011 +0200 + + Revert patch that breaks parsing of PDF files. + The offending patch was 672c8b7b3cb4400bc505421f4cc70cf742ed9df0. + +diff -ruN strigi-0.7.6.orig/libstreamanalyzer/lib/pdf/pdfparser.cpp strigi-0.7.6/libstreamanalyzer/lib/pdf/pdfparser.cpp +--- strigi-0.7.6.orig/libstreamanalyzer/lib/pdf/pdfparser.cpp 2011-07-26 19:12:39.000000000 +0200 ++++ strigi-0.7.6/libstreamanalyzer/lib/pdf/pdfparser.cpp 2011-10-19 00:18:51.583639819 +0200 +@@ -35,12 +35,13 @@ + PdfParser::read(int32_t min, int32_t max) { + int32_t off = (int32_t)(pos-start); + int32_t d = (int32_t)(stream->position() - bufferStart); +- bufferStart += off; ++ min += d; ++ if (max > 0) max += d; + stream->reset(bufferStart); + int32_t n = stream->read(start, min, max); + // printf("objstart %i %i\n", d, n); + if (n < min) return stream->status(); +- pos = start; ++ pos = start + off; + end = start + n; + return Ok; + } diff --git a/app-misc/strigi/strigi-0.7.6-r1.ebuild b/app-misc/strigi/strigi-0.7.6-r1.ebuild new file mode 100644 index 000000000000..e90afaf1738c --- /dev/null +++ b/app-misc/strigi/strigi-0.7.6-r1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-misc/strigi/strigi-0.7.6-r1.ebuild,v 1.1 2011/10/18 22:22:16 dilfridge Exp $ + +EAPI=4 + +if [[ "${PV}" != "9999" ]]; then + SRC_URI="http://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" +else + EGIT_REPO_URI="git://anongit.kde.org/strigi" + GIT_ECLASS="git-2" + EGIT_HAS_SUBMODULES="true" + KEYWORDS="" +fi + +inherit cmake-utils ${GIT_ECLASS} + +DESCRIPTION="Fast crawling desktop search engine with Qt4 GUI" +HOMEPAGE="https://projects.kde.org/projects/kdesupport/strigi/strigi" + +LICENSE="GPL-2" +SLOT="0" +IUSE="clucene +dbus debug exif fam ffmpeg hyperestraier inotify log +qt4 test" + +COMMONDEPEND=" + app-arch/bzip2:0 + dev-libs/boost + dev-libs/libxml2:2 + sys-libs/zlib:0 + virtual/libiconv + clucene? ( >=dev-cpp/clucene-0.9.21[-debug] ) + dbus? ( + sys-apps/dbus + qt4? ( x11-libs/qt-dbus:4 ) + ) + exif? ( >=media-gfx/exiv2-0.17 ) + fam? ( virtual/fam ) + ffmpeg? ( virtual/ffmpeg ) + hyperestraier? ( app-text/hyperestraier ) + log? ( >=dev-libs/log4cxx-0.10.0 ) + qt4? ( + x11-libs/qt-core:4 + x11-libs/qt-gui:4 + ) +" +DEPEND="${COMMONDEPEND} + test? ( dev-util/cppunit )" +RDEPEND="${COMMONDEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-0.7.5-no-qt4.patch" + "${FILESDIR}/${PN}-0.7.6-crash.patch" +) + +src_configure() { + # Enabled: POLLING (only reliable way to check for files changed.) + # Disabled: xine - recommended upstream to keep it this way + mycmakeargs=( + -DENABLE_POLLING=ON + -DFORCE_DEPS=ON + -DENABLE_CPPUNIT=OFF + -DENABLE_REGENERATEXSD=OFF + -DENABLE_XINE=OFF + $(cmake-utils_use_enable clucene) + $(cmake-utils_use_enable dbus) + $(cmake-utils_use_enable exif EXIV2) + $(cmake-utils_use_enable fam) + $(cmake-utils_use_enable ffmpeg) + $(cmake-utils_use_enable hyperestraier) + $(cmake-utils_use_enable inotify) + $(cmake-utils_use_enable log LOG4CXX) + $(cmake-utils_use_enable qt4) + $(cmake-utils_use_enable test CPPUNIT) + ) + + if use qt4; then + mycmakeargs+=(-DENABLE_DBUS=ON) + fi + + cmake-utils_src_configure +} + +pkg_postinst() { + if ! use clucene && ! use hyperestraier; then + echo + elog "Because you didn't enable either of the available backends:" + elog "clucene or hyperestraier, strigi may not be functional." + elog "If you intend to use standalone strigi indexer (not needed for KDE)," + elog "be sure to reinstall app-misc/strigi with either clucene (recommended)" + elog "or hyperestraier (unreliable) USE flag enabled." + echo + fi +} |