mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-08 05:03:40 +00:00
kde5: fix merge conflicts from master
The last merge from master into closure-size obliterated all my closure-size fixes for KDE 5! Luckily, I had them backed-up in another branch.
This commit is contained in:
parent
394ffcb3e5
commit
1d5a9c0fab
@ -1,74 +0,0 @@
|
|||||||
From 3cc148e878b69fc3e0228f3e3bf1bbe689dad87c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Tuegel <ttuegel@gmail.com>
|
|
||||||
Date: Fri, 20 Feb 2015 23:17:39 -0600
|
|
||||||
Subject: [PATCH] extra-cmake-modules paths
|
|
||||||
|
|
||||||
---
|
|
||||||
kde-modules/KDEInstallDirs.cmake | 37 ++++---------------------------------
|
|
||||||
1 file changed, 4 insertions(+), 33 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/kde-modules/KDEInstallDirs.cmake b/kde-modules/KDEInstallDirs.cmake
|
|
||||||
index b7cd34d..2f868ac 100644
|
|
||||||
--- a/kde-modules/KDEInstallDirs.cmake
|
|
||||||
+++ b/kde-modules/KDEInstallDirs.cmake
|
|
||||||
@@ -193,37 +193,8 @@
|
|
||||||
# (To distribute this file outside of extra-cmake-modules, substitute the full
|
|
||||||
# License text for the above reference.)
|
|
||||||
|
|
||||||
-# Figure out what the default install directory for libraries should be.
|
|
||||||
-# This is based on the logic in GNUInstallDirs, but simplified (the
|
|
||||||
-# GNUInstallDirs code deals with re-configuring, but that is dealt with
|
|
||||||
-# by the _define_* macros in this module).
|
|
||||||
+# The default library directory on NixOS is *always* /lib.
|
|
||||||
set(_LIBDIR_DEFAULT "lib")
|
|
||||||
-# Override this default 'lib' with 'lib64' iff:
|
|
||||||
-# - we are on a Linux, kFreeBSD or Hurd system but NOT cross-compiling
|
|
||||||
-# - we are NOT on debian
|
|
||||||
-# - we are on a 64 bits system
|
|
||||||
-# reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
|
|
||||||
-# For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if
|
|
||||||
-# CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu"
|
|
||||||
-# See http://wiki.debian.org/Multiarch
|
|
||||||
-if((CMAKE_SYSTEM_NAME MATCHES "Linux|kFreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU")
|
|
||||||
- AND NOT CMAKE_CROSSCOMPILING)
|
|
||||||
- if (EXISTS "/etc/debian_version") # is this a debian system ?
|
|
||||||
- if(CMAKE_LIBRARY_ARCHITECTURE)
|
|
||||||
- set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
|
|
||||||
- endif()
|
|
||||||
- else() # not debian, rely on CMAKE_SIZEOF_VOID_P:
|
|
||||||
- if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
|
|
||||||
- message(AUTHOR_WARNING
|
|
||||||
- "Unable to determine default LIB_INSTALL_LIBDIR directory because no target architecture is known. "
|
|
||||||
- "Please enable at least one language before including KDEInstallDirs.")
|
|
||||||
- else()
|
|
||||||
- if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
|
||||||
- set(_LIBDIR_DEFAULT "lib64")
|
|
||||||
- endif()
|
|
||||||
- endif()
|
|
||||||
- endif()
|
|
||||||
-endif()
|
|
||||||
|
|
||||||
set(_gnu_install_dirs_vars
|
|
||||||
BINDIR
|
|
||||||
@@ -445,15 +416,15 @@ if(KDE_INSTALL_USE_QT_SYS_PATHS)
|
|
||||||
"QtQuick2 imports"
|
|
||||||
QML_INSTALL_DIR)
|
|
||||||
else()
|
|
||||||
- _define_relative(QTPLUGINDIR LIBDIR "plugins"
|
|
||||||
+ _define_relative(QTPLUGINDIR LIBDIR "qt5/plugins"
|
|
||||||
"Qt plugins"
|
|
||||||
QT_PLUGIN_INSTALL_DIR)
|
|
||||||
|
|
||||||
- _define_relative(QTQUICKIMPORTSDIR QTPLUGINDIR "imports"
|
|
||||||
+ _define_relative(QTQUICKIMPORTSDIR QTPLUGINDIR "qt5/imports"
|
|
||||||
"QtQuick1 imports"
|
|
||||||
IMPORTS_INSTALL_DIR)
|
|
||||||
|
|
||||||
- _define_relative(QMLDIR LIBDIR "qml"
|
|
||||||
+ _define_relative(QMLDIR LIBDIR "qt5/qml"
|
|
||||||
"QtQuick2 imports"
|
|
||||||
QML_INSTALL_DIR)
|
|
||||||
endif()
|
|
||||||
--
|
|
||||||
2.3.0
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
|||||||
{ kdeFramework, lib, stdenv, cmake, pkgconfig, qttools }:
|
{ kdeFramework, lib, copyPathsToStore, cmake, pkgconfig, qttools }:
|
||||||
|
|
||||||
kdeFramework {
|
kdeFramework {
|
||||||
name = "extra-cmake-modules";
|
name = "extra-cmake-modules";
|
||||||
patches = [ ./0001-extra-cmake-modules-paths.patch ];
|
|
||||||
|
|
||||||
|
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
||||||
|
|
||||||
|
outputs = [ "out" ]; # this package has no runtime components
|
||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
|
|
||||||
# It is OK to propagate these inputs as long as
|
# It is OK to propagate these inputs as long as
|
||||||
@ -11,8 +13,8 @@ kdeFramework {
|
|||||||
# of some other derivation.
|
# of some other derivation.
|
||||||
propagatedNativeBuildInputs = [ cmake pkgconfig qttools ];
|
propagatedNativeBuildInputs = [ cmake pkgconfig qttools ];
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
license = stdenv.lib.licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
maintainers = [ lib.maintainers.ttuegel ];
|
maintainers = [ maintainers.ttuegel ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,27 +1,81 @@
|
|||||||
addMimePkg() {
|
_ecmSetXdgDirs() {
|
||||||
local propagated
|
addToSearchPathOnce XDG_DATA_DIRS "$1/share"
|
||||||
|
addToSearchPathOnce XDG_CONFIG_DIRS "$1/etc/xdg"
|
||||||
if [[ -d "$1/share/mime" ]]; then
|
addToSearchPathOnce NIX_WRAP_XDG_CONFIG_DIRS "$1/etc/xdg"
|
||||||
propagated=
|
|
||||||
for pkg in $propagatedBuildInputs; do
|
|
||||||
if [[ "z$pkg" == "z$1" ]]; then
|
|
||||||
propagated=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [[ -z $propagated ]]; then
|
|
||||||
propagatedBuildInputs="$propagatedBuildInputs $1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
propagated=
|
|
||||||
for pkg in $propagatedUserEnvPkgs; do
|
|
||||||
if [[ "z$pkg" == "z$1" ]]; then
|
|
||||||
propagated=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [[ -z $propagated ]]; then
|
|
||||||
propagatedUserEnvPkgs="$propagatedUserEnvPkgs $1"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
envHooks+=(addMimePkg)
|
_ecmPropagateSharedData() {
|
||||||
|
local sharedPaths=( \
|
||||||
|
"config.cfg" \
|
||||||
|
"doc" \
|
||||||
|
"kconf_update" \
|
||||||
|
"kservices5" \
|
||||||
|
"kservicetypes5" \
|
||||||
|
"kxmlgui5" \
|
||||||
|
"knotifications5" \
|
||||||
|
"icons" \
|
||||||
|
"sounds" \
|
||||||
|
"templates" \
|
||||||
|
"wallpapers" \
|
||||||
|
"applications" \
|
||||||
|
"desktop-directories" \
|
||||||
|
"mime" \
|
||||||
|
"info" \
|
||||||
|
"dbus-1" \
|
||||||
|
"interfaces" \
|
||||||
|
"services" \
|
||||||
|
"system-services" )
|
||||||
|
for dir in ${sharedPaths[@]}; do
|
||||||
|
if [ -d "$1/share/$dir" ]; then
|
||||||
|
addToSearchPathOnce NIX_WRAP_XDG_DATA_DIRS "$1/share"
|
||||||
|
propagateOnce propagatedUserEnvPkgs "$1"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
_ecmConfig() {
|
||||||
|
# Because we need to use absolute paths here, we must set *all* the paths.
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_EXECROOTDIR=${!outputBin}"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_BINDIR=${!outputBin}/bin"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_SBINDIR=${!outputBin}/sbin"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_LIBDIR=${!outputLib}/lib"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_LIBEXECDIR=${!outputLib}/lib/libexec"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_CMAKEPACKAGEDIR=${!outputDev}/lib/cmake"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_QTPLUGINDIR=${!outputLib}/lib/qt5/plugins"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_PLUGINDIR=${!outputLib}/lib/qt5/plugins"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_QTQUICKIMPORTSDIR=${!outputLib}/lib/qt5/imports"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_QMLDIR=${!outputLib}/lib/qt5/qml"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_INCLUDEDIR=${!outputInclude}/include"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_LOCALSTATEDIR=/var"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_DATAROOTDIR=${!outputLib}/share"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_DATADIR=${!outputLib}/share"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_DOCBUNDLEDIR=${!outputLib}/share/doc/HTML"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_KCFGDIR=${!outputLib}/share/config.kcfg"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_KCONFUPDATEDIR=${!outputLib}/share/kconf_update"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_KSERVICES5DIR=${!outputLib}/share/kservices5"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_KSERVICETYPES5DIR=${!outputLib}/share/kservicetypes5"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_KXMLGUI5DIR=${!outputLib}/share/kxmlgui5"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_KNOTIFY5RCDIR=${!outputLib}/share/knotifications5"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_ICONDIR=${!outputLib}/share/icons"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_LOCALEDIR=${!outputLib}/share/locale"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_SOUNDDIR=${!outputLib}/share/sounds"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_TEMPLATEDIR=${!outputLib}/share/templates"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_WALLPAPERDIR=${!outputLib}/share/wallpapers"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_APPDIR=${!outputLib}/share/applications"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_DESKTOPDIR=${!outputLib}/share/desktop-directories"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_MIMEDIR=${!outputLib}/share/mime/packages"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_METAINFODIR=${!outputLib}/share/appdata"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_MANDIR=${!outputLib}/share/man"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_INFODIR=${!outputLib}/share/info"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_DBUSDIR=${!outputLib}/share/dbus-1"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_DBUSINTERFACEDIR=${!outputLib}/share/dbus-1/interfaces"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_DBUSSERVICEDIR=${!outputLib}/share/dbus-1/services"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_DBUSSYSTEMSERVICEDIR=${!outputLib}/share/dbus-1/system-services"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_SYSCONFDIR=${!outputLib}/etc"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_CONFDIR=${!outputLib}/etc/xdg"
|
||||||
|
cmakeFlags+=" -DKDE_INSTALL_AUTOSTARTDIR=${!outputLib}/etc/xdg/autostart"
|
||||||
|
}
|
||||||
|
|
||||||
|
envHooks+=(_ecmSetXdgDirs _ecmPropagateSharedData)
|
||||||
|
preConfigureHooks+=(_ecmConfig)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ kdeFramework, lib, extra-cmake-modules, kconfig, kconfigwidgets
|
{ kdeFramework, lib, extra-cmake-modules, kconfig, kconfigwidgets
|
||||||
, kcoreaddons, kdbusaddons, kdoctools, ki18n, kiconthemes, knotifications
|
, kcoreaddons , kdbusaddons, kdoctools, ki18n, kiconthemes
|
||||||
, kservice, kwidgetsaddons, kwindowsystem, libgcrypt
|
, knotifications , kservice, kwidgetsaddons, kwindowsystem, libgcrypt
|
||||||
, makeQtWrapper }:
|
, makeQtWrapper }:
|
||||||
|
|
||||||
kdeFramework {
|
kdeFramework {
|
||||||
|
Loading…
Reference in New Issue
Block a user