Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hiredis] Fix the conflict of macro ssize_t #25271

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion ports/hiredis/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,24 @@ vcpkg_copy_pdbs()

vcpkg_fixup_pkgconfig()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_cmake_config_fixup()
if("ssl" IN_LIST FEATURES)
vcpkg_cmake_config_fixup(PACKAGE_NAME hiredis_ssl CONFIG_PATH share/hiredis_ssl)
endif()

vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/hiredis/hiredis.h"
[[typedef long long ssize_t;
#define _SSIZE_T_ /* for compatibility with libuv */]]
[[typedef intptr_t ssize_t;]]
)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/hiredis/sds.h"
[[typedef long long ssize_t;
#define SSIZE_MAX (LLONG_MAX >> 1)]]
[[typedef intptr_t ssize_t;
#define SSIZE_MAX INTPTR_MAX]]
)

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

# Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
3 changes: 2 additions & 1 deletion ports/hiredis/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "hiredis",
"version": "1.0.2",
"port-version": 3,
"port-version": 4,
"description": "Hiredis is a minimalistic C client library for the Redis database.",
"homepage": "https://github.com/redis/hiredis",
"license": "BSD-3-Clause",
"dependencies": [
{
"name": "vcpkg-cmake",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2814,7 +2814,7 @@
},
"hiredis": {
"baseline": "1.0.2",
"port-version": 3
"port-version": 4
},
"hps": {
"baseline": "2022-01-18",
Expand Down
5 changes: 5 additions & 0 deletions versions/h-/hiredis.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "448374fa990c04aa7964508d32817a6d7868600b",
"version": "1.0.2",
"port-version": 4
},
{
"git-tree": "4eafe5d23a2d906153cc8821c14092f2a9d3ef8a",
"version": "1.0.2",
Expand Down