summaryrefslogtreecommitdiffstats
path: root/php83.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-08-14 15:56:31 +0200
committerRemi Collet <remi@php.net>2024-08-14 15:56:31 +0200
commit164f80c423605d3e00f1581b05616964e3bec45d (patch)
tree810e1a5c34dc4b509e8be10211b78ef924d0df53 /php83.spec
parent9aa53caa7d5e5f9e6f1ec9643f4c131d2f997f75 (diff)
allow to build using libiodbc instead of unixODBC (--with iodbc)
Diffstat (limited to 'php83.spec')
-rw-r--r--php83.spec39
1 files changed, 32 insertions, 7 deletions
diff --git a/php83.spec b/php83.spec
index 99c9285..0534362 100644
--- a/php83.spec
+++ b/php83.spec
@@ -94,6 +94,9 @@
%bcond_with tzdata
%endif
+# /usr/sbin/a# build with libiodbc instead of unixODBC
+%bcond_with iodbc
+
# /usr/sbin/apsx with httpd < 2.4 and defined as /usr/bin/apxs with httpd >= 2.4
%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}}
@@ -129,7 +132,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: php
Version: %{upver}%{?rcver:~%{rcver}}
-Release: 1%{?dist}
+Release: 2%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -189,6 +192,8 @@ Patch47: php-8.1.0-phpinfo.patch
# Always warn about missing curve_name
# Both Fedora and RHEL do not support arbitrary EC parameters
Patch48: php-8.3.0-openssl-ec-param.patch
+# Fix libidobc headers path
+Patch49: php-8.2.0-iodbc.patch
# RC Patch
Patch91: php-7.2.0-oci8conf.patch
@@ -702,8 +707,11 @@ License: PHP-3.01
Requires: php-pdo%{?_isa} = %{version}-%{release}
Provides: php_database
Provides: php-pdo_odbc, php-pdo_odbc%{?_isa}
-# EL-7 version don't have pkgconfig
-BuildRequires: unixODBC-devel
+%if %{with iodbc}
+BuildRequires: pkgconfig(libiodbc)
+%else
+BuildRequires: pkgconfig(odbc)
+%endif
%if 0%{?rhel} == 7
Obsoletes: php53-odbc, php53u-odbc, php54-odbc, php54w-odbc, php55u-odbc, php55w-odbc, php56u-odbc, php56w-odbc
Obsoletes: php70u-odbc, php70w-odbc, php71u-odbc, php71w-odbc, php72u-odbc, php72w-odbc
@@ -720,6 +728,9 @@ data sources (which are often, but not always, databases). PHP is an
HTML-embeddable scripting language. If you need ODBC support for PHP
applications, you will need to install this package and the php
package.
+%if %{with iodbc}
+Package build using libiodbc (instead of unixODBC).
+%endif
%package soap
Summary: A module for PHP applications that use the SOAP protocol
@@ -1213,6 +1224,7 @@ in pure PHP.
%patch -P46 -p1 -b .argon2
%patch -P47 -p1 -b .phpinfo
%patch -P48 -p1 -b .ec-param
+%patch -P49 -p1 -b .iodbc
%patch -P91 -p1 -b .remi-oci8
@@ -1489,7 +1501,7 @@ build --libdir=%{_libdir}/php \
--with-tcadb=%{_prefix} \
--with-lmdb=%{_prefix} \
%if %{with qdbm}
- --with-qdbm=%{_root_prefix} \
+ --with-qdbm=%{_prefix} \
%endif
--enable-exif=shared \
--enable-ftp=shared \
@@ -1517,7 +1529,13 @@ build --libdir=%{_libdir}/php \
--enable-xmlreader=shared --enable-xmlwriter=shared \
--with-curl=shared \
--enable-pdo=shared \
+%if %{with iodbc}
+ --with-iodbc=shared,%{_prefix} \
+ --with-pdo-odbc=shared,iodbc,%{_prefix} \
+%else
+ --with-unixODBC=shared,%{_prefix} \
--with-pdo-odbc=shared,unixODBC,%{_prefix} \
+%endif
--with-pdo-mysql=shared,mysqlnd \
--with-pdo-pgsql=shared,%{_prefix} \
--with-pdo-sqlite=shared \
@@ -1534,7 +1552,6 @@ build --libdir=%{_libdir}/php \
--enable-sysvmsg=shared --enable-sysvshm=shared --enable-sysvsem=shared \
--enable-shmop=shared \
--enable-posix=shared \
- --with-unixODBC=shared,%{_prefix} \
--enable-fileinfo=shared \
--with-ffi=shared \
--with-sodium=shared \
@@ -1627,7 +1644,7 @@ build --includedir=%{_includedir}/php-zts \
--with-tcadb=%{_prefix} \
--with-lmdb=%{_prefix} \
%if %{with qdbm}
- --with-qdbm=%{_root_prefix} \
+ --with-qdbm=%{_prefix} \
%endif
--with-gettext=shared \
--with-iconv=shared \
@@ -1656,7 +1673,13 @@ build --includedir=%{_includedir}/php-zts \
--enable-xmlreader=shared --enable-xmlwriter=shared \
--with-curl=shared \
--enable-pdo=shared \
+%if %{with iodbc}
+ --with-iodbc=shared,%{_prefix} \
+ --with-pdo-odbc=shared,iodbc,%{_prefix} \
+%else
+ --with-unixODBC=shared,%{_prefix} \
--with-pdo-odbc=shared,unixODBC,%{_prefix} \
+%endif
--with-pdo-mysql=shared,mysqlnd \
--with-pdo-pgsql=shared,%{_prefix} \
--with-pdo-sqlite=shared \
@@ -1673,7 +1696,6 @@ build --includedir=%{_includedir}/php-zts \
--enable-sysvmsg=shared --enable-sysvshm=shared --enable-sysvsem=shared \
--enable-shmop=shared \
--enable-posix=shared \
- --with-unixODBC=shared,%{_prefix} \
--enable-fileinfo=shared \
--with-ffi=shared \
--with-sodium=shared \
@@ -2217,6 +2239,9 @@ fi
%changelog
+* Wed Aug 14 2024 Remi Collet <remi@remirepo.net> - 8.3.11~RC1-2
+- allow to build using libiodbc instead of unixODBC (--with iodbc)
+
* Wed Aug 14 2024 Remi Collet <remi@remirepo.net> - 8.3.11~RC1-1
- update to 8.3.11RC1