From 1c9cff5f94016d37ca0fa93a298638000b4a3b60 Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Thu, 6 Jul 2017 15:15:39 +0300 Subject: testing/perl-dbix-class: new aport Extensible and flexible object <-> relational mapper http://search.cpan.org/dist/DBIx-Class/ --- ...oming-not-yet-available-via-DBD-SQLite-li.patch | 23 ++++++++++ testing/perl-dbix-class/0002-sqlite-3.14.patch | 48 ++++++++++++++++++++ testing/perl-dbix-class/APKBUILD | 53 ++++++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 testing/perl-dbix-class/0001-Fix-for-upcoming-not-yet-available-via-DBD-SQLite-li.patch create mode 100644 testing/perl-dbix-class/0002-sqlite-3.14.patch create mode 100644 testing/perl-dbix-class/APKBUILD (limited to 'testing') diff --git a/testing/perl-dbix-class/0001-Fix-for-upcoming-not-yet-available-via-DBD-SQLite-li.patch b/testing/perl-dbix-class/0001-Fix-for-upcoming-not-yet-available-via-DBD-SQLite-li.patch new file mode 100644 index 00000000000..fcadbe67745 --- /dev/null +++ b/testing/perl-dbix-class/0001-Fix-for-upcoming-not-yet-available-via-DBD-SQLite-li.patch @@ -0,0 +1,23 @@ +From adcc1df0049e0093cb94c867bd2be8c9fe242a61 Mon Sep 17 00:00:00 2001 +From: Peter Rabbitson +Date: Tue, 13 Sep 2016 17:15:48 +0200 +Subject: [PATCH] Fix for upcoming (not yet available via DBD::SQLite) + libsqlite version + . + - Fix missing ORDER BY leading to failures of t/prefetch/grouped.t + under upcoming libsqlite (RT#117271) +Bug-Debian: https://bugs.debian.org/835731 +Bug: https://rt.cpan.org/Ticket/Display.html?id=117271 + + +--- a/t/prefetch/grouped.t ++++ b/t/prefetch/grouped.t +@@ -100,7 +100,7 @@ + + # add an extra track to one of the cds, and then make sure we can get it on top + # (check if limit works) +- my $top_cd = $cd_rs->slice (1,1)->next; ++ my $top_cd = $cd_rs->search({}, { order_by => 'cdid' })->slice (1,1)->next; + $top_cd->create_related ('tracks', { + title => 'over the top', + }); diff --git a/testing/perl-dbix-class/0002-sqlite-3.14.patch b/testing/perl-dbix-class/0002-sqlite-3.14.patch new file mode 100644 index 00000000000..c4b8d723a27 --- /dev/null +++ b/testing/perl-dbix-class/0002-sqlite-3.14.patch @@ -0,0 +1,48 @@ +Description: Drop test which expected SQLite behaviour from before 3.14 + Cf. https://rt.cpan.org/Public/Bug/Display.html?id=118395#txn-1676851 + . + Thanks to Peter Rabbitson for the help. +Origin: vendor +Bug-Debian: https://bugs.debian.org/841573 +Forwarded: not-needed +Author: gregor herrmann +Last-Update: 2016-10-21 + +--- a/t/resultset/update_delete.t ++++ b/t/resultset/update_delete.t +@@ -138,35 +138,6 @@ + ], 'Correct null-delete-SQL with multijoin without pruning' ); + + +-# try the same sql with forced multicolumn in +-$schema->is_executed_sql_bind( sub { +- local $schema->storage->{_use_multicolumn_in} = 1; +- +- # this can't actually execute on sqlite +- eval { $fks_multi->update ({ read_count => \ 'read_count + 1' }) }; +-}, [[ +- 'UPDATE fourkeys +- SET read_count = read_count + 1 +- WHERE ( +- (foo, bar, hello, goodbye) IN ( +- SELECT me.foo, me.bar, me.hello, me.goodbye +- FROM fourkeys me +- LEFT JOIN fourkeys_to_twokeys fourkeys_to_twokeys ON +- fourkeys_to_twokeys.f_bar = me.bar +- AND fourkeys_to_twokeys.f_foo = me.foo +- AND fourkeys_to_twokeys.f_goodbye = me.goodbye +- AND fourkeys_to_twokeys.f_hello = me.hello +- WHERE ( bar = ? OR bar = ? ) AND ( foo = ? OR foo = ? ) AND fourkeys_to_twokeys.pilot_sequence != ? AND ( goodbye = ? OR goodbye = ? ) AND ( hello = ? OR hello = ? ) AND sensors != ? +- ORDER BY foo, bar, hello, goodbye +- ) +- ) +- ', +- ( 1, 2) x 2, +- 666, +- ( 1, 2) x 2, +- 'c', +-]], 'Correct update-SQL with multicolumn in support' ); +- + $schema->is_executed_sql_bind( sub { + $fks->search({ 'twokeys.artist' => { '!=' => 666 } })->update({ read_count => \ 'read_count + 1' }); + }, [ diff --git a/testing/perl-dbix-class/APKBUILD b/testing/perl-dbix-class/APKBUILD new file mode 100644 index 00000000000..a029b0e114e --- /dev/null +++ b/testing/perl-dbix-class/APKBUILD @@ -0,0 +1,53 @@ +# Automatically generated by apkbuild-cpan, template 2 +# Contributor: Timo Teräs +# Maintainer: Timo Teräs +pkgname=perl-dbix-class +_pkgreal=DBIx-Class +pkgver=0.082840 +pkgrel=0 +pkgdesc="Extensible and flexible object <-> relational mapper." +url="http://search.cpan.org/dist/DBIx-Class/" +arch="noarch" +license="GPL PerlArtistic" +cpandepends="perl-path-class perl-namespace-clean perl-context-preserve perl-try-tiny perl-devel-globaldestruction perl-mro-compat perl-sql-abstract perl-class-c3-componentised perl-sub-name perl-class-inspector perl-config-any perl-module-find perl-dbi perl-data-dumper-concise perl-class-accessor-grouped perl-scope-guard perl-moo perl-hash-merge perl-data-page" +cpanmakedepends="perl-package-stash perl-test-exception perl-test-deep perl-dbd-sqlite perl-test-warn" +cpancheckdepends="" +depends="$cpandepends" +makedepends="perl-dev $cpanmakedepends" +checkdepends="$cpancheckdepends" +subpackages="$pkgname-doc" +source="http://search.cpan.org/CPAN/authors/id/R/RI/RIBASUSHI/$_pkgreal-$pkgver.tar.gz + 0001-Fix-for-upcoming-not-yet-available-via-DBD-SQLite-li.patch + 0002-sqlite-3.14.patch + " +builddir="$srcdir/$_pkgreal-$pkgver" + +prepare() { + default_prepare || return 1 + + cd "$builddir" + export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') + PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor +} + +build() { + cd "$builddir" + export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') + make +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install || return 1 + find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete +} + +check() { + cd "$builddir" + export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') + make test +} + +sha512sums="0ae0c724c57cd2b62b9d711633bfc2ba4320c15f6e9d0253381c9ffae495355e32888ec87d6a85c85000d434cedb51789f4b7807da157de8b08723333b66a0d2 DBIx-Class-0.082840.tar.gz +37ab4f90b3595adc5376d903c7b0408679c0915125e0973d3fcd7e3d41423112eff736ee653b7fd3146b53c1fd283b82fd10fbcf8b767e30ddab9f1d63cd2c7f 0001-Fix-for-upcoming-not-yet-available-via-DBD-SQLite-li.patch +f6d1d879d9787992ef8f52719720cbcbf1eae8be654a488d3d601eac7f0b2a91feb0c8d3c2ee62dfa628dfacf6656b76572e0472daeaa63a034bcebefc17a254 0002-sqlite-3.14.patch" -- cgit v1.2.3