Skip to content

Commit

Permalink
[freerdp]Fix linux build, add dependency port glib. (#9176)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackBoosY authored and dan-shaw committed Dec 23, 2019
1 parent 795ecae commit 2ee03ba
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 20 deletions.
4 changes: 2 additions & 2 deletions ports/freerdp/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: freerdp
Version: 2.0.0-rc4-2
Version: 2.0.0-rc4-3
Homepage: https://github.com/FreeRDP/FreeRDP
Description: A free implementation of the Remote Desktop Protocol (RDP)
Build-Depends: openssl
Build-Depends: openssl, glib (!windows)
13 changes: 13 additions & 0 deletions ports/freerdp/fix-linux-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/winpr/tools/makecert-cli/CMakeLists.txt b/winpr/tools/makecert-cli/CMakeLists.txt
index 48fda5b..4e15a22 100644
--- a/winpr/tools/makecert-cli/CMakeLists.txt
+++ b/winpr/tools/makecert-cli/CMakeLists.txt
@@ -42,7 +42,7 @@ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})

set(${MODULE_PREFIX}_LIBS winpr-tools)

-target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} winpr)
+target_link_libraries(${MODULE_NAME} ${OPENSSL_LIBRARIES} ${${MODULE_PREFIX}_LIBS} winpr)

set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Tools")

41 changes: 23 additions & 18 deletions ports/freerdp/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO FreeRDP/FreeRDP
Expand All @@ -8,6 +6,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
DontInstallSystemRuntimeLibs.patch
fix-linux-build.patch
)

if(VCPKG_CRT_LINKAGE STREQUAL "static")
Expand Down Expand Up @@ -41,16 +40,23 @@ endif()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/freerdp-client2.dll" "${CURRENT_PACKAGES_DIR}/bin/freerdp-client2.dll")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/freerdp2.dll" "${CURRENT_PACKAGES_DIR}/bin/freerdp2.dll")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/winpr-tools2.dll" "${CURRENT_PACKAGES_DIR}/bin/winpr-tools2.dll")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/winpr2.dll" "${CURRENT_PACKAGES_DIR}/bin/winpr2.dll")

file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/freerdp-client2.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/freerdp-client2.dll")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/freerdp2.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/freerdp2.dll")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/winpr-tools2.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/winpr-tools2.dll")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/winpr2.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/winpr2.dll")
else()
file(GLOB_RECURSE FREERDP_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
foreach(FREERDP_DLL ${FREERDP_DLLS})
file(COPY ${FREERDP_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE ${FREERDP_DLL})
endforeach()

file(GLOB_RECURSE FREERDP_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
foreach(FREERDP_DLL ${FREERDP_DLLS})
file(COPY ${FREERDP_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE ${FREERDP_DLL})
endforeach()
else()
file(GLOB_RECURSE FREERDP_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*")
foreach(FREERDP_TOOL ${FREERDP_TOOLS})
file(COPY ${FREERDP_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
file(REMOVE ${FREERDP_TOOL})
endforeach()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()

Expand All @@ -65,10 +71,9 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP-Client2_temp/FreeRDP-Cli
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP2_temp/FreeRDP2)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/WinPR2_temp/WinPR2 TARGET_PATH share/winpr)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
${CURRENT_PACKAGES_DIR}/debug/lib/cmake
${CURRENT_PACKAGES_DIR}/lib/cmake)

file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/freerdp)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/freerdp/LICENSE ${CURRENT_PACKAGES_DIR}/share/freerdp/copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

0 comments on commit 2ee03ba

Please sign in to comment.