From 6a677a6e796b2731ba25bc5f15138938c1cfee35 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 19 Nov 2020 16:35:54 +0100 Subject: rebuild using bundled libraries --- PHPINFO | 6 ++---- REFLECTION | 24 +++++++++++------------- php-pecl-xlswriter.spec | 26 ++++++++++++++++++++++++-- 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/PHPINFO b/PHPINFO index 495f975..cf61216 100644 --- a/PHPINFO +++ b/PHPINFO @@ -3,7 +3,5 @@ xlswriter xlswriter support => enabled Version => 1.3.6 -libxlsxwriter headers version => 1.0.0 -libxlsxwriter library version => 1.0.0 -libxlsxio headers version => 0.2.29 -libxlsxio library version => 0.2.29 +bundled libxlsxwriter version => 0.9.4 +bundled libxlsxio version => 0.2.27 diff --git a/REFLECTION b/REFLECTION index c3a661f..a68290f 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #103 xlswriter version 1.3.6 ] { +Extension [ extension #104 xlswriter version 1.3.6 ] { - Classes [4] { Class [ class Vtiful\Kernel\Exception extends Exception implements Throwable ] { @@ -574,7 +574,7 @@ Extension [ extension #103 xlswriter version 1.3.6 ] { Class [ class Vtiful\Kernel\Chart ] { - - Constants [29] { + - Constants [27] { Constant [ public int CHART_BAR ] { 4 } Constant [ public int CHART_BAR_STACKED ] { 5 } Constant [ public int CHART_BAR_STACKED_PERCENT ] { 6 } @@ -586,15 +586,15 @@ Extension [ extension #103 xlswriter version 1.3.6 ] { Constant [ public int CHART_COLUMN_STACKED ] { 8 } Constant [ public int CHART_COLUMN_STACKED_PERCENT ] { 9 } Constant [ public int CHART_DOUGHNUT ] { 10 } - Constant [ public int CHART_PIE ] { 14 } - Constant [ public int CHART_SCATTER ] { 15 } - Constant [ public int CHART_SCATTER_STRAIGHT ] { 16 } - Constant [ public int CHART_SCATTER_STRAIGHT_WITH_MARKERS ] { 17 } - Constant [ public int CHART_SCATTER_SMOOTH ] { 18 } - Constant [ public int CHART_SCATTER_SMOOTH_WITH_MARKERS ] { 19 } - Constant [ public int CHART_RADAR ] { 20 } - Constant [ public int CHART_RADAR_WITH_MARKERS ] { 21 } - Constant [ public int CHART_RADAR_FILLED ] { 22 } + Constant [ public int CHART_PIE ] { 12 } + Constant [ public int CHART_SCATTER ] { 13 } + Constant [ public int CHART_SCATTER_STRAIGHT ] { 14 } + Constant [ public int CHART_SCATTER_STRAIGHT_WITH_MARKERS ] { 15 } + Constant [ public int CHART_SCATTER_SMOOTH ] { 16 } + Constant [ public int CHART_SCATTER_SMOOTH_WITH_MARKERS ] { 17 } + Constant [ public int CHART_RADAR ] { 18 } + Constant [ public int CHART_RADAR_WITH_MARKERS ] { 19 } + Constant [ public int CHART_RADAR_FILLED ] { 20 } Constant [ public int CHART_LEGEND_NONE ] { 0 } Constant [ public int CHART_LEGEND_RIGHT ] { 1 } Constant [ public int CHART_LEGEND_LEFT ] { 2 } @@ -602,8 +602,6 @@ Extension [ extension #103 xlswriter version 1.3.6 ] { Constant [ public int CHART_LEGEND_BOTTOM ] { 4 } Constant [ public int CHART_LEGEND_OVERLAY_RIGHT ] { 6 } Constant [ public int CHART_LEGEND_OVERLAY_LEFT ] { 7 } - Constant [ public int CHART_LINE_STACKED ] { 12 } - Constant [ public int CHART_LINE_STACKED_PERCENT ] { 13 } } - Static properties [0] { 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 - 1.3.6-8.7.3 +* Wed Sep 30 2020 Remi Collet - 1.3.6-9 +- rebuild using bundled libraries + +* Wed Sep 30 2020 Remi Collet - 1.3.6-8 - rebuild for PHP 8.0.0RC1 * Tue Sep 8 2020 Remi Collet - 1.3.6-7 -- cgit