From 47e5a20ff7c1e081b464bb74ad071d1487081643 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Mon, 4 Apr 2022 07:44:59 +0200
Subject: update to 3.20.0

add MIT License
---
 PHPINFO                |  2 +-
 REFLECTION             |  2 +-
 php-pecl-protobuf.spec | 18 ++++++++++--------
 utf8_range.h           |  9 ---------
 4 files changed, 12 insertions(+), 19 deletions(-)
 delete mode 100644 utf8_range.h

diff --git a/PHPINFO b/PHPINFO
index 919daa1..a0c072a 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -1,7 +1,7 @@
 
 protobuf
 
-Version => 3.20.0RC2
+Version => 3.20.0
 
 Directive => Local Value => Master Value
 protobuf.keep_descriptor_pool_after_request => 0 => 0
diff --git a/REFLECTION b/REFLECTION
index a688063..43981a2 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #120 protobuf version 3.20.0RC2 ] {
+Extension [ <persistent> extension #120 protobuf version 3.20.0 ] {
 
   - Dependencies {
     Dependency [ date (Optional) ]
diff --git a/php-pecl-protobuf.spec b/php-pecl-protobuf.spec
index afcfc32..5b2d925 100644
--- a/php-pecl-protobuf.spec
+++ b/php-pecl-protobuf.spec
@@ -18,19 +18,18 @@
 %global with_zts    0
 %global ini_name    40-%{pecl_name}.ini
 %global upstream_version 3.20.0
-%global upstream_prever  RC2
+#global upstream_prever  RC2
 
 Summary:       Mechanism for serializing structured data
 Name:          %{?scl_prefix}php-pecl-%{pecl_name}
 Version:       %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
 Release:       1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License:       BSD
+# protobuf extension is BSD
+# third_party/utf8_range is MIT
+License:       BSD and MIT
 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
@@ -79,9 +78,8 @@ sed -e 's/role="test"/role="src"/' \
     %{!?_licensedir:-e '/LICENSE/s/role="src"/role="doc"/' } \
     -i package.xml
 
-
 cd NTS
-cp %{SOURCE1} third_party/utf8_range/utf8_range.h
+cp third_party/utf8_range/LICENSE LICENSE.utf8_range
 
 # Sanity check, really often broken
 extver=$(sed -n '/#define PHP_PROTOBUF_VERSION/{s/.* "//;s/".*$//;p}' protobuf.h)
@@ -188,7 +186,7 @@ fi
 
 
 %files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license NTS/LICENSE*}
 %{!?_licensedir:%doc %{pecl_docdir}/%{pecl_name}}
 %{pecl_xmldir}/%{name}.xml
 
@@ -202,6 +200,10 @@ fi
 
 
 %changelog
+* Sun Apr  3 2022 Remi Collet <remi@remirepo.net> - 3.20.0-1
+- update to 3.20.0
+- add MIT License
+
 * Mon Mar 21 2022 Remi Collet <remi@remirepo.net> - 3.20.0~RC2-1
 - update to 3.20.0RC2
 
diff --git a/utf8_range.h b/utf8_range.h
deleted file mode 100644
index 3695587..0000000
--- a/utf8_range.h
+++ /dev/null
@@ -1,9 +0,0 @@
-
-#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
-- 
cgit