summaryrefslogtreecommitdiffstats
path: root/php-pecl-xlswriter.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-xlswriter.spec')
-rw-r--r--php-pecl-xlswriter.spec26
1 files changed, 24 insertions, 2 deletions
diff --git a/php-pecl-xlswriter.spec b/php-pecl-xlswriter.spec
index 9a3bbf1..2bcc6f9 100644
--- a/php-pecl-xlswriter.spec
+++ b/php-pecl-xlswriter.spec
@@ -10,6 +10,8 @@
# we don't want -z defs linker flag
%undefine _strict_symbol_defs_build
+%bcond_with syslib
+
%if 0%{?scl:1}
%scl_package php-pecl-xlswriter
%global sub_prefix %{scl_prefix}
@@ -21,14 +23,16 @@
# After json
%global ini_name 40-%{pecl_name}.ini
+%if %{with syslib}
# No soname, so manage dependency on available version
%global libxlsxwriter_version 1.0.0
%global libxlsxio_version 0.2.29
+%endif
Summary: An efficient and fast xlsx file export extension
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 1.3.6
-Release: 8%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 9%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: BSD
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
@@ -39,16 +43,25 @@ Patch0: xlswriter-php8.patch
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7
BuildRequires: %{?scl_prefix}php-pear
+%if %{with syslib}
BuildRequires: libxlsxwriter-devel >= %{libxlsxwriter_version}
BuildRequires: libxlsxio-devel >= %{libxlsxio_version}
BuildRequires: zlib-devel
+%endif
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-json%{?_isa}
%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
+%if %{with syslib}
Requires: libxlsxwriter%{?_isa} >= %{libxlsxwriter_version}
Requires: libxlsxio%{?_isa} >= %{libxlsxio_version}
+%else
+# see library/libxlsxwriter/include/xlsxwriter.h
+Provides: bundled(libxlsxwriter) = 0.9.4
+# see library/libxlsxio/include/xlsxio_version.h
+Provides: bundled(libxlsxio) = 0.2.27
+%endif
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -103,8 +116,10 @@ sed -e 's/role="test"/role="src"/' \
cd NTS
%patch0 -p1 -b .pr
+%if %{with syslib}
# we use the system libraries
rm -r library
+%endif
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_XLSWRITER_VERSION/{s/.* "//;s/".*$//;p}' php_xlswriter.h)
@@ -132,8 +147,10 @@ EOF
peclbuild() {
%configure \
--with-xlswriter \
+%if %{with syslib}
--with-libxlsxwriter=%{_prefix} \
--with-libxlsxio=%{_prefix} \
+%endif
--enable-reader \
--with-php-config=$1
@@ -195,9 +212,11 @@ fi
%check
+%if %{with syslib}
# https://github.com/brechtsanders/xlsxio/issues/75
rm ?TS/tests/open_xlsx_get_data_skip_empty.phpt
rm ?TS/tests/open_xlsx_next_row_skip_empty.phpt
+%endif
modules="-d extension=json.so"
@@ -252,7 +271,10 @@ cd ..
%changelog
-* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 1.3.6-8.7.3
+* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 1.3.6-9
+- rebuild using bundled libraries
+
+* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 1.3.6-8
- rebuild for PHP 8.0.0RC1
* Tue Sep 8 2020 Remi Collet <remi@remirepo.net> - 1.3.6-7