From 7019243b24ed5d3fd303f9d20b35e5d7301cb1f2 Mon Sep 17 00:00:00 2001 From: Vladimir Zryachih Date: Wed, 30 Dec 2020 04:59:03 +0500 Subject: fix librsync port for static linkage (#15281) Co-authored-by: Vladimir Zryachih --- ports/librsync/CONTROL | 1 + ports/librsync/portfile.cmake | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ports/librsync/CONTROL b/ports/librsync/CONTROL index 2b16c9f75..bb1bb15f2 100644 --- a/ports/librsync/CONTROL +++ b/ports/librsync/CONTROL @@ -1,5 +1,6 @@ Source: librsync Version: 2020-09-16 +Port-Version: 1 Description: librsync is a library for calculating and applying network deltas, with an interface designed to ease integration into diverse network applications. Homepage: http://librsync.sourcefrog.net/ Supports: !uwp diff --git a/ports/librsync/portfile.cmake b/ports/librsync/portfile.cmake index f3b865c4f..a701f76ca 100644 --- a/ports/librsync/portfile.cmake +++ b/ports/librsync/portfile.cmake @@ -33,6 +33,13 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/rsync.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/rsync.dll ${CURRENT_PACKAGES_DIR}/debug/bin/rsync.dll) endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/librsync_export.h + "# ifdef LIBRSYNC_STATIC_DEFINE" + "# if 1 /* LIBRSYNC_STATIC_DEFINE */" + ) +endif() + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright -- cgit v1.2.3