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

[freerdp] update to 3.10.2 and fix absolute paths #43150

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
36 changes: 18 additions & 18 deletions ports/freerdp/dependencies.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
diff --git a/cmake/FindFeature.cmake b/cmake/FindFeature.cmake
index bd25fd4..dd180a3 100644
index 11bd9f1..231dcf4 100644
--- a/cmake/FindFeature.cmake
+++ b/cmake/FindFeature.cmake
@@ -15,7 +15,7 @@ macro(find_feature _feature _type _purpose _description)
set(_feature_default "ON")
message(STATUS "Finding ${_type_lower} feature ${_feature} for ${_purpose} (${_description})")
find_package(${_feature} REQUIRED)
- elseif(${_type} STREQUAL "RECOMMENDED")
+ elseif(0)
if(NOT ${WITH_${_feature_upper}})
set(_feature_default "OFF")
message(STATUS "Skipping ${_type_lower} feature ${_feature} for ${_purpose} (${_description})")
@@ -29,7 +29,7 @@ macro(find_feature _feature _type _purpose _description)
message(STATUS "Not detected ${_type_lower} feature ${_feature} for ${_purpose} (${_description}), feature disabled")
endif()
endif()
- elseif(${_type} STREQUAL "OPTIONAL")
+ elseif(1)
if(${WITH_${_feature_upper}})
set(_feature_default "ON")
message(STATUS "Finding ${_type_lower} feature ${_feature} for ${_purpose} (${_description})")
set(_feature_default "ON")
message(STATUS "Finding ${_type_lower} feature ${_feature} for ${_purpose} (${_description})")
find_package(${_feature} REQUIRED)
- elseif(${_type} STREQUAL "RECOMMENDED")
+ elseif(0)
if(NOT ${WITH_${_feature_upper}})
set(_feature_default "OFF")
message(STATUS "Skipping ${_type_lower} feature ${_feature} for ${_purpose} (${_description})")
@@ -31,7 +31,7 @@ macro(find_feature _feature _type _purpose _description)
)
endif()
endif()
- elseif(${_type} STREQUAL "OPTIONAL")
+ elseif(1)
if(${WITH_${_feature_upper}})
set(_feature_default "ON")
message(STATUS "Finding ${_type_lower} feature ${_feature} for ${_purpose} (${_description})")
15 changes: 15 additions & 0 deletions ports/freerdp/fix-absolute_paths.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/winpr/include/config/build-config.h.in b/winpr/include/config/build-config.h.in
index 4a9bfbb..9fb7e8a 100644
--- a/winpr/include/config/build-config.h.in
+++ b/winpr/include/config/build-config.h.in
@@ -5,8 +5,8 @@
#define WINPR_KEYMAP_PATH "${WINPR_KEYMAP_PATH}"
#define WINPR_PLUGIN_PATH "${WINPR_PLUGIN_PATH}"

-#define WINPR_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
-#define WINPR_INSTALL_SYSCONFDIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}"
+#define WINPR_INSTALL_PREFIX ""
+#define WINPR_INSTALL_SYSCONFDIR ""
Comment on lines +11 to +12
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akallabeth, These two lines of macros contain absolute paths. I searched the upstream code and found no other place where these two macros are used. Do you mind if I modify them this way?

F:\test\vcpkg\ports\freerdp\portfile.cmake: warning: There should be no absolute paths, such as the following, in an installed package. To suppress this message, add set(VCPKG_POLICY_SKIP_ABSOLUTE_PATHS_CHECK enabled)
note: F:\test\vcpkg\packages
note: F:\test\vcpkg\installed
note: F:\test\vcpkg\buildtrees
note: F:\test\vcpkg\downloads
F:\test\vcpkg\packages\freerdp_x64-windows\include\winpr3\winpr\build-config.h: note: absolute paths found here

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it breaks file loading (used for keyboard layouts, timezones and other stuff if enabled)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any good suggestions? Thank you.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you enable these features (loading stuff from files)?
if not the macro is unused.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't have those features enabled, so it was a warning, but the vcpkg policy clearly stated that absolute paths were not allowed, so I tried fixing it.


#define WINPR_LIBRARY_PATH "${WINPR_LIBRARY_PATH}"

5 changes: 4 additions & 1 deletion ports/freerdp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO FreeRDP/FreeRDP
REF "${VERSION}"
SHA512 72d978326a3641e69706c158cd5c4b1a4138dedbe1bf8c0f1c02fbb03291c1a49ff36afdaf8cf432fee84952bbaecf8801efa3f1afb50f600490e36ec3d577ef
SHA512 3c98bcd930fc8953c9f5fd49454bdd41b2ff220b1ed3164cfc629c8d302a244dbdd16f00193cdbf8ae04daf1ac21a87aa4598fa34e1ba88f864437bc33b9918c
HEAD_REF master
PATCHES
dependencies.patch
install-layout.patch
windows-linkage.patch
fix-absolute_paths.patch
)
file(WRITE "${SOURCE_PATH}/.source_version" "${VERSION}-vcpkg")
file(WRITE "${SOURCE_PATH}/CMakeCPack.cmake" "")
Expand Down Expand Up @@ -79,6 +80,7 @@ vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()


vcpkg_list(SET tools)
if(VCPKG_TARGET_IS_WINDOWS)
if("server" IN_LIST FEATURES)
Expand Down Expand Up @@ -121,6 +123,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
endif()

file(GLOB cmakefiles "${CURRENT_PACKAGES_DIR}/include/*/CMakeFiles")

file(REMOVE_RECURSE
${cmakefiles}
"${CURRENT_PACKAGES_DIR}/include/winpr3/config"
Expand Down
2 changes: 1 addition & 1 deletion ports/freerdp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "freerdp",
"version": "3.8.0",
"version": "3.10.2",
"description": "A free implementation of the Remote Desktop Protocol (RDP)",
"homepage": "https://github.com/FreeRDP/FreeRDP",
"license": "Apache-2.0",
Expand Down
11 changes: 6 additions & 5 deletions ports/freerdp/windows-linkage.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index db346d3..6ad72d3 100644
index 4de77e9..3956b48 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -439,6 +439,9 @@ if(WIN32)
endif()
@@ -380,6 +380,10 @@ endif()

add_compile_definitions(FREERDP_EXPORTS)

add_definitions(-DFREERDP_EXPORTS)
+if(NOT BUILD_SHARED_LIBS)
+ add_definitions(-DRDTK_EXPORTS)
+endif()
+
# Mac OS X
if(APPLE)
if(IOS)
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2905,7 +2905,7 @@
"port-version": 8
},
"freerdp": {
"baseline": "3.8.0",
"baseline": "3.10.2",
"port-version": 0
},
"freetds": {
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/freerdp.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "61102d4dbc56207d113c75afa520570cbf5886d5",
"version": "3.10.2",
"port-version": 0
},
{
"git-tree": "29289f0bc351348dce1ddfff4630e85fd33cbb2e",
"version": "3.8.0",
Expand Down
Loading