extra-cmake-modules: use multiple outputs
This commit is contained in:
parent
a714284d8b
commit
a27a4c29ad
5 changed files with 89 additions and 79 deletions
pkgs/development/libraries/kde-frameworks-5.18/extra-cmake-modules
|
@ -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 {
|
||||
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;
|
||||
|
||||
# It is OK to propagate these inputs as long as
|
||||
|
@ -11,8 +13,8 @@ kdeFramework {
|
|||
# of some other derivation.
|
||||
propagatedNativeBuildInputs = [ cmake pkgconfig qttools ];
|
||||
|
||||
meta = {
|
||||
license = stdenv.lib.licenses.bsd2;
|
||||
maintainers = [ lib.maintainers.ttuegel ];
|
||||
meta = with lib; {
|
||||
license = licenses.bsd2;
|
||||
maintainers = [ maintainers.ttuegel ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
Index: extra-cmake-modules-5.18.0/kde-modules/KDEInstallDirs.cmake
|
||||
===================================================================
|
||||
--- extra-cmake-modules-5.18.0.orig/kde-modules/KDEInstallDirs.cmake
|
||||
+++ extra-cmake-modules-5.18.0/kde-modules/KDEInstallDirs.cmake
|
||||
@@ -200,32 +200,6 @@
|
||||
# GNUInstallDirs code deals with re-configuring, but that is dealt with
|
||||
# by the _define_* macros in this module).
|
||||
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
|
|
@ -0,0 +1 @@
|
|||
nix-lib-path.patch
|
|
@ -24,4 +24,48 @@ addMimePkg() {
|
|||
fi
|
||||
}
|
||||
|
||||
_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/interfaces"
|
||||
cmakeFlags+=" -DKDE_INSTALL_DBUSSERVICEDIR=${!outputLib}/share/services"
|
||||
cmakeFlags+=" -DKDE_INSTALL_DBUSSYSTEMSERVICEDIR=${!outputLib}/share/system-services"
|
||||
cmakeFlags+=" -DKDE_INSTALL_SYSCONFDIR=${!outputLib}/etc"
|
||||
cmakeFlags+=" -DKDE_INSTALL_CONFDIR=${!outputLib}/etc/xdg"
|
||||
cmakeFlags+=" -DKDE_INSTALL_AUTOSTARTDIR=${!outputLib}/etc/xdg/autostart"
|
||||
}
|
||||
|
||||
envHooks+=(addMimePkg)
|
||||
preConfigureHooks+=(_ecmConfig)
|
||||
|
|
Loading…
Reference in a new issue