r26516 - in /trunk/libsearch-xapian-perl: Changes MANIFEST META.yml Makefile.PL README Xapian.pm Xapian.xs debian/changelog t/01use.t t/04functions.t

ghostbar-guest at users.alioth.debian.org ghostbar-guest at users.alioth.debian.org
Sun Nov 2 07:13:42 UTC 2008


Author: ghostbar-guest
Date: Sun Nov  2 07:13:39 2008
New Revision: 26516

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=26516
Log:
New upstream release

Added:
    trunk/libsearch-xapian-perl/t/04functions.t
      - copied unchanged from r26515, branches/upstream/libsearch-xapian-perl/current/t/04functions.t
Modified:
    trunk/libsearch-xapian-perl/Changes
    trunk/libsearch-xapian-perl/MANIFEST
    trunk/libsearch-xapian-perl/META.yml
    trunk/libsearch-xapian-perl/Makefile.PL
    trunk/libsearch-xapian-perl/README
    trunk/libsearch-xapian-perl/Xapian.pm
    trunk/libsearch-xapian-perl/Xapian.xs
    trunk/libsearch-xapian-perl/debian/changelog
    trunk/libsearch-xapian-perl/t/01use.t

Modified: trunk/libsearch-xapian-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Changes?rev=26516&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Changes (original)
+++ trunk/libsearch-xapian-perl/Changes Sun Nov  2 07:13:39 2008
@@ -1,4 +1,10 @@
 Revision history for Perl extension Search::Xapian.
+
+1.0.9.0  Fri Oct 31 23:27:06 GMT 2008
+	[Changes contributed by Olly Betts]
+	- Wrap Search::Xapian::get_major_version(), get_minor_version(),
+	  get_revision(), sortable_serialise(), and sortable_unserialise().
+	- Reject xapian-core < 1.0 with an error rather than just a warning.
 
 1.0.8.0  Thu Sep  4 05:38:22 GMT 2008
 	- No change except for bumping the version to indicate compatibility

Modified: trunk/libsearch-xapian-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/MANIFEST?rev=26516&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/MANIFEST (original)
+++ trunk/libsearch-xapian-perl/MANIFEST Sun Nov  2 07:13:39 2008
@@ -70,6 +70,7 @@
 t/01use.t
 t/02pod.t
 t/03podcoverage.t
+t/04functions.t
 t/create.t
 t/document.t
 t/exception.t

Modified: trunk/libsearch-xapian-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/META.yml?rev=26516&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/META.yml (original)
+++ trunk/libsearch-xapian-perl/META.yml Sun Nov  2 07:13:39 2008
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Search-Xapian
-version:      1.0.8.0
+version:      1.0.9.0
 version_from: Xapian.pm
 installdirs:  site
 requires:

Modified: trunk/libsearch-xapian-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Makefile.PL?rev=26516&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Makefile.PL (original)
+++ trunk/libsearch-xapian-perl/Makefile.PL Sun Nov  2 07:13:39 2008
@@ -127,7 +127,15 @@
 
 my ($BASEVERSION) = $VERSION =~ /^([0-9]+\.[0-9]+\.[0-9]+)/;
 if ($xver !~ /^\Q$BASEVERSION\E(?:_svn[0-9]+)?$/) {
-    my $msg = "Xapian version $xver may be incompatible with Search::Xapian $VERSION\n";
+    # There's no chance that we'll with xapian-core 0.x.y.
+    my $no_chance = ($xver =~ /^0/);
+    my $msg;
+    if ($no_chance) {
+	$msg = "Xapian version $xver is incompatible with Search::Xapian $VERSION\n";
+    } else {
+	$msg = "Xapian version $xver may be incompatible with Search::Xapian $VERSION\n";
+    }
+
     if ($ENV{AUTOMATED_TESTING}) {
 	# Don't let automated testers continue, as we don't want bogus failure
 	# reports due to builds with incompatible versions.
@@ -137,6 +145,10 @@
 	# by CPAN test building scripts.
 	unlink "Makefile";
 	exit 0;
+    }
+    if ($no_chance) {
+	unlink "Makefile";
+	die $msg;
     }
     warn "Warning: $msg";
 }

Modified: trunk/libsearch-xapian-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/README?rev=26516&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/README (original)
+++ trunk/libsearch-xapian-perl/README Sun Nov  2 07:13:39 2008
@@ -1,4 +1,4 @@
-Search::Xapian version 1.0.8.0
+Search::Xapian version 1.0.9.0
 ==============================
 
 This is Search::Xapian, a Perl XS frontend to the Xapian C++ search library.

Modified: trunk/libsearch-xapian-perl/Xapian.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Xapian.pm?rev=26516&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Xapian.pm (original)
+++ trunk/libsearch-xapian-perl/Xapian.pm Sun Nov  2 07:13:39 2008
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '1.0.8.0';
+our $VERSION = '1.0.9.0';
 
 use Exporter 'import';
 
@@ -341,6 +341,76 @@
 
 Standard is db + ops + qpflags + qpstem
 
+=head1 Version functions
+
+=over 4
+
+=item major_version
+
+Returns the major version of the Xapian C++ library being used.  E.g. for
+Xapian 1.0.9 this would return 1.
+
+=item minor_version
+
+Returns the minor version of the Xapian C++ library being used.  E.g. for
+Xapian 1.0.9 this would return 0.
+
+=item revision
+
+Returns the revision of the Xapian C++ library being used.  E.g. for
+Xapian 1.0.9 this would return 9.  In a stable release series, Xapian libraries
+with the same minor and major versions are usually ABI compatible, so this
+often won't match the third component of $Search::Xapian::VERSION (which is the
+version of the Search::Xapian XS wrappers).
+
+=back
+
+=head1 Numeric encoding functions
+
+=over 4
+
+=item sortable_serialise NUMBER
+
+Convert a floating point number to a string, preserving sort order.
+
+This method converts a floating point number to a string, suitable for
+using as a value for numeric range restriction, or for use as a sort
+key.
+
+The conversion is platform independent.
+
+The conversion attempts to ensure that, for any pair of values supplied
+to the conversion algorithm, the result of comparing the original
+values (with a numeric comparison operator) will be the same as the
+result of comparing the resulting values (with a string comparison
+operator).  On platforms which represent doubles with the precisions
+specified by IEEE_754, this will be the case: if the representation of
+doubles is more precise, it is possible that two very close doubles
+will be mapped to the same string, so will compare equal.
+
+Note also that both zero and -zero will be converted to the same
+representation: since these compare equal, this satisfies the
+comparison constraint, but it's worth knowing this if you wish to use
+the encoding in some situation where this distinction matters.
+
+Handling of NaN isn't (currently) guaranteed to be sensible.
+
+=item sortable_unserialise SERIALISED_NUMBER
+
+Convert a string encoded using sortable_serialise back to a floating
+point number.
+
+This expects the input to be a string produced by sortable_serialise().
+If the input is not such a string, the value returned is undefined (but
+no error will be thrown).
+
+The result of the conversion will be exactly the value which was
+supplied to sortable_serialise() when making the string on platforms
+which represent doubles with the precisions specified by IEEE_754, but
+may be a different (nearby) value on other platforms.
+
+=back
+
 =head1 TODO
 
 =over 4

Modified: trunk/libsearch-xapian-perl/Xapian.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/Xapian.xs?rev=26516&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/Xapian.xs (original)
+++ trunk/libsearch-xapian-perl/Xapian.xs Sun Nov  2 07:13:39 2008
@@ -112,6 +112,23 @@
 
 PROTOTYPES: ENABLE
 
+string
+sortable_serialise(double value)
+
+double
+sortable_unserialise(string value)
+
+const char *
+version_string()
+
+int
+major_version()
+
+int
+minor_version()
+
+int
+revision()
 
 INCLUDE: XS/BM25Weight.xs
 INCLUDE: XS/BoolWeight.xs

Modified: trunk/libsearch-xapian-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/debian/changelog?rev=26516&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/debian/changelog (original)
+++ trunk/libsearch-xapian-perl/debian/changelog Sun Nov  2 07:13:39 2008
@@ -1,10 +1,14 @@
-libsearch-xapian-perl (1.0.8.0-1) UNRELEASED; urgency=low
+libsearch-xapian-perl (1.0.9.0-1) UNRELEASED; urgency=low
 
+  [ gregor herrmann ]
   NOTE: no reason to upload, the _only_ change is the version number
   
   * New upstream release.
 
- -- gregor herrmann <gregoa at debian.org>  Sat, 06 Sep 2008 18:51:22 +0200
+  [ Jose Luis Rivas ]
+  * (NOT RELEASED YET) New upstream release
+
+ -- Jose Luis Rivas <ghostbar38 at gmail.com>  Sun, 02 Nov 2008 02:42:16 -0430
 
 libsearch-xapian-perl (1.0.7.0-1) unstable; urgency=low
 

Modified: trunk/libsearch-xapian-perl/t/01use.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsearch-xapian-perl/t/01use.t?rev=26516&op=diff
==============================================================================
--- trunk/libsearch-xapian-perl/t/01use.t (original)
+++ trunk/libsearch-xapian-perl/t/01use.t Sun Nov  2 07:13:39 2008
@@ -1,3 +1,7 @@
-use Test::More tests => 1;
+use Test::More tests => 3;
 
 use_ok('Search::Xapian');
+
+# Check that module's version is defined and has a sane value.
+ok(defined($Search::Xapian::VERSION));
+ok($Search::Xapian::VERSION =~ /^\d+\.\d+\.\d+\.\d+$/);




More information about the Pkg-perl-cvs-commits mailing list