aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libphonenumber/portfile.cmake
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libphonenumber/portfile.cmake
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/libphonenumber/portfile.cmake')
-rw-r--r--vcpkg/ports/libphonenumber/portfile.cmake38
1 files changed, 38 insertions, 0 deletions
diff --git a/vcpkg/ports/libphonenumber/portfile.cmake b/vcpkg/ports/libphonenumber/portfile.cmake
new file mode 100644
index 0000000..250af6b
--- /dev/null
+++ b/vcpkg/ports/libphonenumber/portfile.cmake
@@ -0,0 +1,38 @@
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO google/libphonenumber
+ REF "v${VERSION}"
+ SHA512 3cffb631805e119afd3d17326ae216813198183ca33a941a2b1eeedd9aabbb624d835bf922c569d0f15c8bb2643aafd80802e893af67eb1a58f27fa9ca5051fe
+ HEAD_REF master
+ PATCHES
+ # fix compilation error due to deprecated warnings in protobuf generated files
+ disable-werror.patch
+ fix-re2-identifiers.patch
+ fix-icui18n-lib-name.patch
+ fix-find-protobuf.patch
+ re2-2023-07-01-compat.patch
+ # enable C++17 for re2
+ enable-cpp17.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}/cpp"
+ OPTIONS
+ -DREGENERATE_METADATA=OFF
+ -DUSE_RE2=ON
+ -DBUILD_GEOCODER=OFF
+ -DUSE_PROTOBUF_LITE=ON
+ -DBUILD_SHARED_LIBS=OFF
+ -DBUILD_TESTING=OFF)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")