deepin.dtk6declarative: init at 6.0.15

This commit is contained in:
rewine 2024-05-09 16:48:52 +08:00
parent 703ccfb34a
commit 6a52b0a1ec
4 changed files with 100 additions and 0 deletions

View File

@ -26,6 +26,7 @@ let
dtk6core = callPackage ./library/dtk6core { };
dtk6gui = callPackage ./library/dtk6gui { };
dtk6widget = callPackage ./library/dtk6widget { };
dtk6declarative = callPackage ./library/dtk6declarative { };
#### CORE
deepin-kwin = callPackage ./core/deepin-kwin { };

View File

@ -0,0 +1,70 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
, pkg-config
, doxygen
, qt6Packages
, dtk6gui
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dtk6declarative";
version = "6.0.15";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = "dtk6declarative";
rev = finalAttrs.version;
hash = "sha256-euHEfK2N2jtWMzeajgvTnHSl39zXwp7I0cQIqZRVGZ0=";
};
patches = [
./fix-pkgconfig-path.patch
./fix-pri-path.patch
];
nativeBuildInputs = [
cmake
pkg-config
doxygen
qt6Packages.qttools
qt6Packages.wrapQtAppsHook
];
propagatedBuildInputs = [
dtk6gui
] ++ (with qt6Packages ; [
qtbase
qtdeclarative
qtshadertools
qt5compat
]);
cmakeFlags = [
"-DDTK_VERSION=${finalAttrs.version}"
"-DBUILD_DOCS=ON"
"-DBUILD_EXAMPLES=ON"
"-DMKSPECS_INSTALL_DIR=${placeholder "dev"}/mkspecs/modules"
"-DQCH_INSTALL_DESTINATION=${placeholder "doc"}/share/doc"
"-DQML_INSTALL_DIR=${placeholder "out"}/${qt6Packages.qtbase.qtQmlPrefix}"
];
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}
export QML2_IMPORT_PATH=${lib.getBin qt6Packages.qtdeclarative}/${qt6Packages.qtbase.qtQmlPrefix}
'';
outputs = [ "out" "dev" "doc" ];
meta = {
description = "A widget development toolkit based on QtQuick/QtQml";
mainProgram = "dtk-exhibition";
homepage = "https://github.com/linuxdeepin/dtk6declarative";
license = lib.licenses.lgpl3Plus;
platforms = lib.platforms.linux;
maintainers = lib.teams.deepin.members;
};
})

View File

@ -0,0 +1,14 @@
diff --git a/misc/dtkdeclarative.pc.in b/misc/dtkdeclarative.pc.in
index dc3827f..fd0949e 100644
--- a/misc/dtkdeclarative.pc.in
+++ b/misc/dtkdeclarative.pc.in
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
-libdir=${prefix}/@LIB_INSTALL_DIR@
-includedir=${prefix}/@INCLUDE_INSTALL_DIR@
+libdir=@LIB_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
Name: DtkDeclarative
Description: Deepin Tool Kit DtkDeclarative header files

View File

@ -0,0 +1,15 @@
diff --git a/misc/qt_lib_dtkdeclarative.pri.in b/misc/qt_lib_dtkdeclarative.pri.in
index 8797802..44e32a3 100644
--- a/misc/qt_lib_dtkdeclarative.pri.in
+++ b/misc/qt_lib_dtkdeclarative.pri.in
@@ -4,8 +4,8 @@ QT.dtkdeclarative.MINOR_VERSION = @PROJECT_VERSION_MINOR@
QT.dtkdeclarative.PATCH_VERSION = @PROJECT_VERSION_PATCH@
QT.dtkdeclarative.name = dtkdeclarative
QT.dtkdeclarative.module = dtk@DTK_VERSION_MAJOR@declarative
-QT.dtkdeclarative.libs = @CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@
-QT.dtkdeclarative.includes = @CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@
+QT.dtkdeclarative.libs = @LIB_INSTALL_DIR@
+QT.dtkdeclarative.includes = @INCLUDE_INSTALL_DIR@
QT.dtkdeclarative.frameworks =
QT.dtkdeclarative.depends = core dbus xml gui dtkcore dtkgui quick quick_private
QT.dtkdeclarative.module_config = v2 ltcg