summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-08-09 11:16:52 +0200
committerRemi Collet <remi@php.net>2024-08-09 11:16:52 +0200
commit2394aab0148961b680838786aa4a1ad96c818e14 (patch)
tree0663ecbdd70a0068200b8feea8d8128bcecb624a
parente6d197b97e0d3090481899b5ea5f48a03f61b145 (diff)
-rw-r--r--php-pecl-yaml.spec67
-rw-r--r--yaml-build.patch22
2 files changed, 42 insertions, 47 deletions
diff --git a/php-pecl-yaml.spec b/php-pecl-yaml.spec
index 23e97ca..d724e77 100644
--- a/php-pecl-yaml.spec
+++ b/php-pecl-yaml.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-yaml
#
-# Copyright (c) 2012-2023 Remi Collet
+# Copyright (c) 2012-2024 Remi Collet
# Fedora spec file for php-pecl-yaml
#
@@ -9,15 +9,13 @@
#
# Please, preserve the changelog entries
#
-%if 0%{?scl:1}
-%scl_package php-pecl-yaml
-%endif
+%{?scl:%scl_package php-pecl-yaml}
-%bcond_without tests
+%bcond_without tests
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global pecl_name yaml
-%global ini_name 40-%{pecl_name}.ini
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global pecl_name yaml
+%global ini_name 40-%{pecl_name}.ini
%global upstream_version 2.2.3
#global upstream_prever b2
@@ -27,12 +25,16 @@
Summary: PHP Bindings for yaml
Name: %{?scl_prefix}php-pecl-yaml
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: MIT
URL: https://pecl.php.net/package/yaml
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Patch0: %{pecl_name}-build.patch
+
+ExcludeArch: %{ix86}
+
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.1
@@ -47,27 +49,12 @@ Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7
-# Other third party repo stuff
-Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
-
%description
Support for YAML 1.1 (YAML Ain't Markup Language) serialization using the
LibYAML library.
-Documentation: http://php.net/yaml
+Documentation: https://php.net/yaml
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
@@ -77,10 +64,12 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
# Remove test file to avoid regsitration
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
cd %{sources}
+%patch -P0 -p1
+
# Check upstream version (often broken)
extver=$(sed -n '/#define PHP_YAML_VERSION/{s/.* "//;s/".*$//;p}' php_yaml.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -193,28 +182,8 @@ REPORT_EXIT_STATUS=1 \
%endif
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%files
-%{?_licensedir:%license %{sources}/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -228,6 +197,10 @@ fi
%changelog
+* Mon Feb 19 2024 Remi Collet <remi@remirepo.net> - 2.2.3-4
+- fix incompatible-pointer-types using patch from
+ https://github.com/php/pecl-file_formats-yaml/pull/74
+
* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 2.2.3-3
- rebuild for PHP 8.3.0RC1
diff --git a/yaml-build.patch b/yaml-build.patch
new file mode 100644
index 0000000..4f74086
--- /dev/null
+++ b/yaml-build.patch
@@ -0,0 +1,22 @@
+From 84d72fcdcf64f39a55a262db23b64b0b58b08a17 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Mon, 6 Mar 2023 09:29:07 +0100
+Subject: [PATCH] Fix [-Wincompatible-pointer-types] warning
+
+---
+ parse.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/parse.c b/parse.c
+index e63f3d8..17f70ba 100644
+--- a/parse.c
++++ b/parse.c
+@@ -531,7 +531,7 @@ void handle_sequence (parser_state_t *state, zval *retval) {
+ /* apply callbacks to the collected node */
+ if (Y_FILTER_FAILURE == apply_filter(
+ retval, src_event, state->callbacks)) {
+- zval_ptr_dtor(&retval);
++ zval_ptr_dtor(retval);
+ ZVAL_UNDEF(retval);
+ goto done;
+ //TODO Sean-Der