From fa2e3bb8c5600aeb88e4b185b52a2ef0f0511543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Sun, 24 Jul 2016 11:29:01 +0200 Subject: [PATCH] Enable perl FTS3 tokenizer with sqlite older than 3.11.0 --- ...perl-FTS3-tokenizer-with-sqlite-befo.patch | 37 +++++++++++++++++++ perl-DBD-SQLite.spec | 8 +++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 DBD-SQLite-1.51_05-Always-register-perl-FTS3-tokenizer-with-sqlite-befo.patch diff --git a/DBD-SQLite-1.51_05-Always-register-perl-FTS3-tokenizer-with-sqlite-befo.patch b/DBD-SQLite-1.51_05-Always-register-perl-FTS3-tokenizer-with-sqlite-befo.patch new file mode 100644 index 0000000..f71d578 --- /dev/null +++ b/DBD-SQLite-1.51_05-Always-register-perl-FTS3-tokenizer-with-sqlite-befo.patch @@ -0,0 +1,37 @@ +From 5687040e291c06a7e49cae9cfae0f2be96b05ef3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +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ř +--- + 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 + diff --git a/perl-DBD-SQLite.spec b/perl-DBD-SQLite.spec index d5c830f..7a87dba 100644 --- a/perl-DBD-SQLite.spec +++ b/perl-DBD-SQLite.spec @@ -1,6 +1,6 @@ Name: perl-DBD-SQLite Version: 1.50 -Release: 3%{?dist} +Release: 4%{?dist} Summary: SQLite DBI Driver Group: Development/Libraries 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 # 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 +# 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 # perl-DBD-SQLite uses the external library # else @@ -72,6 +74,7 @@ libraries. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # Remove bundled sqlite libraries (BZ#1059154) # System libraries will be used rm sqlite* @@ -97,6 +100,9 @@ make test %{_mandir}/man3/*.3pm* %changelog +* Sun Jul 24 2016 Petr Pisar - 1.50-4 +- Enable perl FTS3 tokenizer with sqlite older than 3.11.0 (CPAN RT#112474) + * Sun May 15 2016 Jitka Plesnikova - 1.50-3 - Perl 5.24 rebuild