[dev-perl/DBD-mysql] bump to 4.50.0
This commit is contained in:
parent
fcb680397d
commit
b259c2c97d
63
dev-perl/DBD-mysql/DBD-mysql-4.50.0.ebuild
Normal file
63
dev-perl/DBD-mysql/DBD-mysql-4.50.0.ebuild
Normal file
@ -0,0 +1,63 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
DIST_AUTHOR=DVEEDEN
|
||||
DIST_VERSION=4.050
|
||||
inherit eutils perl-module
|
||||
|
||||
DESCRIPTION="MySQL driver for the Perl5 Database Interface (DBI)"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
IUSE="test +ssl"
|
||||
|
||||
RDEPEND=">=dev-perl/DBI-1.609.0
|
||||
virtual/libmysqlclient:=
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/perl-ExtUtils-MakeMaker
|
||||
virtual/perl-Data-Dumper
|
||||
test? (
|
||||
dev-perl/Test-Deep
|
||||
>=virtual/perl-Test-Simple-0.900.0
|
||||
virtual/perl-Time-HiRes
|
||||
)
|
||||
"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-4.050-amavis-type-conversions.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
if use test; then
|
||||
myconf="${myconf} --testdb=test \
|
||||
--testhost=localhost \
|
||||
--testuser=test \
|
||||
--testpassword=test"
|
||||
fi
|
||||
myconf="${myconf} --$(usex ssl ssl nossl)"
|
||||
perl-module_src_configure
|
||||
}
|
||||
|
||||
# Parallel testing is broken as 2 tests create the same table
|
||||
# and mysql isn't acid compliant and can't limit visibility of tables
|
||||
# to a transaction...
|
||||
DIST_TEST="do"
|
||||
|
||||
src_test() {
|
||||
einfo
|
||||
einfo "If tests fail, you have to configure your MySQL instance to create"
|
||||
einfo "and grant some privileges to the test user."
|
||||
einfo "You can run the following commands at the MySQL prompt: "
|
||||
einfo "> CREATE USER 'test'@'localhost' IDENTIFIED BY 'test';"
|
||||
einfo "> CREATE DATABASE test;"
|
||||
einfo "> GRANT ALL PRIVILEGES ON test.* TO 'test'@'localhost';"
|
||||
einfo
|
||||
sleep 5
|
||||
perl_rm_files t/pod.t t/manifest.t
|
||||
# Don't be a hero and try to do EXTENDED_TESTING=1 unless you can figure
|
||||
# out why 60leaks.t fails
|
||||
perl-module_src_test
|
||||
}
|
1
dev-perl/DBD-mysql/Manifest
Normal file
1
dev-perl/DBD-mysql/Manifest
Normal file
@ -0,0 +1 @@
|
||||
DIST DBD-mysql-4.050.tar.gz 161579 BLAKE2B fb17e151db730fd6955d3e4424dd495a9fcf5f3f4e2b6b79d9fdc86bc42c3314b68771f1d3c393fd80ea14aeda626a5c5d21f5b921d487350ffd79802edab1f6 SHA512 910f5b4ba7a7890d50a79f37d04ec8971a4f62acd0fe30bf3ab634f66e3128f0cd6513e5c9da8c807a0f4477d0cc766682ea8dd0d8072d02821b78df51f37879
|
@ -0,0 +1,56 @@
|
||||
From eb7eddaa2341b853df045ad4a3690c60fc38c6c8 Mon Sep 17 00:00:00 2001
|
||||
From: Pali <pali@cpan.org>
|
||||
Date: Fri, 24 Feb 2017 19:51:36 +0100
|
||||
Subject: Fix type conversions
|
||||
|
||||
Calling SvNV() for magical scalar is not enough for float type conversion.
|
||||
It caused problem for Amavis in tainted mode -- all float values were zero.
|
||||
On the other hand SvIV() and SvUV() seems to work fine. To be sure that
|
||||
correct value of float is in scalar use sv_setnv() with explicit NV float
|
||||
value. Similar code is changed also for integers IV/UV.
|
||||
|
||||
This patch should fix reported Amavis bug:
|
||||
https://github.com/perl5-dbi/DBD-mysql/issues/78
|
||||
|
||||
See also reported perl bug about SvNV():
|
||||
https://rt.perl.org/Public/Bug/Display.html?id=130801
|
||||
|
||||
Bugs: https://github.com/perl5-dbi/DBD-mysql/issues/78
|
||||
Bugs-Debian: https://bugs.debian.org/856064
|
||||
---
|
||||
dbdimp.c | 9 +++------
|
||||
1 file changed, 3 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dbdimp.c b/dbdimp.c
|
||||
index 9c33994..7fdfba1 100644
|
||||
--- a/dbdimp.c
|
||||
+++ b/dbdimp.c
|
||||
@@ -4380,8 +4380,7 @@ process:
|
||||
if (!(fields[i].flags & ZEROFILL_FLAG))
|
||||
{
|
||||
/* Coerce to double and set scalar as NV */
|
||||
- (void) SvNV(sv);
|
||||
- SvNOK_only(sv);
|
||||
+ sv_setnv(sv, SvNV(sv));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -4392,13 +4391,11 @@ process:
|
||||
/* Coerce to integer and set scalar as UV resp. IV */
|
||||
if (fields[i].flags & UNSIGNED_FLAG)
|
||||
{
|
||||
- (void) SvUV(sv);
|
||||
- SvIOK_only_UV(sv);
|
||||
+ sv_setuv(sv, SvUV(sv));
|
||||
}
|
||||
else
|
||||
{
|
||||
- (void) SvIV(sv);
|
||||
- SvIOK_only(sv);
|
||||
+ sv_setiv(sv, SvIV(sv));
|
||||
}
|
||||
}
|
||||
break;
|
||||
--
|
||||
2.15.1
|
||||
|
Loading…
Reference in New Issue
Block a user