Accepting request 1095368 from devel:libraries:c_c++

- absl is also needed for using the -devel package (forwarded request 1095367 from favogt)

OBS-URL: https://build.opensuse.org/request/show/1095368
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libphonenumber?expand=0&rev=5
This commit is contained in:
Dominique Leuenberger 2023-06-30 17:58:15 +00:00 committed by Git OBS Bridge
commit b4603d499f
8 changed files with 110 additions and 13 deletions

View File

@ -0,0 +1,29 @@
From 027de3b5d44f6291bd4785ec7530661ac98cbf53 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Wed, 14 Jun 2023 09:06:02 +0200
Subject: [PATCH] Build with C++17
Recent abseil requires C++14 and TW builds it with C++17, so just use 17
directly.
---
cpp/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index cdd7a08..bc331aa 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -19,8 +19,8 @@ cmake_minimum_required (VERSION 3.11)
project (libphonenumber VERSION 8.13.0)
# Pick the C++ standard to compile with.
-# Abseil currently supports C++11, C++14, and C++17.
-set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard used to compile this project")
+# Abseil currently supports C++14, and C++17.
+set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard used to compile this project")
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
--
2.41.0

View File

@ -0,0 +1,27 @@
From f5684c3a2c220fde377c277dbe7784afbc0013cb Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Wed, 14 Jun 2023 09:35:29 +0200
Subject: [PATCH] Revert "Fix typo in arguments to add_metadata_gen_target()
(#2874)"
This reverts commit 0ecc3d9af734d96d5b01cdf52f0ecdf848a33d68.
---
cpp/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index bc331aa..5b7d2b2 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -394,7 +394,7 @@ add_metadata_gen_target (
${TEST_METADATA_TARGET}
"${RESOURCES_DIR}/PhoneNumberMetadataForTesting.xml"
"test_metadata"
- "test_metadata"
+ "metadata"
)
list (APPEND TESTING_LIBRARY_SOURCES "src/phonenumbers/test_metadata.cc")
--
2.41.0

View File

@ -2,7 +2,7 @@
<service name="obs_scm" mode="disabled">
<param name="url">https://github.com/google/libphonenumber.git</param>
<param name="scm">git</param>
<param name="revision">v8.12.23</param>
<param name="revision">v8.13.15</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
<!-- Contains binary .jars with legally questionable content -->

BIN
libphonenumber-8.12.23.obscpio (Stored with Git LFS)

Binary file not shown.

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c8b06009e54ff4d6cd9ae892f278c11817b6d426ea54fe69f7a23252a2b020ca
size 90171406

View File

@ -1,3 +1,37 @@
-------------------------------------------------------------------
Mon Jun 26 09:00:14 UTC 2023 - Fabian Vogt <fvogt@suse.com>
- absl is also needed for using the -devel package
-------------------------------------------------------------------
Fri Jun 23 06:14:07 UTC 2023 - Fabian Vogt <fvogt@suse.com>
- Update to version 8.13.15:
* Updated phone metadata for region code(s): BE, BF, IL, MN, NE, OM, SO, SV
* Updated carrier data for country calling code(s):
226 (en), 227 (en), 252 (en), 351 (en), 968 (en), 972 (en)
-------------------------------------------------------------------
Wed Jun 14 06:51:08 UTC 2023 - Fabian Vogt <fvogt@suse.com>
- Update to version 8.13.14:
* Many data changes
* Removal of unused leading_zero_possible proto field in
phonemetadata.proto and all generated code
* https://github.com/google/libphonenumber/blob/v8.13.14/release_notes.txt
- Depends on abseil now
- Turn metadata regeneration off explicitly, wasn't done previously
either. This allows dropping the java dependency.
- Add patches to fix building:
* 0001-Build-with-C-17.patch
* 0001-Revert-Fix-typo-in-arguments-to-add_metadata_gen_tar.patch
- protobuf got fixed, builds fine with 22 now
-------------------------------------------------------------------
Tue Jun 13 16:03:57 UTC 2023 - Dirk Müller <dmueller@suse.com>
- prefer protobuf 21 as it is not compatible with v22
-------------------------------------------------------------------
Thu May 20 16:16:04 UTC 2021 - Andreas Stieger <andreas.stieger@gmx.de>

View File

@ -1,5 +1,4 @@
name: libphonenumber
version: 8.12.23
mtime: 1620724866
commit: 8767b3e904f2864c1874f3b8e39eeb8bca7d7238
version: 8.13.15
mtime: 1687328489
commit: d3e97dd640066087e534ea1a1a41137c797b040e

View File

@ -1,7 +1,7 @@
#
# spec file for package libphonenumber
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,21 +17,26 @@
Name: libphonenumber
Version: 8.12.23
Version: 8.13.15
Release: 0
%define lib_ver 8
%define lib_ver2 8.12
%define lib_ver2 8.13
Summary: Library for parsing, formatting, and validating international phone numbers
License: Apache-2.0
Group: Development/Libraries/C and C++
URL: https://github.com/google/libphonenumber
Source: %{name}-%{version}.tar.xz
# PATCH-FIX-DOWNSTREAM (for using system abseil)
Patch1: 0001-Build-with-C-17.patch
# PATCH-FIX-DOWNSTREAM (see https://github.com/google/libphonenumber/pull/2874)
Patch2: 0001-Revert-Fix-typo-in-arguments-to-add_metadata_gen_tar.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: java
BuildRequires: libboost_date_time-devel
BuildRequires: libboost_system-devel
BuildRequires: libboost_thread-devel
# Actual version requirement unknown
BuildRequires: cmake(absl)
BuildRequires: pkgconfig(gtest)
BuildRequires: pkgconfig(icu-i18n) >= 4.4
BuildRequires: pkgconfig(icu-uc) >= 4.4
@ -55,6 +60,7 @@ for running on smartphones, and is used by the Android framework since 4.0
Summary: Library for parsing, formatting, and validating international phone numbers
Group: Development/Libraries/C and C++
Requires: %{name}%{lib_ver} = %{version}
Requires: cmake(absl)
Requires: pkgconfig(protobuf) >= 2.4
%description devel
@ -74,7 +80,7 @@ that use libphonenumber.
cd cpp
# Enabling the geocoder breaks quite a lot due to broken cmakelists
# (https://github.com/google/libphonenumber/pull/2556)
%cmake -DBUILD_STATIC_LIB=OFF -DBUILD_SHARED_LIB=ON -DBUILD_TESTING=ON -DBUILD_GEOCODER=OFF
%cmake -DBUILD_STATIC_LIB=OFF -DBUILD_SHARED_LIB=ON -DBUILD_TESTING=ON -DBUILD_GEOCODER=OFF -DREGENERATE_METADATA=OFF
%make_jobs
%install
@ -96,5 +102,7 @@ cd cpp/build
%files devel
%{_libdir}/libphonenumber.so
%{_includedir}/phonenumbers/
%dir %{_libdir}/cmake/
%{_libdir}/cmake/libphonenumber/
%changelog