forked from pool/kdelibs4support
OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kdelibs4support?expand=0&rev=262
42 lines
2.4 KiB
Diff
42 lines
2.4 KiB
Diff
From 5924302486a72041519f05aa3bccc3a0e7d7ca3e Mon Sep 17 00:00:00 2001
|
|
From: Christophe Giboudeaux <christophe@krop.fr>
|
|
Date: Mon, 7 Mar 2022 12:57:35 +0100
|
|
Subject: [PATCH] Use KDE_INSTALL_FULL_* variables where needed
|
|
|
|
There's no guarantee KDE_INSTALL_* variables are relative. This can cause errors when creating symlinks after installation.
|
|
---
|
|
src/CMakeLists.txt | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
index c5abb2a6..2096b355 100644
|
|
--- a/src/CMakeLists.txt
|
|
+++ b/src/CMakeLists.txt
|
|
@@ -595,12 +595,12 @@ if (UNIX)
|
|
install(PROGRAMS kio/fileshareset DESTINATION ${KDE_INSTALL_LIBEXECDIR_KF5} )
|
|
|
|
install(CODE "
|
|
- set(FILESHARESET_PATH \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${KDE_INSTALL_LIBEXECDIR_KF5}/fileshareset\")
|
|
+ set(FILESHARESET_PATH \"\$ENV{DESTDIR}/${KDE_INSTALL_FULL_LIBEXECDIR_KF5}/fileshareset\")
|
|
EXECUTE_PROCESS(COMMAND sh -c \"chown 0 '\${FILESHARESET_PATH}' && chmod u+s '\${FILESHARESET_PATH}'\")
|
|
")
|
|
|
|
# write a cmake script file which creates the symlink
|
|
- file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_fileshare_symlink.cmake "exec_program(${CMAKE_COMMAND} ARGS -E create_symlink fileshareset \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${KDE_INSTALL_LIBEXECDIR_KF5}/filesharelist\")\n")
|
|
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_fileshare_symlink.cmake "exec_program(${CMAKE_COMMAND} ARGS -E create_symlink fileshareset \"\$ENV{DESTDIR}/${KDE_INSTALL_FULL_LIBEXECDIR_KF5}/filesharelist\")\n")
|
|
# and add it as post-install script to any of the installed targets, so it will be executed during "make install"
|
|
set_target_properties(KF5KDELibs4Support PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/make_fileshare_symlink.cmake)
|
|
endif ()
|
|
@@ -645,7 +645,7 @@ if(NOT WIN32)
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_custom_dtd_kdex}
|
|
DESTINATION ${KDE_INSTALL_DATADIR_KF5}/kdoctools/customization/dtd )
|
|
else()
|
|
- get_filename_component(NORMALIZED_DTD_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${KDE_INSTALL_DATADIR_KF5}/kdoctools/customization/dtd" ABSOLUTE)
|
|
+ set(NORMALIZED_DTD_INSTALL_PATH "${KDE_INSTALL_FULL_DATADIR_KF5}/kdoctools/customization/dtd")
|
|
# file(RELATIVE_PATH ...) returns wrong values for paths containing /../ (it doesn't normalize the path)
|
|
# To work around this we make sure the variable passed has all /../ elements
|
|
# removed using get_filename_component(... ABSOLUTE)
|
|
--
|
|
2.35.1
|
|
|