From e3c9ab1b3e5677265880be0718682c2761e858d513731409ca1ce1ff66560964 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Mon, 7 Mar 2022 21:43:57 +0000 Subject: [PATCH] Use %_libexecdir OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kdelibs4support?expand=0&rev=262 --- ...INSTALL_FULL_-variables-where-needed.patch | 41 +++++++++++++++++++ kdelibs4support.changes | 6 +++ kdelibs4support.spec | 2 + 3 files changed, 49 insertions(+) create mode 100644 0001-Use-KDE_INSTALL_FULL_-variables-where-needed.patch diff --git a/0001-Use-KDE_INSTALL_FULL_-variables-where-needed.patch b/0001-Use-KDE_INSTALL_FULL_-variables-where-needed.patch new file mode 100644 index 0000000..f0304a9 --- /dev/null +++ b/0001-Use-KDE_INSTALL_FULL_-variables-where-needed.patch @@ -0,0 +1,41 @@ +From 5924302486a72041519f05aa3bccc3a0e7d7ca3e Mon Sep 17 00:00:00 2001 +From: Christophe Giboudeaux +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 + diff --git a/kdelibs4support.changes b/kdelibs4support.changes index 8fff15d..603d062 100644 --- a/kdelibs4support.changes +++ b/kdelibs4support.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 7 11:58:31 UTC 2022 - Christophe Giboudeaux + +- Add patch to fix installation: + * 0001-Use-KDE_INSTALL_FULL_-variables-where-needed.patch + ------------------------------------------------------------------- Sun Feb 6 10:16:55 UTC 2022 - Christophe Giboudeaux diff --git a/kdelibs4support.spec b/kdelibs4support.spec index 7a004f6..b8ab3af 100644 --- a/kdelibs4support.spec +++ b/kdelibs4support.spec @@ -35,6 +35,8 @@ Source: %{name}-%{version}.tar.xz Source1: %{name}-%{version}.tar.xz.sig Source2: frameworks.keyring %endif +# PATCH-FIX-UPSTREAM +Patch0: 0001-Use-KDE_INSTALL_FULL_-variables-where-needed.patch BuildRequires: NetworkManager-devel BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version} BuildRequires: fdupes