From 01b28519ff00c4ab8a72ac2440a1605ef785aba6e1e66b0b0c096f7edb63f3f3 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Wed, 9 Mar 2022 10:15:14 +0000 Subject: [PATCH] Accepting request 960437 from home:jmoellers:branches:devel:languages:perl OBS-URL: https://build.opensuse.org/request/show/960437 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-DBD-SQLite?expand=0&rev=68 --- cpanspec.yml | 25 ++++++++++++++++----- perl-DBD-SQLite-use-external-sqlite3.patch | 26 ++++++++++++++++++++++ perl-DBD-SQLite.changes | 6 +++++ perl-DBD-SQLite.spec | 11 ++++++--- 4 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 perl-DBD-SQLite-use-external-sqlite3.patch diff --git a/cpanspec.yml b/cpanspec.yml index dd71ab0..f832e0d 100644 --- a/cpanspec.yml +++ b/cpanspec.yml @@ -1,20 +1,33 @@ --- #description_paragraphs: 3 +#description: |- +# override description from CPAN +#summary: override summary from CPAN #no_testing: broken upstream #sources: # - source1 # - source2 -#patches: -# silence_sqlite_unicode_deprecation_warning.patch: -p1 -# bar.patch: -#preamble: |- -# BuildRequires: gcc-c++ +patches: + perl-DBD-SQLite-use-external-sqlite3.patch: -p1 PATCH-FIX-OPENSUSE use system sqlite +preamble: |- + BuildRequires: sqlite3-devel #post_prep: |- # hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'` # sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL +#post_build: |- +# rm unused.files #post_install: |- # sed on %{name}.files #license: SUSE-NonFree #skip_noarch: 1 -#custom_build: - +#custom_build: |- #./Build build flags=%{?_smp_mflags} --myflag +#custom_test: |- +#startserver && make test +#ignore_requires: Bizarre::Module +#skip_doc: regexp_to_skip_for_doc.* +#add_doc: files to add to docs +#misc: |- +#anything else to be added to spec file +#follows directly after %files section, so it can contain new blocks or also +#changes to %files section diff --git a/perl-DBD-SQLite-use-external-sqlite3.patch b/perl-DBD-SQLite-use-external-sqlite3.patch new file mode 100644 index 0000000..419ab4b --- /dev/null +++ b/perl-DBD-SQLite-use-external-sqlite3.patch @@ -0,0 +1,26 @@ +Index: DBD-SQLite-1.70/Makefile.PL +=================================================================== +--- DBD-SQLite-1.70.orig/Makefile.PL ++++ DBD-SQLite-1.70/Makefile.PL +@@ -129,7 +129,7 @@ SCOPE: { + # a system sqlite is also sophisticated enough to have a patching system + # that can change the if ( 0 ) to if ( 1 ) + my ($sqlite_local, $sqlite_base, $sqlite_lib, $sqlite_inc); +-if ( 0 ) { ++if ( 1 ) { + require File::Spec; + if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) { + $sqlite_base =~ /=(.*)/; +Index: DBD-SQLite-1.70/t/51_table_column_metadata.t +=================================================================== +--- DBD-SQLite-1.70.orig/t/51_table_column_metadata.t ++++ DBD-SQLite-1.70/t/51_table_column_metadata.t +@@ -19,7 +19,7 @@ for my $call_func (@CALL_FUNCS) { + my $data = $dbh->$call_func(undef, 'foo', 'id', 'table_column_metadata'); + ok $data && ref $data eq ref {}, "got a metadata"; + ok $data->{auto_increment}, "id is auto incremental"; +- is $data->{data_type} => 'integer', "data type is correct"; ++ is $data->{data_type} => 'INTEGER', "data type is correct"; + ok $data->{primary}, "id is a primary key"; + ok !$data->{not_null}, "id is not null"; + } diff --git a/perl-DBD-SQLite.changes b/perl-DBD-SQLite.changes index 0d2daa2..0d9c80b 100644 --- a/perl-DBD-SQLite.changes +++ b/perl-DBD-SQLite.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Feb 23 15:34:16 UTC 2022 - Josef Möllers + +- Use the system sqlite rather than the built-in one. + [bsc#1195771, perl-DBD-SQLite-use-external-sqlite3.patch] + ------------------------------------------------------------------- Mon Aug 2 13:06:28 UTC 2021 - Tina Müller diff --git a/perl-DBD-SQLite.spec b/perl-DBD-SQLite.spec index 6045658..d3d3026 100644 --- a/perl-DBD-SQLite.spec +++ b/perl-DBD-SQLite.spec @@ -1,7 +1,7 @@ # # spec file for package perl-DBD-SQLite # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,11 +20,13 @@ Name: perl-DBD-SQLite Version: 1.70 Release: 0 -Summary: Self-contained RDBMS in a DBI Driver License: Artistic-1.0 OR GPL-1.0-or-later +Summary: Self-contained RDBMS in a DBI Driver URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml +# PATCH-FIX-OPENSUSE use system sqlite +Patch0: perl-DBD-SQLite-use-external-sqlite3.patch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(DBI) >= 1.57 @@ -33,6 +35,9 @@ BuildRequires: perl(Test::More) >= 0.88 Requires: perl(DBI) >= 1.57 Requires: perl(Test::More) >= 0.88 %{perl_requires} +# MANUAL BEGIN +BuildRequires: sqlite3-devel +# MANUAL END %description SQLite is a public domain file-based relational database engine that you @@ -70,7 +75,7 @@ currently many statement attributes are not implemented or are limited by the typeless nature of the SQLite database. %prep -%autosetup -n %{cpan_name}-%{version} +%autosetup -n %{cpan_name}-%{version} -p1 %build perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"