summaryrefslogtreecommitdiff
path: root/community/qtcurve-kde4/bypass-kde-config.patch
blob: d09e5ead559aca05f20211c6bf9d7ae62002aa9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Pino Toscano <pino@kde.org>
Description: Disable braindead KDE3/4 prefix detection
 The current detection of the KDE 3 and KDE 4 prefixes is done running
 kde-config and kde4-config, resp.
 This can be problematic, as these two could create files in ~/.kde,
 thus breaking when the home of the current user (eg in buildds) is read-only.
 Given the build system sets anyway "/usr" as prefix of KDE 3 and KDE 4
 if they were not detected, then just let it to.
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=541667

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,6 +16,11 @@ set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CM
 set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${QTCURVE_VERSION_FULL}")
 include(CPack)
 
+# Comment the kde3/kde4 prefix detection as a whole as it wants to run
+# kde-config and kde4-config, which in turn can create stuff in ~/.kde.
+# This cannot work on read-only homes.
+# So, the "fallback" prefixes ("/usr" for both) will be used.
+if (BRAINDEAD_DETECTION)
 set(OLD_CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
 
 # Try to find kde4-config...
@@ -48,6 +53,7 @@ if (KDE4_KDECONFIG_EXECUTABLE)
                     ARGS --prefix
                     OUTPUT_VARIABLE KDE4PREFIX)
 endif (KDE4_KDECONFIG_EXECUTABLE)
+endif (BRAINDEAD_DETECTION)
 
 if(NOT KDE3PREFIX)
     if(KDE4PREFIX)