From edece81af4bc0dc963212407115aa733a404abd7 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 29 May 2019 15:53:31 +0200 Subject: - new snapshot - bump ABI version - add patch for old unixODBC from https://github.com/php/php-src/pull/4203 --- 4203.patch | 38 ++++++++++++++++++++++++++++++++++++++ php.spec | 23 ++++++++++++++++------- 2 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 4203.patch diff --git a/4203.patch b/4203.patch new file mode 100644 index 0000000..d8080bf --- /dev/null +++ b/4203.patch @@ -0,0 +1,38 @@ +From d3757f6620cc101c2c1e5935e2cc1cfbbcd3e658 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 29 May 2019 12:13:01 +0200 +Subject: [PATCH] keep DIR option to --with-unixODBC for old versions without + libodbc.pc + +--- + ext/odbc/config.m4 | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4 +index 1fdce146cd63..ab0c55c247e7 100644 +--- a/ext/odbc/config.m4 ++++ b/ext/odbc/config.m4 +@@ -362,9 +362,20 @@ PHP_ARG_WITH([unixODBC],, + + AC_MSG_CHECKING(whether to build with unixODBC support) + if test "$PHP_UNIXODBC" != "no"; then +- AC_MSG_RESULT(yes) +- PKG_CHECK_MODULES([ODBC], [odbc]) +- PHP_EVAL_INCLINE($ODBC_CFLAGS) ++ if test "$PHP_UNIXODBC" = "yes"; then ++ AC_MSG_RESULT(yes from pkgconfig) ++ PKG_CHECK_MODULES([ODBC], [odbc]) ++ PHP_EVAL_INCLINE($ODBC_CFLAGS) ++ else ++ dnl keep old DIR way for old version without libodbc.pc ++ ODBC_INCDIR=$PHP_UNIXODBC/include ++ ODBC_LIBDIR=$PHP_UNIXODBC/$PHP_LIBDIR ++ ODBC_LFLAGS=-L$ODBC_LIBDIR ++ ODBC_CFLAGS=-I$ODBC_INCDIR ++ ODBC_LIBS=-lodbc ++ PHP_ODBC_CHECK_HEADER(sqlext.h) ++ AC_MSG_RESULT(yes in $PHP_UNIXODBC) ++ fi + ODBC_TYPE=unixODBC + AC_DEFINE(HAVE_UNIXODBC,1,[ ]) + else diff --git a/php.spec b/php.spec index d1f01e2..8400270 100644 --- a/php.spec +++ b/php.spec @@ -22,8 +22,8 @@ %endif # API/ABI check -%global apiver 20180731 -%global zendver 20180731 +%global apiver 20190529 +%global zendver 20190529 %global pdover 20170320 # Extension version %global oci8ver 2.2.0 @@ -96,9 +96,9 @@ %global with_zip 0 -%global gh_commit 071b389bc6da9c6dc33e798806a0da63fc1cedf6 +%global gh_commit b06f05bf4782c4c7110f9d974db1b70c4cda36c0 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_date 20190528 +%global gh_date 20190529 %global gh_owner php %global gh_project php-src %global upver 7.4.0 @@ -108,7 +108,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: %{?scl_prefix}php Version: %{upver}%{?lower:~%{lower}}%{?gh_date:.%{gh_date}} -Release: 4%{?dist} +Release: 5%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -172,6 +172,7 @@ Patch91: php-7.2.0-oci8conf.patch Patch300: php-7.0.10-datetests.patch # WIP +Patch400: https://patch-diff.githubusercontent.com/raw/php/php-src/pull/4203.patch BuildRequires: bzip2-devel BuildRequires: pkgconfig(libcurl) >= 7.15.5 @@ -534,7 +535,8 @@ License: PHP Requires: %{?scl_prefix}php-pdo%{?_isa} = %{version}-%{release} Provides: %{?scl_prefix}php_database Provides: %{?scl_prefix}php-pdo_odbc, %{?scl_prefix}php-pdo_odbc%{?_isa} -BuildRequires: pkgconfig(odbc) +# EL-7 version don't have pkgconfig +BuildRequires: unixODBC-devel %description odbc The %{?scl_prefix}php-odbc package contains a dynamic shared object that will add @@ -943,6 +945,7 @@ in pure PHP. %patch300 -p1 -b .datetests # WIP patch +%patch400 -p1 -b .pr4203 # Prevent %%doc confusion over LICENSE files cp Zend/LICENSE Zend/ZEND_LICENSE @@ -1240,7 +1243,7 @@ build --libdir=%{_libdir}/php \ --enable-sysvmsg=shared --enable-sysvshm=shared --enable-sysvsem=shared \ --enable-shmop=shared \ --enable-posix=shared \ - --with-unixODBC=shared \ + --with-unixODBC=shared,%{_root_prefix} \ --enable-intl=shared \ %if %{with_enchant} --with-enchant=shared \ @@ -1795,6 +1798,12 @@ fi %changelog +* Wed May 29 2019 Remi Collet - 7.4.0~DEV.20190529-5 +- new snapshot +- bump ABI version +- add patch for old unixODBC from + https://github.com/php/php-src/pull/4203 + * Tue May 28 2019 Remi Collet - 7.4.0~DEV.20190528-4 - new snapshot -- cgit