diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-03-26 16:27:37 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-03-26 16:40:32 +0000 |
commit | fb686c603c1a3ebc3d05072d0f9cc2a8fcb3e723 (patch) | |
tree | 78fd68c4f6520e64b0a976718921e879c2fc4a8c /main/perl-dbd-mysql | |
parent | 22ff18144891fdbd1fe03822bf2bea0b1c149a2e (diff) | |
download | aports-fb686c603c1a3ebc3d05072d0f9cc2a8fcb3e723.tar.bz2 aports-fb686c603c1a3ebc3d05072d0f9cc2a8fcb3e723.tar.xz |
main/perl-dbd-mysql: fix for mariadb
Diffstat (limited to 'main/perl-dbd-mysql')
-rw-r--r-- | main/perl-dbd-mysql/APKBUILD | 11 | ||||
-rw-r--r-- | main/perl-dbd-mysql/DBD-mysql-4.043-Fix-build-failures-for-MariaDB-10.2.patch | 71 |
2 files changed, 78 insertions, 4 deletions
diff --git a/main/perl-dbd-mysql/APKBUILD b/main/perl-dbd-mysql/APKBUILD index 5ec61052e0..06b3bd1d4e 100644 --- a/main/perl-dbd-mysql/APKBUILD +++ b/main/perl-dbd-mysql/APKBUILD @@ -4,20 +4,22 @@ pkgname=perl-dbd-mysql _pkgname=DBD-mysql pkgver=4.046 -pkgrel=1 +pkgrel=2 pkgdesc="Perl CPAN DBD::Mysql module" url="http://search.cpan.org/~capttofu/DBD-mysql/" arch="all" license="GPL PerlArtistic" depends="perl perl-dbi" makedepends="perl perl-dev mariadb-connector-c-dev zlib-dev perl-devel-checklib" -source="https://cpan.metacpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-$pkgver.tar.gz" +source="https://cpan.metacpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-$pkgver.tar.gz + DBD-mysql-4.043-Fix-build-failures-for-MariaDB-10.2.patch + " subpackages="$pkgname-doc" options="!check" # requires a running dbms builddir="$srcdir"/${_pkgname}-$pkgver prepare() { - cd "$builddir" + default_prepare export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}') PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor } @@ -39,4 +41,5 @@ check() { make test } -sha512sums="57b3243a724ac21a11b6eea10aa1cfc821f295cb5bf44f9eaabeb979d3f8e1f7f5e00d40b144a16688d0a358c82c2bb00f630e925e176f29a9ca84b8ee7fb9cc DBD-mysql-4.046.tar.gz" +sha512sums="57b3243a724ac21a11b6eea10aa1cfc821f295cb5bf44f9eaabeb979d3f8e1f7f5e00d40b144a16688d0a358c82c2bb00f630e925e176f29a9ca84b8ee7fb9cc DBD-mysql-4.046.tar.gz +66916fbe21d16f2064c95d4081d183eec554804d018dd43a0a02ba8e702f86820d4ee4997536c774f4f61e53929f83abcd4642db488bdc632d25eea94c8eac0f DBD-mysql-4.043-Fix-build-failures-for-MariaDB-10.2.patch" diff --git a/main/perl-dbd-mysql/DBD-mysql-4.043-Fix-build-failures-for-MariaDB-10.2.patch b/main/perl-dbd-mysql/DBD-mysql-4.043-Fix-build-failures-for-MariaDB-10.2.patch new file mode 100644 index 0000000000..e61e305d5b --- /dev/null +++ b/main/perl-dbd-mysql/DBD-mysql-4.043-Fix-build-failures-for-MariaDB-10.2.patch @@ -0,0 +1,71 @@ +From 051748825e77172677d9e3b319b870c3c0a70a38 Mon Sep 17 00:00:00 2001 +From: Jitka Plesnikova <jplesnik@redhat.com> +Date: Fri, 14 Jul 2017 14:13:50 +0200 +Subject: [PATCH] Fix build failures for MariaDB 10.2 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +<mariadb_version.h> does not exist in mariadb-5.5.26. Do not include +it explicitly. Instead rely on including <mysql.h> that transitively +includes <mariadb_version.h> or <mysql_version.h>. This makes this +patch more portable. + +Signed-off-by: Petr Písař <ppisar@redhat.com> +--- + dbdimp.c | 7 +++++++ + mysql.xs | 4 ++-- + 2 files changed, 9 insertions(+), 2 deletions(-) + +# Fixed in 4.045 +#diff --git a/dbdimp.c b/dbdimp.c +#index 71251da..97fa9c4 100644 +#--- a/dbdimp.c +#+++ b/dbdimp.c +#@@ -2104,6 +2104,9 @@ MYSQL *mysql_dr_connect( +# +# if (result) +# { +#+#if MYSQL_VERSION_ID >= 50013 +#+ my_bool reconnect= 1; +#+#endif +# #if MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION +# /* connection succeeded. */ +# /* imp_dbh == NULL when mysql_dr_connect() is called from mysql.xs +#@@ -2122,7 +2125,11 @@ MYSQL *mysql_dr_connect( +# we turn off Mysql's auto reconnect and handle re-connecting ourselves +# so that we can keep track of when this happens. +# */ +#+#if MYSQL_VERSION_ID >= 50013 +#+ mysql_options(result, MYSQL_OPT_RECONNECT, &reconnect); +#+#else +# result->reconnect=0; +#+#endif +# } +# else { +# /* +diff --git a/mysql.xs b/mysql.xs +index 60cf9c6..750c763 100644 +--- a/mysql.xs ++++ b/mysql.xs +@@ -787,7 +787,7 @@ dbd_mysql_get_info(dbh, sql_info_type) + D_imp_dbh(dbh); + IV type = 0; + SV* retsv=NULL; +-#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 50709 ++#if MYSQL_VERSION_ID >= 50709 + /* MariaDB 10 is not MySQL source level compatible so this only applies to MySQL*/ + IV buffer_len; + #endif +@@ -819,7 +819,7 @@ dbd_mysql_get_info(dbh, sql_info_type) + retsv = newSVpvn("`", 1); + break; + case SQL_MAXIMUM_STATEMENT_LENGTH: +-#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 50709 ++#if MYSQL_VERSION_ID >= 50709 + /* MariaDB 10 is not MySQL source level compatible so this + only applies to MySQL*/ + /* mysql_get_option() was added in mysql 5.7.3 */ +-- +2.13.6 + |