Soporte para PHP 7 en pecl-PDO_DBLIB

This commit is contained in:
Sandino Araico Sanchez 2019-02-27 04:19:41 -06:00
parent d09867abb0
commit 49fa9e780c
3 changed files with 39 additions and 11 deletions

View file

@ -1,4 +1,5 @@
AUX PDO_DBLIB-1.0-compile.patch 379 BLAKE2B 518e2c53888df3c2fa65d3c85b54e3360794693d0bbca4b3f4b59dfd99ffd32d341fa85f8e37faebc46bee32995dbd5bdfe48922c4f4119ba5e0dd08ec3289e5 SHA512 99c363e7440df34c012842f97a701dfb21e1e9797ca339b6c6036408870fd3974588605f10c9446521a0aa94a76448e69b8e793b15d9610a7051d52549500ef6
AUX PDO_DBLIB-1.0-config.patch 1367 BLAKE2B 381febc122693ecb492171cb6dfeca534dcbc236500f5e90a1379aef719e9bba0bd3242651f630c5e968071046aae5bc58ce80fae0ab63b2187bebeefbe5bd24 SHA512 ee3ee3f5bad098ed4ef5f7ee1bf133390bd078c3c1718fe41071f99a113abfe2fbd6ace23d11e7ffdcf7cdbb20f267c29b2a2f86cd3ab9c8ca5d75e6c68e385f
AUX PDO_DBLIB-1.0-php7.patch 1130 BLAKE2B f9c2bb13bb27acb750b575fc0d8670046f389430e606cb0596c62f3145850bb902786d66539c05e95bf830dc51133c8a271186d07682744597107dbbe749eabf SHA512 b68cfb2d44ff42d920953c8cb35d3d13bf5c33f1b9ccf9f3df071c2023a3731990a240a1219528c03cb95ee0ced2d5b603ccc852502a43c719bf401b1939b3be
DIST PDO_DBLIB-1.0.tgz 8184 BLAKE2B b93dedd5c6596ba623fe862a8f8509112a999561caf935889b52a3dab44dfa30bf756b2aa49f7b84f7e8401119c42849c51898c3db6fab6a9111f14c57d790df SHA512 4b0e430812b8f7b10b574a17ea58ad6df1c4fef8300750a9ec6dd0568b5a6dd10c8bb928bd0875ef5f09a0c43c87a4c1464d1449d64d3496de9121d9f0351b8a
EBUILD pecl-PDO_DBLIB-1.0-r1.ebuild 813 BLAKE2B 42598302dbef2bef13931ae830cfdae2fa493b1e8d1e1c73671d111eede450efee6c96a1c40af5d117b0a77632e2643babfe4ad8af6b590965d5d1c693234792 SHA512 687d04a86153819803a1700450e464f98a9e80ea0b5b186fdb28644beb0adf25931dcd4864b6fc81e79cb3ae4ccb946a29a8830f6046ad5cc90e95cf07a86e22
EBUILD pecl-PDO_DBLIB-1.0-r2.ebuild 1006 BLAKE2B 758ac8e05380906f048d72d46c556546e1b31a50283795e50826e70cbd17658f75c7f84549f5c421e1b18846abce1903fb935688f2cbbfe0147c51c3ae12aa1b SHA512 2fb47e16ab4fe8038f670a8f367a80fef272b5952eee64859d93f9c428c51752fd3d318ab1ea2d547e70788ecb003f44b42ef194c76de538d6bc492e03809b0b

View file

@ -0,0 +1,28 @@
diff -puriN ../PDO_DBLIB-1.0.orig/dblib_driver.c ./dblib_driver.c
--- ../PDO_DBLIB-1.0.orig/dblib_driver.c 2005-10-16 09:58:50.000000000 -0500
+++ ./dblib_driver.c 2019-02-27 03:37:10.000000000 -0600
@@ -58,11 +58,11 @@ static int dblib_fetch_error(pdo_dbh_t *
msg, einfo->dberr, einfo->severity, stmt ? stmt->active_query_string : "");
add_next_index_long(info, einfo->dberr);
- add_next_index_string(info, message, 0);
+ add_next_index_string(info, message);
add_next_index_long(info, einfo->oserr);
add_next_index_long(info, einfo->severity);
if (einfo->oserrstr) {
- add_next_index_string(info, einfo->oserrstr, 1);
+ add_next_index_string(info, einfo->oserrstr);
}
return 1;
diff -puriN ../PDO_DBLIB-1.0.orig/dblib_stmt.c ./dblib_stmt.c
--- ../PDO_DBLIB-1.0.orig/dblib_stmt.c 2005-10-16 09:58:50.000000000 -0500
+++ ./dblib_stmt.c 2019-02-27 03:33:22.000000000 -0600
@@ -226,7 +226,6 @@ static int pdo_dblib_stmt_describe(pdo_s
}
col->maxlen = S->cols[colno].maxlen;
- col->namelen = strlen(S->cols[colno].name);
col->name = estrdup(S->cols[colno].name);
col->param_type = PDO_PARAM_STR;

View file

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
EAPI=7
PHP_EXT_NAME="pdo_dblib"
PHP_EXT_INI="yes"
@ -17,18 +17,17 @@ LICENSE="PHP-3.01"
SLOT="0"
IUSE=""
KEYWORDS="~amd64 ~x86"
DEPEND=">=dev-db/freetds-0.91"
DEPEND=">=dev-db/freetds-0.91:=[iodbc]"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}/PDO_DBLIB-1.0-config.patch"
"${FILESDIR}/PDO_DBLIB-1.0-compile.patch"
)
#PATCHES="${FILESDIR}/PDO_DBLIB-1.0-config.patch
# ${FILESDIR}/PDO_DBLIB-1.0-compile.patch "
src_prepare() {
for slot in $(php_get_slots); do
php_init_slot_env ${slot}
done
eapply ${FILESDIR}/PDO_DBLIB-1.0-config.patch
eapply ${FILESDIR}/PDO_DBLIB-1.0-compile.patch
if use php_targets_php7-0 || use php_targets_php7-1 || use php_targets_php7-2 || use php_targets_php7-7 ; then
eapply ${FILESDIR}/PDO_DBLIB-1.0-php7.patch
fi
php-ext-source-r3_src_prepare
}