Enable perl FTS3 tokenizer with sqlite older than 3.11.0

f38
Petr Písař 9 years ago
parent 9648ff58b8
commit fa2e3bb8c5

@ -0,0 +1,37 @@
From 5687040e291c06a7e49cae9cfae0f2be96b05ef3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Sun, 24 Jul 2016 11:15:52 +0200
Subject: [PATCH] Always register perl FTS3 tokenizer with sqlite before 3.11.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Disabling perl FTS3 tokenizer by default caused t/43_fts3.t failures
if building against sqlite < 3.11.0. That was caused by assymetry
between enabling the support (purely on SQLITE_ENABLE_FTS3_TOKENIZER
environemnt variable) and skipping the tests (on version and
ENABLE_FTS3_TOKENIZER compile option).
CPAN RT#112474
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
SQLite.xs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SQLite.xs b/SQLite.xs
index f20e511..06fc425 100644
--- a/SQLite.xs
+++ b/SQLite.xs
@@ -288,7 +288,7 @@ register_fts3_perl_tokenizer(dbh)
ALIAS:
DBD::SQLite::db::sqlite_register_fts3_perl_tokenizer = 1
CODE:
-#if SQLITE_ENABLE_FTS3_TOKENIZER
+#if SQLITE_VERSION_NUMBER < 3011000 || SQLITE_ENABLE_FTS3_TOKENIZER
RETVAL = sqlite_db_register_fts3_perl_tokenizer(aTHX_ dbh);
#else
RETVAL = 0;
--
2.5.5

@ -1,6 +1,6 @@
Name: perl-DBD-SQLite Name: perl-DBD-SQLite
Version: 1.50 Version: 1.50
Release: 3%{?dist} Release: 4%{?dist}
Summary: SQLite DBI Driver Summary: SQLite DBI Driver
Group: Development/Libraries Group: Development/Libraries
License: (GPL+ or Artistic) and Public Domain License: (GPL+ or Artistic) and Public Domain
@ -15,6 +15,8 @@ Patch2: DBD-SQLite-1.50-two-arg-fts3_tokenizer-is-disabled-by-default-fo
Patch3: DBD-SQLite-1.50-register-perl-tokenizer-only-if-DBD-SQLite-is-compil.patch Patch3: DBD-SQLite-1.50-register-perl-tokenizer-only-if-DBD-SQLite-is-compil.patch
# Adjust to sqlite-3.11.0, bug #1309675, in upstream after 1.50 # Adjust to sqlite-3.11.0, bug #1309675, in upstream after 1.50
Patch4: DBD-SQLite-1.50-see-if-SQLITE_ENABLE_FTS3_TOKENIZER-environmental-va.patch Patch4: DBD-SQLite-1.50-see-if-SQLITE_ENABLE_FTS3_TOKENIZER-environmental-va.patch
# Enable perl FTS3 tokenizer with sqlite older than 3.11.0, CPAN RT#112474
Patch5: DBD-SQLite-1.51_05-Always-register-perl-FTS3-tokenizer-with-sqlite-befo.patch
# if sqlite >= 3.1.3 then # if sqlite >= 3.1.3 then
# perl-DBD-SQLite uses the external library # perl-DBD-SQLite uses the external library
# else # else
@ -72,6 +74,7 @@ libraries.
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1
# Remove bundled sqlite libraries (BZ#1059154) # Remove bundled sqlite libraries (BZ#1059154)
# System libraries will be used # System libraries will be used
rm sqlite* rm sqlite*
@ -97,6 +100,9 @@ make test
%{_mandir}/man3/*.3pm* %{_mandir}/man3/*.3pm*
%changelog %changelog
* Sun Jul 24 2016 Petr Pisar <ppisar@redhat.com> - 1.50-4
- Enable perl FTS3 tokenizer with sqlite older than 3.11.0 (CPAN RT#112474)
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.50-3 * Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.50-3
- Perl 5.24 rebuild - Perl 5.24 rebuild

Loading…
Cancel
Save