summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-protobuf.spec11
-rw-r--r--utf8_range.h9
4 files changed, 21 insertions, 3 deletions
diff --git a/PHPINFO b/PHPINFO
index 5c7bb51..919daa1 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -1,7 +1,7 @@
protobuf
-Version => 3.20.0RC1
+Version => 3.20.0RC2
Directive => Local Value => Master Value
protobuf.keep_descriptor_pool_after_request => 0 => 0
diff --git a/REFLECTION b/REFLECTION
index c817a6f..a688063 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #120 protobuf version 3.20.0RC1 ] {
+Extension [ <persistent> extension #120 protobuf version 3.20.0RC2 ] {
- Dependencies {
Dependency [ date (Optional) ]
diff --git a/php-pecl-protobuf.spec b/php-pecl-protobuf.spec
index fa843d0..afcfc32 100644
--- a/php-pecl-protobuf.spec
+++ b/php-pecl-protobuf.spec
@@ -18,7 +18,7 @@
%global with_zts 0
%global ini_name 40-%{pecl_name}.ini
%global upstream_version 3.20.0
-%global upstream_prever RC1
+%global upstream_prever RC2
Summary: Mechanism for serializing structured data
Name: %{?scl_prefix}php-pecl-%{pecl_name}
@@ -28,6 +28,9 @@ License: BSD
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+# https://github.com/protocolbuffers/protobuf/issues/9654
+Source1: https://raw.githubusercontent.com/protocolbuffers/protobuf/v3.20.0-rc2/third_party/utf8_range/utf8_range.h
+
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
@@ -71,12 +74,15 @@ mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
+ -e '/utf8_range/s/role="doc"/role="src"/' \
%{?_licensedir: -e '/LICENSE/s/role="doc"/role="src"/' } \
%{!?_licensedir:-e '/LICENSE/s/role="src"/role="doc"/' } \
-i package.xml
cd NTS
+cp %{SOURCE1} third_party/utf8_range/utf8_range.h
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PROTOBUF_VERSION/{s/.* "//;s/".*$//;p}' protobuf.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -196,6 +202,9 @@ fi
%changelog
+* Mon Mar 21 2022 Remi Collet <remi@remirepo.net> - 3.20.0~RC2-1
+- update to 3.20.0RC2
+
* Mon Mar 7 2022 Remi Collet <remi@remirepo.net> - 3.20.0~RC1-1
- update to 3.20.0RC1
diff --git a/utf8_range.h b/utf8_range.h
new file mode 100644
index 0000000..3695587
--- /dev/null
+++ b/utf8_range.h
@@ -0,0 +1,9 @@
+
+#if (defined(__ARM_NEON) && defined(__aarch64__)) || defined(__SSE4_1__)
+int utf8_range2(const unsigned char* data, int len);
+#else
+int utf8_naive(const unsigned char* data, int len);
+static inline int utf8_range2(const unsigned char* data, int len) {
+ return utf8_naive(data, len);
+}
+#endif