LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File project.diff of Package xapian-core (Project home:psmt)

--- xapian-core-1.0.4-strcmp.patch.orig
+++ xapian-core-1.0.4-strcmp.patch
@@ -0,0 +1,29 @@
+--- bin/quartzcompact.cc
++++ bin/quartzcompact.cc
+@@ -339,7 +339,7 @@
+ 
+ 	    vector<Btree *> btrees;
+ 
+-	    if (*t == "postlist") {
++	    if (!strcmp(*t, "postlist")) {
+ 		priority_queue<PostlistCursor *, vector<PostlistCursor *>,
+ 			       CursorGt> pq;
+ 		for (size_t i = 0; i < out_of; ++i) {
+@@ -408,7 +408,7 @@
+ 			delete bc;
+ 		    }
+ 		}
+-	    } else if (*t == "position") {
++	    } else if (!strcmp(*t, "position")) {
+ 		priority_queue<PositionCursor *, vector<PositionCursor *>,
+ 			       CursorGt> pq;
+ 		for (size_t i = 0; i < out_of; ++i) {
+@@ -473,7 +473,7 @@
+ 			bad_stat = true;
+ 		}
+ 
+-		if (*t == "record") {
++		if (!strcmp(*t, "record")) {
+ 		    // Merge the METAINFO tags from each database into one.
+ 		    // They have a key with a single zero byte, which will
+ 		    // always be the first key.
--- xapian-core-1.0.4_gcc43.patch.orig
+++ xapian-core-1.0.4_gcc43.patch
@@ -1,6 +1,6 @@
 Index: api/maptermlist.h
-===================================================================
---- api/maptermlist.h.orig
+================================================================================
+--- api/maptermlist.h
 +++ api/maptermlist.h
 @@ -29,6 +29,8 @@
  
@@ -11,21 +11,7 @@ Index: api/maptermlist.h
  using namespace std;
  
  class MapTermList : public TermList {
-Index: common/vectortermlist.h
-===================================================================
---- common/vectortermlist.h.orig
-+++ common/vectortermlist.h
-@@ -28,6 +28,7 @@
- 
- #include <list>
- #include <vector>
-+#include <cstdlib>
- 
- using namespace std;
- 
-Index: backends/alltermslist.cc
-===================================================================
---- backends/alltermslist.cc.orig
+--- backends/alltermslist.cc
 +++ backends/alltermslist.cc
 @@ -25,6 +25,7 @@
  #include "omassert.h"
@@ -35,15 +21,23 @@ Index: backends/alltermslist.cc
  
  using namespace std;
  
-Index: bin/xapian-progsrv.cc
-===================================================================
---- bin/xapian-progsrv.cc.orig
+--- bin/xapian-progsrv.cc
 +++ bin/xapian-progsrv.cc
-@@ -26,6 +26,7 @@
- 
+@@ -27,6 +27,7 @@
+ #include <cstdlib>
  #include <iostream>
  #include <string>
 +#include <cstdlib>
  
  using namespace std;
  
+--- common/vectortermlist.h
++++ common/vectortermlist.h
+@@ -28,6 +28,7 @@
+ 
+ #include <list>
+ #include <vector>
++#include <cstdlib>
+ 
+ using namespace std;
+ 
Files xapian-core-1.0.6.tar.gz.orig and xapian-core-1.0.6.tar.gz differ
--- xapian-core-cpp_c_includes.patch.orig
+++ xapian-core-cpp_c_includes.patch
@@ -0,0 +1,166 @@
+--- backends/flint/flint_btreeutil.h
++++ backends/flint/flint_btreeutil.h
+@@ -25,7 +25,11 @@
+ #include "flint_types.h"
+ #include "omassert.h"
+ 
++#ifdef _MSC_VER
+ #include <string.h>  /* memset */
++#else
++#include <cstring>
++#endif
+ 
+ /* The unit of access into the DB files is an unsigned char, which is defined
+    as 'byte' with a typedef.
+--- backends/flint/flint_spelling.h
++++ backends/flint/flint_spelling.h
+@@ -29,7 +29,11 @@
+ #include <map>
+ #include <set>
+ #include <string>
++#ifdef _MSC_VER
+ #include <string.h> // For memcpy() and memcmp().
++#else
++#include <cstring>
++#endif
+ 
+ struct fragment {
+     char data[4];
+--- backends/quartz/btree_util.h
++++ backends/quartz/btree_util.h
+@@ -25,7 +25,11 @@
+ #include "quartz_types.h"
+ #include "omassert.h"
+ 
++#ifdef _MSC_VER
+ #include <string.h>  /* memset */
++#else
++#include <cstring>
++#endif
+ #include "safeunistd.h" /* for close() */
+ 
+ #include <string>
+--- backends/quartz/quartz_log.h
++++ backends/quartz/quartz_log.h
+@@ -26,7 +26,11 @@
+ #define OM_HGUARD_QUARTZ_LOG_H
+ 
+ #include <string>
++#ifdef _MSC_VER
+ #include <stdio.h>
++#else
++#include <cstdio>
++#endif
+ #include <xapian/error.h>
+ 
+ /** Class managing a logfile for quartz.
+--- common/omenquireinternal.h
++++ common/omenquireinternal.h
+@@ -29,7 +29,11 @@
+ #include <xapian/sorter.h>
+ #include <xapian/query.h>
+ #include <algorithm>
++#ifdef _MSC_VER
+ #include <math.h>
++#else
++#include <cmath>
++#endif
+ #include <map>
+ #include <set>
+ 
+--- common/omtime.h
++++ common/omtime.h
+@@ -30,7 +30,11 @@
+ #ifdef HAVE_FTIME
+ #include <sys/timeb.h>   /* time */
+ #endif
++#ifdef _MSC_VER
+ #include <time.h>
++#else
++#include <ctime>
++#endif
+ 
+ #include <xapian/types.h>
+ 
+--- common/safeerrno.h
++++ common/safeerrno.h
+@@ -31,6 +31,10 @@
+ #if defined __DECCXX && defined HAVE_SYS_ERRNO_H
+ # include <sys/errno.h>
+ #endif
++#ifdef _MSC_VER
+ #include <errno.h>
++#else
++#include <cerrno>
++#endif
+ 
+ #endif // XAPIAN_INCLUDED_SAFEERRNO_H
+--- common/safesysselect.h
++++ common/safesysselect.h
+@@ -35,6 +35,10 @@
+ #endif
+ 
+ // On Solaris FDSET uses memset but fails to prototype it.
++#ifdef _MSC_VER
+ #include <string.h>
++#else
++#include <cstring>
++#endif
+ 
+ #endif // XAPIAN_INCLUDED_SAFESYSSELECT_H
+--- common/stringutils.h
++++ common/stringutils.h
+@@ -25,7 +25,11 @@
+ 
+ #include <algorithm>
+ #include <string>
++#ifdef _MSC_VER
+ #include <string.h>
++#else
++#include <cstring>
++#endif
+ 
+ /** Helper macro for STRINGIZE - the nested call is required because of how
+  *  # works in macros.
+--- common/utils.h
++++ common/utils.h
+@@ -28,7 +28,11 @@
+ #include <string>
+ using std::string;
+ 
++#ifdef _MSC_VER
+ #include <stdlib.h>
++#else
++#include <cstdlib>
++#endif
+ #include <sys/types.h>
+ #include "safesysstat.h"
+ #include "safeunistd.h"
+--- languages/steminternal.h
++++ languages/steminternal.h
+@@ -24,7 +24,11 @@
+ #include <xapian/base.h>
+ #include <xapian/stem.h>
+ 
++#ifdef _MSC_VER
+ #include <stdlib.h>
++#else
++#include <cstdlib>
++#endif
+ #include <string>
+ 
+ // FIXME: we might want to make Stem::Internal a virtual base class and have
+--- tests/harness/testsuite.h
++++ tests/harness/testsuite.h
+@@ -33,7 +33,11 @@
+ #include <string>
+ #include <vector>
+ 
++#ifdef _MSC_VER
+ #include <float.h> // For DBL_DIG.
++#else
++#include <cfloat>
++#endif
+ 
+ /** Class which is thrown when a test case fails.
+  */
--- xapian-core-rpmlintrc.orig
+++ xapian-core-rpmlintrc
@@ -0,0 +1,9 @@
+# This line is mandatory to access the configuration functions
+from Config import *
+
+addFilter("xapian-core.* no-changelogname-tag")
+addFilter("xapian-core.* no-dependency-on xapian-core")
+addFilter("xapian-core.* source-or-patch-not-bzipped")
+addFilter("xapian-core.* zero-length.*")
+addFilter("xapian-core.* package-with-huge-docs.*")
+addFilter("libxapian15.* no-changelogname-tag")
--- xapian-core.changes.orig
+++ xapian-core.changes
@@ -1,38 +1,270 @@
 -------------------------------------------------------------------
-Mon Nov 19 23:41:33 CET 2007 - mrueckert@suse.de
+Tue Jun 17 17:16:13 CEST 2008 - pth@suse.de
+
+- Add patch to include C++ conforming C headers (cstdio etc.)
+- Update to 1.0.6:
+
+  API:
+
+  * Add new query operators OP_VALUE_LE and OP_VALUE_GE which perform
+    "single ended" range checks, and a corresponding new Query constructor.
+
+  * Add Unicode::toupper() to complement Unicode::tolower().
+
+  * Xapian::Stem has been further optimised - stemtest now runs ~2.5%
+    faster.
+
+  testsuite:
+
+  * tests/queryparsertest: Add a couple more testcases which already work to
+    improve test coverage.
+
+  * tests/apitest: Add caseconvert1 testcase to test Unicode::tolower() and
+    Unicode::toupper().
+
+  flint backend:
+
+  * xapian-check: Fix not to report an error for a database containing no
+    postings but some user metadata.
+
+  * Update the base files atomically to avoid problems with reading
+    processes finding partially written ones.
+
+  * Create lazy tables with the correct revision to avoid producing a
+    database which we later report as "corrupt" (bug#232).
+
+  * xapian-compact: Fix compaction for databases which contain user metadata
+    keys.
+
+  quartz backend:
+
+  * Update the base files atomically to avoid problems with reading
+    processes finding partially written ones.
+
+  remote backend:
+
+  * The addition of OP_VALUE_LE and OP_VALUE_GE required an update to the
+    Query serialisation, which required a minor remote protocol version
+    bump.
+
+  * Fix to actually set the writing half as the connection as non-blocking
+    when a timeout is specified.  This would have prevented timeouts from
+    operating correctly in some situations.
+
+  build system:
+
+  * configure: GCC warning flag overhaul:  Stop passing "-Wno-multichar"
+    since any multi-character character literal is bound to be a typo (I
+    believe we were only passing it after misinterpreting its sense!) Pass
+    "-Wformat-security", and "-Wconversion" for all GCC versions.  Add
+    "-Winit-self" and "-Wstrict-overflow=5" for GCC >= 4.2.  The latter
+    might prove too aggressive, but seems reasonable so far.  Fix some minor
+    niggles revealed by "-Wconversion" and "-Wstrict-overflow=5".
+
+  * Add XAPIAN_NORETURN() annotations to functions and non-virtual methods which
+    don't return.
+
+  documentation:
+
+  * docs/intro_ir.html: Briefly mention how pure boolean retrieval is supported.
+
+  * docs/valueranges.html: Fix example of using multiple VRPs to come out as a
+    "program listing".
+
+  * include/xapian/queryparser.h: Fix incorrect example in doccomment.
+
+  * docs/quickstart.html: Remove information covered by INSTALL since
+    there's no good reason to repeat it and two copies just risks one
+    getting out of date (as has happened here!)
+
+  * docs/quickstart.html: Fix very out of date reference to MSet::items
+    (bug#237).
+
+  - 1.0.5
+
+    API:
+
+    * More sophisticated sorting of results is now possible by defining a
+      functor subclassing Xapian::Sorter (bug#100).
+
+    * Xapian::Enquire now provides a public copy constructor and assignment
+      operator (bug#219).
+
+    * Xapian::Document::values_begin() didn't ensure that values had been
+      read when working on a Document read from a database.  However,
+      values_end() did (and so did values_count()) so this wasn't generally
+      a problem in practice.
+
+    * Xapian::PostingIterator::skip_to() now works correctly when running
+      over multiple databases.
+
+    * Xapian::Database::postlist_begin() no longer adds a "MultiPostList"
+      wrapper for the common case when there's only one subdatabase.
+
+    * Xapian::TradWeight now avoids division by zero in the (rare) situation
+      of the average document length being zero (which can only happen if
+      all documents are empty or only have terms with wdf 0).
+
+    * Calling Xapian::WritableDatabase methods when we don't have exactly
+      one subdatabase now throws InvalidOperationError.
+
+    testsuite:
+
+    * apitest:
+
+      + Testcases now describe the conditions they need to run, and are
+        automatically collated by a Perl script.  This makes it
+        significantly easier to add a new testcase.
+
+      + The test harness's "BackendManager" has been overhauled to allow
+        cleaner implementations of testcases which are currently hard to
+        write cleanly, and to make it easier to add new backend settings.
+
+      + Add a "multi" backend setting which runs suitable tests over two
+        subdatabases combined.  There's a corresponding new make target
+        "check-multi".
+
+      + Add more feature tests of document values.
+
+      + sortrel1 now runs for inmemory too.
+
+      + Add simple feature test for TradWeight being used to run a query.
+
+      + API classes are now tested to check they have copy constructors and
+        assignment operators, and also that most have a default constructor.
+
+      + quartztest testcases adddoc2 and adddoc3 have been reworked as
+        apitest testcases adddoc5 and adddoc6, which run for other backends.
+
+      + stubdb1 now explicitly creates the database it needs - generally
+        this bug didn't manifest because an earlier test has already created
+        it.
+
+    * queryparsertest: Add feature tests to check that ':' is being inserted
+      between prefix and term when it should be.
+
+    * Fix extracting of valgrind error messages in the test harness.
+
+    * tests/valgrind.supp: Add more variants of the zlib suppressions.
+
+    matcher:
+
+    * Xapian::Enquire: When the "first" parameter to get_mset() is non-zero,
+      avoid copying all the wanted items after performing the match.
+
+    * Fix bug in handling a pure boolean match over more than one database
+      under set_docid_order(ASCENDING) - we used to exit early which isn't
+      correct.
+
+    * When collapsing on a value, give a better lower bound on the number of
+      matches by keeping track of the number of empty collapse values seen.
+
+    * Xapian::BM25Weight: Fix bug when k2 is non-zero: a non-initialised
+      value influenced the weight calculations.  By default k2 is zero, so
+      this bug probably won't have affected most users.
+
+    * The mechanism used to collate term statistics across multiple
+      databases has been greatly simplified (bug#45).
+
+    flint backend:
+
+    * xapian-check:
+
+      + Update to handle flint databases produced by Xapian 1.0.3 and later.
+
+      + Fix not to go into an infinite loop if certain checks fail.
+
+    quartz backend:
+
+    * quartzcompact: Fix equality testing of C strings to use strcmp()
+      rather than '=='!  In practice, using '==' often gives the desired
+      effect due to pooling of constant strings, but this may have resulted
+      in a bug on some platforms.
+
+    remote backend:
+
+    * If we're doing a match with only one database which is remote then
+      just return the unserialised MSet from the remote match.  This
+      requires an update to the MSet serialisation, which requires a minor
+      remote protocol version bump.
+
+    documentation:
+
+    * sorting.html: New document on the topic of sorting match results.
+
+    * HACKING,admin_notes.html,bm25.html,glossary.html,intro_ir.html,overview.html,
+      quickstart.html,scalability.html,termgenerator,html,synonyms.html:
+      Assorted minor improvements.
+
+    * valueranges.html: State explicitly that Xapian::sortable_serialise()
+      is used to encode values at index time, and give an example of how it
+      is called.
+
+    * API documentation:
+
+     + Clarify get_wdf() versus get_termfreq().
+
+     + We now use pngcrush to reduce the size of PNG files in the HTML version.
+
+     + The HTML version no longer includes various intermediate files which
+       doxygen generates.
+
+     + Hide the v102 namespace from Doxygen as it isn't user visible.
+
+     + Stop describing get_description() as an "Introspection method", as
+       this doesn't help to explain what it does, and get_description()
+       doesn't really fall under common formal definitions of
+       "introspection".
+
+    * index.html: Add a list of documents on particular topics and include
+      links to previously unlinked-to documents.  Weed down the top
+      navigation bar which had grown to unwieldy length.
+
+    * Improve documentation comment for Document::termlist_count().
+
+-------------------------------------------------------------------
+Mon Jun 16 13:32:22 CEST 2008 - pth@suse.de
+
+- Remove 'using namespace std' from headers.
+- Fix comparison of pointer with string constant.
+- Add a rpmlintrc file.
+- Remove libtool wrapper scripts from examples directory before
+  copying.
+
+-------------------------------------------------------------------
+Mon Nov 19 2007 mrueckert@suse.de
 
 - added xapian-core-1.0.4_gcc43.patch:
   add missing includes for gcc 4.3
 
 -------------------------------------------------------------------
-Mon Nov 19 22:00:09 CET 2007 - mrueckert@suse.de
+Mon Nov 19 2007 mrueckert@suse.de
 
 - update to 1.0.4
 
 -------------------------------------------------------------------
-Sun Jun 24 11:41:40 CEST 2007 - mrueckert@suse.de
+Sun Jun 24 2007 mrueckert@suse.de
 
 - update to 1.0.1
 
 -------------------------------------------------------------------
-Sun Apr  1 21:15:32 CEST 2007 - mrueckert@suse.de
+Sun Apr  1 15:00:00 CEST 2007 mrueckert@suse.de
 
 - update to 0.9.10
 
 -------------------------------------------------------------------
-Sat Nov 11 05:10:49 CET 2006 - mrueckert@suse.de
+Sat Nov 11 2006 mrueckert@suse.de
 
 - update to 0.9.9:
   many smaller changes
 
 -------------------------------------------------------------------
-Sat Nov  4 12:08:31 CET 2006 - mrueckert@suse.de
+* Sat Nov  4 2006 mrueckert@suse.de
 
 - do not package .deps and .libs in the examples dir
 
 -------------------------------------------------------------------
-Sat Nov  4 11:41:25 CET 2006 - mrueckert@suse.de
+Sat Nov  4 2006 mrueckert@suse.de
 
 - update to 0.9.8:
   many small fixes
-
--- xapian-core.spec.orig
+++ xapian-core.spec
@@ -1,18 +1,11 @@
 #
-# spec file for package xapian-core (Version 1.0.4)
+# spec file for package xapian-core (Version 1.0.6)
 #
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# This file and all modifications and additions to the pristine
-# package are under the same license as the package itself.
-#
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
-#
-
 # norootforbuild
 
 Name:           xapian-core
-Version:        1.0.4
-Release:        0
+Version:        1.0.6
+Release:        1
 #
 License:        GPL
 Group:          Productivity/Databases/Servers
@@ -20,22 +13,30 @@ Group:          Productivity/Databases/S
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  gcc-c++ zlib-devel
 Requires:       %{name}-libs = %{version}
+%if 0%suse_version > 1020
+BuildRequires:  fdupes
+%endif
 #
 Url:            http://www.xapian.org/
 Source:         http://www.oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.tar.gz
+Source1:        %{name}-rpmlintrc
 Patch:          xapian-core-1.0.4_gcc43.patch
+Patch1:         xapian-core-cpp_c_includes.patch
 #
-Summary:        The Xapian Probabilistic Information Retrieval Library.
+Summary:        The Xapian Probabilistic Information Retrieval Library
+
 %description
 Xapian is an Open Source Probabilistic Information Retrieval Library. It
 offers a highly adaptable toolkit that allows developers to easily add advanced
 indexing and search facilities to applications.
 
-%package libs
+%package -n     libxapian15
 Group:          Development/Libraries/C and C++
+Provides:       xapian-core-libs
 #
-Summary:        Xapian search engine libraries.
-%description libs
+Summary:        Xapian search engine libraries
+
+%description -n libxapian15
 Xapian is an Open Source Probabilistic Information Retrieval framework. It
 offers a highly adaptable toolkit that allows developers to easily add advanced
 indexing and search facilities to applications. This package provides the
@@ -45,10 +46,11 @@ libraries for applications using Xapian 
 %package devel
 Group:          Development/Libraries/C and C++
 #
-Requires:       %{name}-libs = %{version}
+Requires:       libxapian15 = %{version}
 Requires:       gcc-c++ zlib-devel
 #
-Summary:        Files needed for building packages which use Xapian.
+Summary:        Files needed for building packages which use Xapian
+
 %description devel
 Xapian is an Open Source Probabilistic Information Retrieval framework. It
 offers a highly adaptable toolkit that allows developers to easily add advanced
@@ -58,24 +60,30 @@ files needed for building packages which
 
 %debug_package
 %prep
-%setup
+%setup -q
 %patch
+%patch1
 
 %build
 %configure --docdir=%{_docdir}/%{name}/
-%{__make}
+%{__make} %{?jobs:-j%jobs}
 
 %install
 %makeinstall docdatadir=%{_docdir}/%{name}
-%{__rm} -rf examples/{.libs,.deps}
+%{__rm} -rf examples/{.libs,.deps,*.o,copydatabase,delve,quest,simplesearch,simpleexpand,simpleindex}
 %{__cp} -vr \
     AUTHORS COPYING ChangeLog ChangeLog.examples \
     HACKING INSTALL NEWS PLATFORMS README examples \
 %{buildroot}%{_docdir}/%{name}/
+find . -name \*.spec|xargs rm
+%{__rm} -f %{buildroot}/usr/share/doc/packages/xapian-core/examples/.dirstamp
+%if 0%suse_version > 1020
+%fdupes %{buildroot}%{_defaultdocdir}/%{name}
+%endif
 
-%post -p /sbin/ldconfig
+%post -n libxapian15 -p /sbin/ldconfig
 
-%postun -p /sbin/ldconfig
+%postun -n libxapian15 -p /sbin/ldconfig
 
 %clean
 %{__rm} -rf %{buildroot}
@@ -119,7 +127,7 @@ files needed for building packages which
 %doc %{_docdir}/%{name}/PLATFORMS
 %doc %{_docdir}/%{name}/README
 
-%files libs
+%files -n libxapian15
 %defattr(-, root, root)
 %{_libdir}/libxapian.so.*