summaryrefslogtreecommitdiffstats
path: root/php-pecl-mailparse.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-12-19 14:52:59 +0100
committerRemi Collet <remi@remirepo.net>2018-12-19 14:52:59 +0100
commite029f38f8dbb5b87911fd154c57d984cbeecbea0 (patch)
tree2ebd0b3d2bebe425993d2f7846d2bf1c60550be0 /php-pecl-mailparse.spec
parent0b9daa32dfa984a723419bac3553d4861bfe6928 (diff)
ignore tests using missing files
add upstream patches for PHP 7.2 and 7.3
Diffstat (limited to 'php-pecl-mailparse.spec')
-rw-r--r--php-pecl-mailparse.spec43
1 files changed, 39 insertions, 4 deletions
diff --git a/php-pecl-mailparse.spec b/php-pecl-mailparse.spec
index 137f7eb..8b54e79 100644
--- a/php-pecl-mailparse.spec
+++ b/php-pecl-mailparse.spec
@@ -11,6 +11,10 @@
#
# Please, preserve the changelog entries
#
+
+# we don't want -z defs linker flag
+%undefine _strict_symbol_defs_build
+
%if 0%{?scl:1}
%global sub_prefix %{scl_prefix}
%scl_package php-pecl-mailparse
@@ -23,17 +27,23 @@
Summary: PHP PECL package for parsing and working with email messages
Name: %{?sub_prefix}php-pecl-mailparse
Version: 3.0.2
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 8%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
URL: http://pecl.php.net/package/mailparse
-Source0: http://pecl.php.net/get/mailparse-%{version}.tgz
+Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+
+Patch0: %{pecl_name}-upstream.patch
+BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 7
BuildRequires: %{?scl_prefix}php-pear
# mbstring need for tests
BuildRequires: %{?scl_prefix}php-mbstring
# Required by phpize
BuildRequires: autoconf, automake, libtool
+#BuildRequires: gdb
+#BuildRequires: php-debuginfo
+#BuildRequires: php-debugsource
Requires: %{?scl_prefix}php-mbstring%{?_isa}
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
@@ -65,6 +75,14 @@ Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "7.2"
+Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
+%endif
+%if "%{php_version}" > "7.3"
+Obsoletes: php73u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
+%endif
%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
@@ -92,6 +110,8 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1 -b .upstream
+
extver=$(sed -n '/#define PHP_MAILPARSE_VERSION/{s/.* "//;s/".*$//;p}' php_mailparse.h)
if test "x${extver}" != "x%{version}"; then
: Error: Upstream version is ${extver}, expecting %{version}.
@@ -113,6 +133,8 @@ cp -pr NTS ZTS
%build
+%{?dtsenable}
+
cd NTS
%{_bindir}/phpize
%configure --with-php-config=%{_bindir}/php-config
@@ -127,6 +149,8 @@ make %{?_smp_mflags}
%install
+%{?dtsenable}
+
make -C NTS install INSTALL_ROOT=%{buildroot}
# Drop in the bit of configuration
install -Dpm 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -147,6 +171,11 @@ done
%check
+: ignore tests using missing files
+rm ?TS/tests/011.phpt
+rm ?TS/tests/bug001.phpt
+rm ?TS/tests/parse_test_messages.phpt
+
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=mbstring.so \
@@ -160,7 +189,8 @@ NO_INTERACTION=1 \
%{__php} run-tests.php \
-n -q \
-d extension=mbstring.so \
- -d extension=$PWD/modules/%{pecl_name}.so
+ -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
+ --show-diff
%if %{with_zts}
: Minimal load test for ZTS extension
@@ -176,7 +206,8 @@ NO_INTERACTION=1 \
php run-tests.php \
-n -q \
-d extension=mbstring.so \
- -d extension=$PWD/modules/%{pecl_name}.so
+ -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
+ --show-diff
%endif
@@ -215,6 +246,10 @@ fi
%changelog
+* Wed Jun 6 2018 Remi Collet <remi@remirepo.net> - 3.0.2-8
+- ignore tests using missing files
+- add upstream patches for PHP 7.2 and 7.3
+
* Wed Dec 7 2016 Remi Collet <remi@fedoraproject.org> - 3.0.2-1
- update to 3.0.2