Skip to content

Commit 8b86e9a

Browse files
dg0yttalregev
authored andcommitted
[grpc] Control libsystemd installation order, cleanup (microsoft#46457)
1 parent 007ca37 commit 8b86e9a

File tree

4 files changed

+25
-15
lines changed

4 files changed

+25
-15
lines changed

ports/grpc/portfile.cmake

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ vcpkg_from_github(
1818
00016-fix-plugin-targets.patch
1919
00017-add-src-upb.patch
2020
)
21-
# Ensure de-vendoring
2221
file(REMOVE_RECURSE
2322
"${SOURCE_PATH}/third_party/abseil-cpp"
2423
"${SOURCE_PATH}/third_party/cares"
@@ -35,16 +34,16 @@ endif()
3534
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" gRPC_MSVC_STATIC_RUNTIME)
3635
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" gRPC_STATIC_LINKING)
3736

37+
set(cares_CARES_PROVIDER "package")
3838
if(VCPKG_TARGET_IS_UWP)
39-
set(cares_CARES_PROVIDER OFF)
40-
else()
41-
set(cares_CARES_PROVIDER "package")
39+
set(cares_CARES_PROVIDER "OFF")
4240
endif()
4341

4442
vcpkg_check_features(
4543
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
4644
FEATURES
47-
codegen gRPC_BUILD_CODEGEN
45+
codegen gRPC_BUILD_CODEGEN
46+
systemd gRPC_USE_SYSTEMD
4847
)
4948

5049
vcpkg_cmake_configure(
@@ -71,12 +70,19 @@ vcpkg_cmake_configure(
7170
-DgRPC_DOWNLOAD_ARCHIVES=OFF
7271
MAYBE_UNUSED_VARIABLES
7372
gRPC_MSVC_STATIC_RUNTIME
73+
gRPC_USE_SYSTEMD
7474
)
7575

7676
vcpkg_cmake_install(ADD_BIN_TO_PATH)
77-
77+
vcpkg_copy_pdbs()
7878
vcpkg_cmake_config_fixup()
7979

80+
if (VCPKG_TARGET_IS_WINDOWS)
81+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
82+
else()
83+
vcpkg_fixup_pkgconfig()
84+
endif()
85+
8086
if (gRPC_BUILD_CODEGEN)
8187
vcpkg_copy_tools(
8288
AUTO_CLEAN
@@ -95,11 +101,4 @@ endif()
95101

96102
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include")
97103

98-
vcpkg_copy_pdbs()
99-
if (VCPKG_TARGET_IS_WINDOWS)
100-
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
101-
else()
102-
vcpkg_fixup_pkgconfig()
103-
endif()
104-
105104
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

ports/grpc/vcpkg.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "grpc",
33
"version-semver": "1.71.0",
4-
"port-version": 1,
4+
"port-version": 2,
55
"description": "gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere. gRPC enables client and server applications to communicate transparently, and simplifies the building of connected systems.",
66
"homepage": "https://github.com/grpc/grpc",
77
"license": "Apache-2.0",
@@ -45,6 +45,12 @@
4545
"codegen": {
4646
"description": "Build code generator machinery",
4747
"supports": "!uwp"
48+
},
49+
"systemd": {
50+
"description": "Build with libsystemd support",
51+
"dependencies": [
52+
"libsystemd"
53+
]
4854
}
4955
}
5056
}

versions/baseline.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3418,7 +3418,7 @@
34183418
},
34193419
"grpc": {
34203420
"baseline": "1.71.0",
3421-
"port-version": 1
3421+
"port-version": 2
34223422
},
34233423
"grppi": {
34243424
"baseline": "0.4.0",

versions/g-/grpc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"versions": [
3+
{
4+
"git-tree": "a37d18e67a105dca819b5dabbee6a0b079c8abd4",
5+
"version-semver": "1.71.0",
6+
"port-version": 2
7+
},
38
{
49
"git-tree": "fe12b2f1ba6da9373174a6954aec7038f4278a2e",
510
"version-semver": "1.71.0",

0 commit comments

Comments
 (0)