dtkcore: 5.6.10 -> 5.6.17

This commit is contained in:
rewine 2023-09-26 11:57:43 +08:00
parent 9ca36cdb32
commit b86462e7b9
No known key found for this signature in database
GPG key ID: 2964FF5514455F51
3 changed files with 48 additions and 7 deletions

View file

@ -10,6 +10,7 @@
, gsettings-qt
, lshw
, libuchardet
, spdlog
, dtkcommon
, systemd
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
@ -17,15 +18,20 @@
stdenv.mkDerivation rec {
pname = "dtkcore";
version = "5.6.10";
version = "5.6.17";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-ge8DiJMSaZo7GeQEgnDbi5SLsLxtOQ/P5/9aBgaG7Ds=";
hash = "sha256-/MGSvT8tPn+KqqlM6FY2iFsArmAkYMW5Q3Sl4g4zvH0=";
};
patches = [
./fix-pkgconfig-path.patch
./fix-pri-path.patch
];
postPatch = ''
substituteInPlace src/dsysinfo.cpp \
--replace "/usr/share/deepin/distribution.info" "/etc/distribution.info" \
@ -39,25 +45,27 @@ stdenv.mkDerivation rec {
wrapQtAppsHook
];
dontWrapQtApps = true;
buildInputs = [
qtbase
gsettings-qt
lshw
libuchardet
spdlog
]
++ lib.optional withSystemd systemd;
propagatedBuildInputs = [ dtkcommon ];
cmakeFlags = [
"-DDVERSION=${version}"
"-DBUILD_EXAMPLES=OFF"
"-DDTK_VERSION=${version}"
"-DBUILD_DOCS=ON"
"-DQCH_INSTALL_DESTINATION=${qtbase.qtDocPrefix}"
"-DBUILD_EXAMPLES=OFF"
"-DQCH_INSTALL_DESTINATION=${placeholder "doc"}/${qtbase.qtDocPrefix}"
"-DDSG_PREFIX_PATH='/run/current-system/sw'"
"-DMKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs/modules"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "dev"}/libexec"
"-DD_DSG_APP_DATA_FALLBACK=/var/dsg/appdata"
"-DBUILD_WITH_SYSTEMD=${if withSystemd then "ON" else "OFF"}"
];
@ -68,6 +76,8 @@ stdenv.mkDerivation rec {
export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
'';
outputs = [ "out" "dev" "doc" ];
meta = with lib; {
description = "Deepin tool kit core library";
homepage = "https://github.com/linuxdeepin/dtkcore";

View file

@ -0,0 +1,14 @@
diff --git a/misc/dtkcore.pc.in b/misc/dtkcore.pc.in
index 83eecb7..da24ce8 100644
--- a/misc/dtkcore.pc.in
+++ b/misc/dtkcore.pc.in
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
-libdir=${prefix}/@LIBRARY_INSTALL_DIR@
-includedir=${prefix}/@INCLUDE_INSTALL_DIR@
+libdir=@LIBRARY_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
Name: dtk@DTK_VERSION_MAJOR@core
Description: Deepin Tool Kit dtkcore header files

View file

@ -0,0 +1,17 @@
diff --git a/misc/qt_lib_dtkcore.pri.in b/misc/qt_lib_dtkcore.pri.in
index a331f52..ce01dc0 100644
--- a/misc/qt_lib_dtkcore.pri.in
+++ b/misc/qt_lib_dtkcore.pri.in
@@ -4,9 +4,9 @@ QT.dtkcore.MINOR_VERSION = @PROJECT_VERSION_MINOR@
QT.dtkcore.PATCH_VERSION = @PROJECT_VERSION_PATCH@
QT.dtkcore.name = dtkcore
QT.dtkcore.module = dtk@DTK_VERSION_MAJOR@core
-QT.dtkcore.tools = @CMAKE_INSTALL_PREFIX@/@TOOL_INSTALL_DIR@
-QT.dtkcore.libs = @CMAKE_INSTALL_PREFIX@/@LIBRARY_INSTALL_DIR@
-QT.dtkcore.includes = @CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@
+QT.dtkcore.tools = @TOOL_INSTALL_DIR@
+QT.dtkcore.libs = @LIBRARY_INSTALL_DIR@
+QT.dtkcore.includes = @INCLUDE_INSTALL_DIR@
QT.dtkcore.frameworks =
QT.dtkcore.depends = core dbus xml
QT.dtkcore.module_config = v2 ltcg