about summary refs log tree commit diff
path: root/pkgs/applications/kde/kdelibs
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@mailbox.org>2017-02-25 14:34:51 -0600
committerThomas Tuegel <ttuegel@mailbox.org>2017-02-27 11:49:30 -0600
commit8be4bd7416ca977a6b8513957513355f01c397cc (patch)
treee99fc31c6b51c9712d6c307110524ed5808324e2 /pkgs/applications/kde/kdelibs
parente50ba7041126a5a4fbc81192739e36076010beeb (diff)
downloadnixlib-8be4bd7416ca977a6b8513957513355f01c397cc.tar
nixlib-8be4bd7416ca977a6b8513957513355f01c397cc.tar.gz
nixlib-8be4bd7416ca977a6b8513957513355f01c397cc.tar.bz2
nixlib-8be4bd7416ca977a6b8513957513355f01c397cc.tar.lz
nixlib-8be4bd7416ca977a6b8513957513355f01c397cc.tar.xz
nixlib-8be4bd7416ca977a6b8513957513355f01c397cc.tar.zst
nixlib-8be4bd7416ca977a6b8513957513355f01c397cc.zip
kdeApplications: Move out of desktops/kde-5
- There is no such thing as KDE 5
Diffstat (limited to 'pkgs/applications/kde/kdelibs')
-rw-r--r--pkgs/applications/kde/kdelibs/0001-old-kde4-cmake-policies.patch56
-rw-r--r--pkgs/applications/kde/kdelibs/0002-polkit-install-path.patch25
-rw-r--r--pkgs/applications/kde/kdelibs/0003-remove_xdg_impurities.patch47
-rw-r--r--pkgs/applications/kde/kdelibs/default.nix49
4 files changed, 177 insertions, 0 deletions
diff --git a/pkgs/applications/kde/kdelibs/0001-old-kde4-cmake-policies.patch b/pkgs/applications/kde/kdelibs/0001-old-kde4-cmake-policies.patch
new file mode 100644
index 000000000000..b7d7300e9a84
--- /dev/null
+++ b/pkgs/applications/kde/kdelibs/0001-old-kde4-cmake-policies.patch
@@ -0,0 +1,56 @@
+From b43c49109694940f0a26240753e879eb629dd02d Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@gmail.com>
+Date: Mon, 7 Sep 2015 13:54:57 -0500
+Subject: [PATCH 1/2] old kde4 cmake policies
+
+---
+ cmake/modules/FindKDE4Internal.cmake | 33 +++++++++++++++++++++++++++++++++
+ 1 file changed, 33 insertions(+)
+
+diff --git a/cmake/modules/FindKDE4Internal.cmake b/cmake/modules/FindKDE4Internal.cmake
+index 7d54b9b..c435571 100644
+--- a/cmake/modules/FindKDE4Internal.cmake
++++ b/cmake/modules/FindKDE4Internal.cmake
+@@ -345,6 +345,39 @@
+ # Redistribution and use is allowed according to the terms of the BSD license.
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+ 
++# this is required now by cmake 2.6 and so must not be skipped by if(KDE4_FOUND) below
++cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)
++# set the cmake policies to the 2.4.x compatibility settings (may change for KDE 4.3)
++cmake_policy(VERSION 2.4.5)
++
++# CMake 2.6, set compatibility behaviour to cmake 2.4
++# this must be executed always, because the CMAKE_MINIMUM_REQUIRED() command above
++# resets the policy settings, so we get a lot of warnings
++
++# CMP0000: don't require cmake_minimum_version() directly in the top level CMakeLists.txt, FindKDE4Internal.cmake is good enough
++cmake_policy(SET CMP0000 OLD)
++# CMP0002: in KDE4 we have multiple targets with the same name for the unit tests
++cmake_policy(SET CMP0002 OLD)
++# CMP0003: add the link paths to the link command as with cmake 2.4
++cmake_policy(SET CMP0003 OLD)
++# CMP0005: keep escaping behaviour for definitions added via add_definitions()
++cmake_policy(SET CMP0005 OLD)
++# since cmake 2.6.3: NEW behaviour is that setting policies doesn't "escape" the file
++# where this is done, macros and functions are executed with the policies as they
++# were when the were defined. Keep the OLD behaviour so we can set the policies here
++# for all KDE software without the big warning
++cmake_policy(SET CMP0011 OLD)
++
++# since cmake 2.8.4: when include()ing from inside cmake's module dir, prefer the files
++# in this directory over those from CMAKE_MODULE_PATH
++cmake_policy(SET CMP0017 NEW)
++
++# since cmake 3.0: use of the LOCATION target property is disallowed while it is used in KDE4Macros.cmake
++if (POLICY CMP0026)
++  cmake_policy(SET CMP0026 OLD)
++endif (POLICY CMP0026)
++
++
+ # Only do something if it hasn't been found yet
+ if(NOT KDE4_FOUND)
+ 
+-- 
+2.5.0
+
diff --git a/pkgs/applications/kde/kdelibs/0002-polkit-install-path.patch b/pkgs/applications/kde/kdelibs/0002-polkit-install-path.patch
new file mode 100644
index 000000000000..ff0306ea1488
--- /dev/null
+++ b/pkgs/applications/kde/kdelibs/0002-polkit-install-path.patch
@@ -0,0 +1,25 @@
+From fab35bac146a817f3af80f45531355fd70cd226b Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@gmail.com>
+Date: Mon, 7 Sep 2015 13:56:03 -0500
+Subject: [PATCH 2/2] polkit install path
+
+---
+ kdecore/auth/ConfigureChecks.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kdecore/auth/ConfigureChecks.cmake b/kdecore/auth/ConfigureChecks.cmake
+index 7cf9cb5..c8334ae 100644
+--- a/kdecore/auth/ConfigureChecks.cmake
++++ b/kdecore/auth/ConfigureChecks.cmake
+@@ -150,7 +150,7 @@ elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "POLKITQT-1")
+         ${CMAKE_INSTALL_PREFIX} _KDE4_AUTH_POLICY_FILES_INSTALL_DIR
+         ${POLKITQT-1_POLICY_FILES_INSTALL_DIR})
+ 
+-    set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR ${_KDE4_AUTH_POLICY_FILES_INSTALL_DIR} CACHE STRING 
++    set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR "\${CMAKE_INSTALL_PREFIX}/share/polkit-1/actions" CACHE STRING 
+         "Where policy files generated by KAuth will be installed" FORCE)
+ elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "FAKE")
+     set (KAUTH_COMPILING_FAKE_BACKEND TRUE)
+-- 
+2.5.0
+
diff --git a/pkgs/applications/kde/kdelibs/0003-remove_xdg_impurities.patch b/pkgs/applications/kde/kdelibs/0003-remove_xdg_impurities.patch
new file mode 100644
index 000000000000..a79d7b2b7d16
--- /dev/null
+++ b/pkgs/applications/kde/kdelibs/0003-remove_xdg_impurities.patch
@@ -0,0 +1,47 @@
+diff --git a/kdecore/kernel/kstandarddirs.cpp b/kdecore/kernel/kstandarddirs.cpp
+index ab8f76d..2ae5089 100644
+--- a/kdecore/kernel/kstandarddirs.cpp
++++ b/kdecore/kernel/kstandarddirs.cpp
+@@ -1768,12 +1768,6 @@ void KStandardDirs::addKDEDefaults()
+     else
+     {
+         xdgdirList.clear();
+-        xdgdirList.append(QString::fromLatin1("/etc/xdg"));
+-#ifdef Q_WS_WIN
+-        xdgdirList.append(installPath("kdedir") + QString::fromLatin1("etc/xdg"));
+-#else
+-        xdgdirList.append(QFile::decodeName(KDESYSCONFDIR "/xdg"));
+-#endif
+     }
+ 
+     QString localXdgDir = readEnvPath("XDG_CONFIG_HOME");
+@@ -1821,10 +1815,6 @@ void KStandardDirs::addKDEDefaults()
+         }
+     } else {
+         xdgdirList = kdedirDataDirs;
+-#ifndef Q_WS_WIN
+-        xdgdirList.append(QString::fromLatin1("/usr/local/share/"));
+-        xdgdirList.append(QString::fromLatin1("/usr/share/"));
+-#endif
+     }
+ 
+     localXdgDir = readEnvPath("XDG_DATA_HOME");
+diff --git a/solid/solid/xdgbasedirs.cpp b/solid/solid/xdgbasedirs.cpp
+index 4c9cad9..6849d45 100644
+--- a/solid/solid/xdgbasedirs.cpp
++++ b/solid/solid/xdgbasedirs.cpp
+@@ -70,12 +70,12 @@ QStringList Solid::XdgBaseDirs::systemPathList( const char *resource )
+ {
+   if ( qstrncmp( "data", resource, 4 ) == 0 ) {
+     if ( instance()->mDataDirs.isEmpty() ) {
+-      instance()->mDataDirs = instance()->systemPathList( "XDG_DATA_DIRS", "/usr/local/share:/usr/share" );
++      instance()->mDataDirs = instance()->systemPathList( "XDG_DATA_DIRS", "" );
+     }
+     return instance()->mDataDirs;
+   } else if ( qstrncmp( "config", resource, 6 ) == 0 ) {
+     if ( instance()->mConfigDirs.isEmpty() ) {
+-      instance()->mConfigDirs = instance()->systemPathList( "XDG_CONFIG_DIRS", "/etc/xdg" );
++      instance()->mConfigDirs = instance()->systemPathList( "XDG_CONFIG_DIRS", "" );
+     }
+     return instance()->mConfigDirs;
+   }
diff --git a/pkgs/applications/kde/kdelibs/default.nix b/pkgs/applications/kde/kdelibs/default.nix
new file mode 100644
index 000000000000..0292b51a48d4
--- /dev/null
+++ b/pkgs/applications/kde/kdelibs/default.nix
@@ -0,0 +1,49 @@
+{
+  kdeApp, lib,
+  automoc4, bison, cmake, flex, libxslt, perl, pkgconfig, shared_mime_info,
+  attica, attr, avahi, docbook_xml_dtd_42, docbook_xsl, giflib, ilmbase,
+  libdbusmenu_qt, libjpeg, libxml2, phonon, polkit_qt4, qca2, qt4,
+  shared_desktop_ontologies, soprano, strigi, udev, xz, pcre
+}:
+
+kdeApp {
+  name = "kdelibs";
+
+  outputs = [ "out" "dev" ];
+
+  outputInclude = "out";
+
+  setOutputFlags = false;
+
+  nativeBuildInputs = [
+    automoc4 bison cmake flex libxslt perl pkgconfig shared_mime_info
+  ];
+  buildInputs = [
+    attica attr avahi giflib libdbusmenu_qt libjpeg libxml2
+    polkit_qt4 qca2 shared_desktop_ontologies udev xz pcre
+  ];
+  propagatedBuildInputs = [ qt4 soprano phonon strigi ];
+
+  patches = [
+    ./0001-old-kde4-cmake-policies.patch
+    ./0002-polkit-install-path.patch
+    ./0003-remove_xdg_impurities.patch
+  ];
+
+  # cmake does not detect path to `ilmbase`
+  NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR";
+
+  cmakeFlags = [
+    "-DDOCBOOKXML_CURRENTDTD_DIR=${docbook_xml_dtd_42}/xml/dtd/docbook"
+    "-DDOCBOOKXSL_DIR=${docbook_xsl}/xml/xsl/docbook"
+    "-DWITH_SOLID_UDISKS2=ON"
+    "-DKDE_DEFAULT_HOME=.kde"
+  ];
+
+  meta = {
+    platforms = lib.platforms.linux;
+    homepage = "http://www.kde.org";
+    licenses = with lib.licenses; [ gpl2 fdl12 lgpl21 ];
+    maintainers = [ lib.maintainers.ttuegel ];
+  };
+}