On Mon, Feb 06, 2023 at 07:10:33PM +0000, Klemens Nanni wrote: > On Mon, Feb 06, 2023 at 06:55:35PM +0100, Antoine Jacoutot wrote: > > Thanks. Could you patch instead of sed please. > > Et VoilĂ !
OK > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/databases/evolution-data-server/Makefile,v > retrieving revision 1.292 > diff -u -p -r1.292 Makefile > --- Makefile 7 Jan 2023 10:01:17 -0000 1.292 > +++ Makefile 6 Feb 2023 17:40:01 -0000 > @@ -2,6 +2,7 @@ COMMENT= unified backend for PIM progra > > GNOME_PROJECT= evolution-data-server > GNOME_VERSION= 3.46.3 > +REVISION= 0 > > CATEGORIES= databases productivity > > # don't pick up db_load from databases/db/v3 > Index: patches/patch-CMakeLists_txt > =================================================================== > RCS file: patches/patch-CMakeLists_txt > diff -N patches/patch-CMakeLists_txt > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-CMakeLists_txt 6 Feb 2023 18:50:51 -0000 > @@ -0,0 +1,14 @@ > +Crank to C++17 to match libphonenumber and abseil-cpp. > + > +Index: CMakeLists.txt > +--- CMakeLists.txt.orig > ++++ CMakeLists.txt > +@@ -6,7 +6,7 @@ cmake_policy(VERSION 3.1) > + project(evolution-data-server > + VERSION 3.46.3 > + LANGUAGES C CXX) > +-set(CMAKE_CXX_STANDARD 14) > ++set(CMAKE_CXX_STANDARD 17) > + set(PROJECT_BUGREPORT > "https://gitlab.gnome.org/GNOME/evolution-data-server/issues/") > + > + # Base Version: This is for API/version tracking for things like > Index: patches/patch-cmake_modules_FindPhonenumber_cmake > =================================================================== > RCS file: patches/patch-cmake_modules_FindPhonenumber_cmake > diff -N patches/patch-cmake_modules_FindPhonenumber_cmake > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-cmake_modules_FindPhonenumber_cmake 6 Feb 2023 16:10:34 > -0000 > @@ -0,0 +1,25 @@ > +abseil-cpp>=20230115.0 used by libphonenumber fails unless C++17 is used, > +but CMAKE_CXX_STANDARD has no effect on CheckCXXSourceCompiles(). > + > +CMAKE_REQUIRED_FLAGS must not be passed globally as it effects all targets, > +including C files. > + > +Index: cmake/modules/FindPhonenumber.cmake > +--- cmake/modules/FindPhonenumber.cmake.orig > ++++ cmake/modules/FindPhonenumber.cmake > +@@ -53,6 +53,7 @@ unset(optupper) > + set(CMAKE_REQUIRED_DEFINITIONS ${PHONENUMBER_DEFINITIONS}) > + set(CMAKE_REQUIRED_INCLUDES ${PHONENUMBER_INCLUDE_DIRS}) > + > ++set(CMAKE_REQUIRED_FLAGS "-std=gnu++${CMAKE_CXX_STANDARD}") > + foreach(lib boost_thread-mt boost_thread) > + set(CMAKE_REQUIRED_LIBRARIES ${PHONENUMBER_LDFLAGS} -l${lib}) > + CHECK_CXX_SOURCE_COMPILES("#include <phonenumbers/phonenumberutil.h> > +@@ -67,6 +68,7 @@ foreach(lib boost_thread-mt boost_thread) > + break() > + endif(phone_number_with_${lib}) > + endforeach(lib) > ++unset(CMAKE_REQUIRED_FLAGS) > + > + if(NOT ENABLE_PHONENUMBER) > + message(FATAL_ERROR "libphonenumber cannot be used. Use > -DWITH_PHONENUMBER=PATH to specify the library prefix, or > -DWITH_PHONENUMBER=OFF to disable it.") > Index: > patches/patch-src_addressbook_libebook-contacts_e-phone-number-private_cpp > =================================================================== > RCS file: > patches/patch-src_addressbook_libebook-contacts_e-phone-number-private_cpp > diff -N > patches/patch-src_addressbook_libebook-contacts_e-phone-number-private_cpp > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ > patches/patch-src_addressbook_libebook-contacts_e-phone-number-private_cpp > 6 Feb 2023 18:50:59 -0000 > @@ -0,0 +1,15 @@ > +Replace auto_ptr (deprecated/removed in C++11/17) with unique_ptr to build > with > +C++17 as required by abseil-cpp (through libphonenumber). > + > +Index: src/addressbook/libebook-contacts/e-phone-number-private.cpp > +--- src/addressbook/libebook-contacts/e-phone-number-private.cpp.orig > ++++ src/addressbook/libebook-contacts/e-phone-number-private.cpp > +@@ -183,7 +183,7 @@ _e_phone_number_cxx_from_string (const gchar *phone_nu > + g_return_val_if_fail (NULL != phone_number, NULL); > + > + const std::string valid_region = _e_phone_number_cxx_make_region_code > (region_code); > +- std::auto_ptr<EPhoneNumber> parsed_number(new EPhoneNumber); > ++ std::unique_ptr<EPhoneNumber> parsed_number(new EPhoneNumber); > + > + if (!_e_phone_number_cxx_parse ( > + phone_number, valid_region, &parsed_number->priv, error)) -- Antoine