diff --git a/ports/rttr/CONTROL b/ports/rttr/CONTROL index e7ed99b8ca..80cff00bde 100644 --- a/ports/rttr/CONTROL +++ b/ports/rttr/CONTROL @@ -1,3 +1,3 @@ Source: rttr -Version: 0.9.5-1 +Version: 0.9.5-2 Description: an easy and intuitive way to use reflection in C++ diff --git a/ports/rttr/portfile.cmake b/ports/rttr/portfile.cmake index da66d3134a..bfb1d23ad7 100644 --- a/ports/rttr/portfile.cmake +++ b/ports/rttr/portfile.cmake @@ -20,6 +20,7 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch" "${CMAKE_CURRENT_LIST_DIR}/disable-unit-tests.patch" + "${CMAKE_CURRENT_LIST_DIR}/remove-owner-read-perms.patch" ) vcpkg_configure_cmake( @@ -31,6 +32,14 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +file(GLOB REL_EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB DBG_EXES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(REL_EXES) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/rttr) + file(COPY ${REL_EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/rttr) +endif() +file(REMOVE ${REL_EXES} ${DBG_EXES}) + #Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rttr) file(RENAME ${CURRENT_PACKAGES_DIR}/share/rttr/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/rttr/copyright) diff --git a/ports/rttr/remove-owner-read-perms.patch b/ports/rttr/remove-owner-read-perms.patch new file mode 100644 index 0000000000..918de14cc8 --- /dev/null +++ b/ports/rttr/remove-owner-read-perms.patch @@ -0,0 +1,41 @@ +diff --git a/CMake/config.cmake b/CMake/config.cmake +index 1d753b3..393e3d0 100644 +--- a/CMake/config.cmake ++++ b/CMake/config.cmake +@@ -131,4 +131,4 @@ install( + + install(FILES "${LICENSE_FILE}" "${README_FILE}" + DESTINATION "." +- PERMISSIONS OWNER_READ) ++ ) +diff --git a/CMake/utility.cmake b/CMake/utility.cmake +index 9dbc172..c37671e 100644 +--- a/CMake/utility.cmake ++++ b/CMake/utility.cmake +@@ -165,7 +165,7 @@ function(loadFolder FOLDER _HEADER_FILES _SOURCE_FILES) + # we don't want to install header files which are marked as private + if (${shouldInstall}) + if (NOT ${FULL_HEADER_PATH} MATCHES ".*_p.h$") +- install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}" PERMISSIONS OWNER_READ) ++ install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}") + endif() + endif() + endforeach() +diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt +index ec10eaf..454c41e 100644 +--- a/doc/CMakeLists.txt ++++ b/doc/CMakeLists.txt +@@ -127,11 +127,11 @@ add_custom_target(doc ALL + install(DIRECTORY "${DOXYGEN_OUTPUT_DIRECTORY}/${DOXYGEN_CUSTOM_HTML_DIR}" + DESTINATION "${DOXYGEN_DOC_INSTALL_DIR}" + PATTERN "*.*" +- PERMISSIONS OWNER_READ) ++ ) + + install(FILES "${DOXYGEN_OUTPUT_DIRECTORY}/${DOXYGEN_INDEX_FILE}" + DESTINATION "${DOXYGEN_DOC_INSTALL_DIR}" +- PERMISSIONS OWNER_READ) ++ ) + + ######################################################################################### + diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 3eaf991ceb..32433b2342 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -58,7 +58,7 @@ namespace vcpkg::Remove const auto status = fs.status(target, ec); if (ec) { - System::println(System::Color::error, "failed: %s", ec.message()); + System::println(System::Color::error, "failed: status(%s): %s", target.u8string(), ec.message()); continue; } @@ -71,12 +71,23 @@ namespace vcpkg::Remove fs.remove(target, ec); if (ec) { - System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); +#if defined(_WIN32) + fs::stdfs::permissions(target, fs::stdfs::perms::owner_all | fs::stdfs::perms::group_all, ec); + fs.remove(target, ec); + if (ec) + { + System::println( + System::Color::error, "failed: remove(%s): %s", target.u8string(), ec.message()); + } +#else + System::println( + System::Color::error, "failed: remove(%s): %s", target.u8string(), ec.message()); +#endif } } - else if (!fs::status_known(status)) + else if (!fs::stdfs::exists(status)) { - System::println(System::Color::warning, "Warning: unknown status: %s", target.u8string()); + System::println(System::Color::warning, "Warning: %s: file not found", target.u8string()); } else {