Files
haikuports/dev-libs/libphonenumber/patches/libphonenumber-9.0.25.patchset
2026-03-06 10:58:14 +01:00

183 lines
6.7 KiB
Plaintext

From 51f995721c94f2802a3083604aeb83e997938a90 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Wed, 8 Oct 2025 19:54:16 +0200
Subject: Fix BUILD_STATIC_LIB=OFF
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 27e4680..6924469 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -593,7 +593,7 @@ if(BUILD_TESTING)
# libraries are built properly.
if (BUILD_GEOCODER)
add_executable (geocoding_test_program "test/phonenumbers/geocoding/geocoding_test_program.cc")
- target_link_libraries (geocoding_test_program geocoding phonenumber)
+ target_link_libraries (geocoding_test_program geocoding-shared phonenumber-shared)
endif ()
endif()
--
2.52.0
From 8f70b331b8c0b737d852e0e0e814450f524ee69d Mon Sep 17 00:00:00 2001
From: Luc Schrijvers <begasus@gmail.com>
Date: Wed, 19 Nov 2025 10:13:09 +0100
Subject: Fix includedir
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 6924469..65377c6 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -458,12 +458,12 @@ if (BUILD_STATIC_LIB)
# Build a static library (without -fPIC).
add_library (phonenumber STATIC ${SOURCES})
target_link_libraries (phonenumber ${LIBRARY_DEPS})
- target_include_directories(phonenumber PUBLIC $<INSTALL_INTERFACE:include>)
+ target_include_directories(phonenumber PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
if (BUILD_GEOCODER)
add_library (geocoding STATIC ${GEOCODING_SOURCES})
target_link_libraries (geocoding ${LIBRARY_DEPS})
- target_include_directories(geocoding PUBLIC $<INSTALL_INTERFACE:include>)
+ target_include_directories(geocoding PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
add_dependencies (geocoding generate_geocoding_data)
add_dependencies (phonenumber generate_geocoding_data)
endif ()
@@ -478,7 +478,7 @@ if (BUILD_SHARED_LIBS)
# Build a shared library (with -fPIC).
add_library (phonenumber-shared SHARED ${SOURCES})
target_link_libraries (phonenumber-shared ${LIBRARY_DEPS})
- target_include_directories(phonenumber-shared PUBLIC $<INSTALL_INTERFACE:include>)
+ target_include_directories(phonenumber-shared PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
set_target_properties (phonenumber-shared
PROPERTIES
@@ -494,7 +494,7 @@ if (BUILD_SHARED_LIBS)
if (BUILD_GEOCODER)
add_library (geocoding-shared SHARED ${GEOCODING_SOURCES})
target_link_libraries (geocoding-shared ${LIBRARY_DEPS})
- target_include_directories(geocoding-shared PUBLIC $<INSTALL_INTERFACE:include>)
+ target_include_directories(geocoding-shared PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
add_dependencies (geocoding-shared generate_geocoding_data)
add_dependencies (phonenumber-shared generate_geocoding_data)
@@ -593,7 +593,7 @@ if(BUILD_TESTING)
# libraries are built properly.
if (BUILD_GEOCODER)
add_executable (geocoding_test_program "test/phonenumbers/geocoding/geocoding_test_program.cc")
- target_link_libraries (geocoding_test_program geocoding-shared phonenumber-shared)
+ target_link_libraries (geocoding_test_program geocoding-shared phonenumber-shared )
endif ()
endif()
@@ -641,11 +641,11 @@ install (FILES
"src/phonenumbers/region_code.h"
"src/phonenumbers/shortnumberinfo.h"
"src/phonenumbers/unicodestring.h"
- DESTINATION include/phonenumbers/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/phonenumbers/
)
install (FILES "src/phonenumbers/utf/unicodetext.h"
- DESTINATION include/phonenumbers/utf/)
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/phonenumbers/utf/)
if (USE_ICU_REGEXP)
# Install the phone number matcher headers.
@@ -653,14 +653,14 @@ if (USE_ICU_REGEXP)
"src/phonenumbers/phonenumbermatch.h"
"src/phonenumbers/phonenumbermatcher.h"
"src/phonenumbers/regexp_adapter.h"
- DESTINATION include/phonenumbers/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/phonenumbers/
)
endif ()
if (BUILD_GEOCODER)
install (FILES
"src/phonenumbers/geocoding/phonenumber_offline_geocoder.h"
- DESTINATION include/phonenumbers/geocoding
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/phonenumbers/geocoding
)
endif ()
@@ -670,7 +670,7 @@ install (
"src/phonenumbers/base/template_util.h"
"src/phonenumbers/base/logging.h"
"src/phonenumbers/base/thread_checker.h"
- DESTINATION include/phonenumbers/base/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/phonenumbers/base/
)
install (FILES
@@ -681,7 +681,7 @@ install (FILES
"src/phonenumbers/base/memory/singleton_stdmutex.h"
"src/phonenumbers/base/memory/singleton_unsafe.h"
"src/phonenumbers/base/memory/singleton_win32.h"
- DESTINATION include/phonenumbers/base/memory/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/phonenumbers/base/memory/
)
install (FILES
@@ -691,7 +691,7 @@ install (FILES
"src/phonenumbers/base/synchronization/lock_stdmutex.h"
"src/phonenumbers/base/synchronization/lock_unsafe.h"
"src/phonenumbers/base/synchronization/lock_win32.h"
- DESTINATION include/phonenumbers/base/synchronization/)
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/phonenumbers/base/synchronization/)
#----------------------------------------------------------------
# Build and install cmake config files
--
2.52.0
From 6b67f5afb27fd79db4a5dd23beb31aa01c7d90cf Mon Sep 17 00:00:00 2001
From: Luc Schrijvers <begasus@gmail.com>
Date: Wed, 19 Nov 2025 12:52:49 +0100
Subject: Fix for building with boost
diff --git a/cpp/src/phonenumbers/base/thread_checker.h b/cpp/src/phonenumbers/base/thread_checker.h
index 6679d9b..7dd83d0 100644
--- a/cpp/src/phonenumbers/base/thread_checker.h
+++ b/cpp/src/phonenumbers/base/thread_checker.h
@@ -25,7 +25,7 @@
#if !defined(__linux__) && !defined(__APPLE__) && !defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD) && \
!defined(I18N_PHONENUMBERS_NO_THREAD_SAFETY) && \
!((__cplusplus >= 201103L) && defined(I18N_PHONENUMBERS_USE_STDMUTEX)) && \
- !defined(WIN32)
+ !defined(WIN32) && !defined(__HAIKU__)
#error Building without Boost, please provide \
-DI18N_PHONENUMBERS_NO_THREAD_SAFETY
#endif
--
2.52.0
From be9a517cba4a376756366fa268bbc063887a8e4e Mon Sep 17 00:00:00 2001
From: Michael Cho <michael@michaelcho.dev>
Date: Mon, 11 Aug 2025 17:08:15 -0400
Subject: [PATCH] Fix build with Boost 1.89.0
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 65377c6..8833044 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -145,7 +145,7 @@ if (USE_BOOST)
if (WIN32)
set (Boost_USE_STATIC_LIBS ON)
endif ()
- find_package (Boost 1.40.0 COMPONENTS date_time system thread)
+ find_package (Boost 1.40.0 COMPONENTS date_time thread OPTIONAL_COMPONENTS system)
if (NOT Boost_FOUND)
print_error ("Boost Date_Time/System/Thread" "Boost")
endif ()
--
2.52.0