deepin.dtk6widget: init at 6.0.15
This commit is contained in:
parent
bdc7fd3ca9
commit
703ccfb34a
@ -25,6 +25,7 @@ let
|
||||
util-dfm = callPackage ./library/util-dfm { };
|
||||
dtk6core = callPackage ./library/dtk6core { };
|
||||
dtk6gui = callPackage ./library/dtk6gui { };
|
||||
dtk6widget = callPackage ./library/dtk6widget { };
|
||||
|
||||
#### CORE
|
||||
deepin-kwin = callPackage ./core/deepin-kwin { };
|
||||
|
83
pkgs/desktops/deepin/library/dtk6widget/default.nix
Normal file
83
pkgs/desktops/deepin/library/dtk6widget/default.nix
Normal file
@ -0,0 +1,83 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, doxygen
|
||||
, qt6Packages
|
||||
, dtk6gui
|
||||
, cups
|
||||
, libstartup_notification
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "dtk6widget";
|
||||
version = "6.0.15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linuxdeepin";
|
||||
repo = "dtk6widget";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-QCdRjkD4JTPecLeZK+Y5U/H9pBgKI4DHRuchz/GymWQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./fix-pkgconfig-path.patch
|
||||
./fix-pri-path.patch
|
||||
./fix-build-on-qt-6_7.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/widgets/dapplication.cpp \
|
||||
--replace-fail "auto dataDirs = DStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);" \
|
||||
"auto dataDirs = DStandardPaths::standardLocations(QStandardPaths::GenericDataLocation) << \"$out/share\";"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
doxygen
|
||||
pkg-config
|
||||
qt6Packages.qttools
|
||||
qt6Packages.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
cups
|
||||
libstartup_notification
|
||||
] ++ (with qt6Packages; [
|
||||
qtbase
|
||||
qtmultimedia
|
||||
qtsvg
|
||||
]);
|
||||
|
||||
propagatedBuildInputs = [ dtk6gui ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DDTK_VERSION=${finalAttrs.version}"
|
||||
"-DBUILD_DOCS=ON"
|
||||
"-DMKSPECS_INSTALL_DIR=${placeholder "dev"}/mkspecs/modules"
|
||||
"-DQCH_INSTALL_DESTINATION=${placeholder "doc"}/share/doc"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
# qt.qpa.plugin: Could not find the Qt platform plugin "minimal"
|
||||
# A workaround is to set QT_PLUGIN_PATH explicitly
|
||||
export QT_PLUGIN_PATH=${lib.getBin qt6Packages.qtbase}/${qt6Packages.qtbase.qtPluginPrefix}
|
||||
'';
|
||||
|
||||
outputs = [ "out" "dev" "doc" ];
|
||||
|
||||
postFixup = ''
|
||||
for binary in $out/lib/dtk6/DWidget/bin/*; do
|
||||
wrapQtApp $binary
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Deepin graphical user interface library";
|
||||
homepage = "https://github.com/linuxdeepin/dtk6widget";
|
||||
license = lib.licenses.lgpl3Plus;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = lib.teams.deepin.members;
|
||||
};
|
||||
})
|
@ -0,0 +1,20 @@
|
||||
diff --git a/src/widgets/dkeysequenceedit.cpp b/src/widgets/dkeysequenceedit.cpp
|
||||
index a99e17ae..0e1c57f6 100644
|
||||
--- a/src/widgets/dkeysequenceedit.cpp
|
||||
+++ b/src/widgets/dkeysequenceedit.cpp
|
||||
@@ -276,13 +276,13 @@ void DKeySequenceEdit::keyPressEvent(QKeyEvent *e)
|
||||
}
|
||||
|
||||
if (e->modifiers() & Qt::ShiftModifier) {
|
||||
- QList<int> possibleKeys = QKeyMapper::possibleKeys(e);
|
||||
+ auto possibleKeys = QKeyMapper::possibleKeys(e);
|
||||
int pkTotal = possibleKeys.count();
|
||||
if (!pkTotal)
|
||||
return;
|
||||
bool found = false;
|
||||
for (int i = 0; i < possibleKeys.size(); ++i) {
|
||||
- if (possibleKeys.at(i) - nextKey == int(e->modifiers())
|
||||
+ if (static_cast<int>(possibleKeys.at(i)) - nextKey == static_cast<int>(e->modifiers())
|
||||
|| (possibleKeys.at(i) == nextKey && e->modifiers() == Qt::ShiftModifier)) {
|
||||
nextKey = possibleKeys.at(i);
|
||||
found = true;
|
@ -0,0 +1,14 @@
|
||||
diff --git a/misc/DtkWidget.pc.in b/misc/DtkWidget.pc.in
|
||||
index 3c610669..b6ed04ca 100644
|
||||
--- a/misc/DtkWidget.pc.in
|
||||
+++ b/misc/DtkWidget.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@widget
|
||||
Description: Deepin Tool Kit dtkwidget header files
|
17
pkgs/desktops/deepin/library/dtk6widget/fix-pri-path.patch
Normal file
17
pkgs/desktops/deepin/library/dtk6widget/fix-pri-path.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/misc/qt_lib_DtkWidget.pri.in b/misc/qt_lib_DtkWidget.pri.in
|
||||
index 623878d3..561f5186 100644
|
||||
--- a/misc/qt_lib_DtkWidget.pri.in
|
||||
+++ b/misc/qt_lib_DtkWidget.pri.in
|
||||
@@ -4,9 +4,9 @@ QT.dtkwidget.MINOR_VERSION = @PROJECT_VERSION_MINOR@
|
||||
QT.dtkwidget.PATCH_VERSION = @PROJECT_VERSION_PATCH@
|
||||
QT.dtkwidget.name = dtkwidget
|
||||
QT.dtkwidget.module = dtk@DTK_VERSION_MAJOR@widget
|
||||
-QT.dtkwidget.tools = @CMAKE_INSTALL_PREFIX@/@TOOL_INSTALL_DIR@
|
||||
-QT.dtkwidget.libs = @CMAKE_INSTALL_PREFIX@/@LIBRARY_INSTALL_DIR@
|
||||
-QT.dtkwidget.includes = @CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@
|
||||
+QT.dtkwidget.tools = @TOOL_INSTALL_DIR@
|
||||
+QT.dtkwidget.libs = @LIBRARY_INSTALL_DIR@
|
||||
+QT.dtkwidget.includes = @INCLUDE_INSTALL_DIR@
|
||||
QT.dtkwidget.frameworks =
|
||||
QT.dtkwidget.depends = core gui dtkcore network concurrent dtkgui printsupport printsupport_private widgets widgets_private gui_private x11extras dbus
|
||||
QT.dtkwidget.module_config = v2 internal_module ltcg
|
Loading…
Reference in New Issue
Block a user