[bibletime/f16] Update to 2.8.2 Add patch by Jonathan Dieter (jdieter at lesbg.com) so it builds against CLucene-2.3.3

Deji Akingunola deji at fedoraproject.org
Thu Oct 20 06:04:00 UTC 2011


commit 6681ee436f72cb36f18ac07597d51fe1d9f19c71
Author: Deji Akingunola <dakingun at mail.com>
Date:   Thu Oct 20 02:07:03 2011 -0400

    Update to 2.8.2
    Add patch by Jonathan Dieter (jdieter at lesbg.com) so it builds
    against CLucene-2.3.3

 bibletime-clucene2.patch |   90 ++++++++++++++++++++++++++++++++++++++++++++++
 bibletime.spec           |   11 +++++-
 sources                  |    2 +-
 3 files changed, 100 insertions(+), 3 deletions(-)
---
diff --git a/bibletime-clucene2.patch b/bibletime-clucene2.patch
new file mode 100644
index 0000000..c88b9eb
--- /dev/null
+++ b/bibletime-clucene2.patch
@@ -0,0 +1,90 @@
+--- cmake/FindCLucene.cmake	2011-08-27 14:37:29.000000000 -0400
++++ cmake/FindCLucene.cmake.new	2011-10-20 00:11:40.777189102 -0400
+@@ -95,6 +95,18 @@
+         MESSAGE(ERROR "CLucene version 0.9.17 is not supported.")
+             SET(CLUCENE_GOOD_VERSION FALSE)
+     ENDIF (CLUCENE_VERSION STREQUAL "0.9.17")
++    IF (CLUCENE_VERSION STRGREATER "2.0.0")
++        FIND_LIBRARY_WITH_DEBUG(CLUCENE_SHARED_LIB
++            NAMES clucene-shared
++            PATHS ${TRIAL_LIBRARY_PATHS})
++
++        IF (CLUCENE_SHARED_LIB)
++            MESSAGE(STATUS "Found CLucene shared library: ${CLUCENE_SHARED_LIB}")
++        ELSE (CLUCENE_SHARED_LIB)
++            MESSAGE(FATAL_ERROR "Unable to find CLucene shared library.")
++            SET(CLUCENE_GOOD_VERSION FALSE)
++        ENDIF(CLUCENE_SHARED_LIB)
++    ENDIF (CLUCENE_VERSION STRGREATER "2.0.0")
+     ENDIF (CLMATCH)
+ ELSE (CLUCENE_LIBRARY_DIR)
+     MESSAGE(STATUS "CLucene library dir not found.")
+--- CMakeLists.txt	2011-08-27 14:37:29.000000000 -0400
++++ CMakeLists.txt.new	2011-10-20 00:14:03.885400003 -0400
+@@ -147,6 +147,7 @@
+     TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME}
+         ${QT_LIBRARIES}
+         ${CLUCENE_LIBRARY}
++        ${CLUCENE_SHARED_LIB}
+         ${CURL_LIBRARIES} # optional, empty if not found
+         ${ICU_LIBRARIES} # optional, empty if not found
+         ${ICU_I18N_LIBRARIES} # optional, empty if not found
+@@ -163,6 +164,7 @@
+     TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME}
+         ${QT_LIBRARIES}
+         ${CLUCENE_LIBRARY}
++        ${CLUCENE_SHARED_LIB}
+         ${CURL_LIBRARIES} # optional, empty if not found
+         ${ICU_LIBRARIES} # optional, empty if not found
+         ${ICU_I18N_LIBRARIES} # optional, empty if not found
+--- src/backend/drivers/cswordmoduleinfo.cpp	2011-08-27 14:37:29.000000000 -0400
++++ src/backend/drivers/cswordmoduleinfo.cpp.new	2011-10-20 00:45:12.549038492 -0400
+@@ -11,8 +11,6 @@
+ 
+ #include <QSharedPointer>
+ #include <CLucene.h>
+-#include <CLucene/util/Misc.h>
+-#include <CLucene/util/Reader.h>
+ #include <QByteArray>
+ #include <QCoreApplication>
+ #include <QDebug>
+@@ -260,7 +258,6 @@
+         QSharedPointer<lucene::index::IndexWriter> writer( new lucene::index::IndexWriter(index.toAscii().constData(), &an, true) ); //always create a new index
+         writer->setMaxFieldLength(BT_MAX_LUCENE_FIELD_LENGTH);
+         writer->setUseCompoundFile(true); //merge segments into a single file
+-        writer->setMinMergeDocs(1000);
+ 
+         m_module->setPosition(sword::TOP);
+         unsigned long verseLowIndex = m_module->Index();
+@@ -458,7 +455,7 @@
+         lucene_utf8towcs(wcharBuffer, searchedText.toUtf8().constData(), BT_MAX_LUCENE_FIELD_LENGTH);
+         QSharedPointer<lucene::search::Query> q( lucene::queryParser::QueryParser::parse((const TCHAR*)wcharBuffer, (const TCHAR*)_T("content"), &analyzer) );
+ 
+-        QSharedPointer<lucene::search::Hits> h( searcher.search(q.data(), lucene::search::Sort::INDEXORDER) );
++        QSharedPointer<lucene::search::Hits> h( searcher.search(q.data(), lucene::search::Sort::INDEXORDER()) );
+ 
+         /// \warning This is a workaround for Sword constness
+         const bool useScope = (const_cast<sword::ListKey&>(scope).Count() > 0);
+@@ -468,7 +465,7 @@
+         QSharedPointer<sword::SWKey> swKey( module()->CreateKey() );
+ 
+ 
+-        for (int i = 0; i < h->length(); ++i) {
++        for (unsigned int i = 0; i < h->length(); ++i) {
+             doc = &h->doc(i);
+             lucene_wcstoutf8(utfBuffer, (const wchar_t*)doc->get((const TCHAR*)_T("key")), BT_MAX_LUCENE_FIELD_LENGTH);
+ 
+--- src/backend/drivers/cswordmoduleinfo.h	2011-08-27 14:37:29.000000000 -0400
++++ src/backend/drivers/cswordmoduleinfo.h.new	2011-10-20 00:56:58.794209212 -0400
+@@ -23,7 +23,10 @@
+ #include <swsearchable.h>
+ #include <swversion.h>
+ 
+-
++// CLucene no longer lists the following functions in its headers
++extern size_t lucene_utf8towcs(wchar_t *, const char *,  size_t maxslen);
++extern size_t lucene_wcstoutf8 (char *,  const wchar_t *, size_t maxslen);
++ 
+ class CSwordBackend;
+ class CSwordKey;
+ 
diff --git a/bibletime.spec b/bibletime.spec
index b40c979..0ca50b3 100644
--- a/bibletime.spec
+++ b/bibletime.spec
@@ -1,14 +1,15 @@
 Summary:	An easy to use Bible study tool
 Name:		bibletime
-Version:	2.8.1
+Version:	2.8.2
 Release:	1%{?dist}
 License:	GPLv2
 Url:		http://www.bibletime.info/
 Group:		Applications/Productivity
 Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
+Patch0:         bibletime-clucene2.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:	cmake qt4-webkit-devel
-BuildRequires:	sword-devel >= 1.5.10 clucene-core-devel >= 0.9.16a
+BuildRequires:	sword-devel >= 1.5.10 clucene-core-devel >= 2.3.3
 BuildRequires:	boost-devel openssl-devel curl-devel zlib-devel dbus-devel
 BuildRequires:	desktop-file-utils gettext
 
@@ -23,6 +24,7 @@ BibleTime is a frontend for the  SWORD Bible Framework.
 %prep
 
 %setup -q
+%patch0 -p0
 
 %build
 mkdir fedora
@@ -82,6 +84,11 @@ done
 %doc ChangeLog README LICENSE
 
 %changelog
+* Thu Oct 20 2011 Deji Akingunola <dakingun at gmail.com> - 2.8.2-1
+- Update to 2.8.2
+- Add patch by Jonathan Dieter (jdieter at lesbg.com) so it builds
+  against CLucene-2.3.3
+
 * Thu Jun 02 2011 Deji Akingunola <dakingun at gmail.com> - 2.8.1-1
 - Update to 2.8.1
 
diff --git a/sources b/sources
index efa0f90..e0ede0e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-2037e6995ffb7ecdc153a8d2d55de46f  bibletime-2.8.1.tar.bz2
+2e17bf35f1e79b5fcd193d9e620d4961  bibletime-2.8.2.tar.bz2


More information about the scm-commits mailing list