From a9c372f122b8ed8fda902f645bcb9360fa0d6178 Mon Sep 17 00:00:00 2001 From: rewine Date: Tue, 26 Sep 2023 12:05:35 +0800 Subject: [PATCH] dtkwidget: 5.6.10 -> 5.6.17 --- .../deepin/library/dtkwidget/default.nix | 21 ++++++++++++------- .../dtkwidget/fix-pkgconfig-path.patch | 14 +++++++++++++ .../library/dtkwidget/fix-pri-path.patch | 17 +++++++++++++++ 3 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 pkgs/desktops/deepin/library/dtkwidget/fix-pkgconfig-path.patch create mode 100644 pkgs/desktops/deepin/library/dtkwidget/fix-pri-path.patch diff --git a/pkgs/desktops/deepin/library/dtkwidget/default.nix b/pkgs/desktops/deepin/library/dtkwidget/default.nix index 65c556d77b74..b646baa48c3c 100644 --- a/pkgs/desktops/deepin/library/dtkwidget/default.nix +++ b/pkgs/desktops/deepin/library/dtkwidget/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchFromGitHub +, fetchpatch , cmake , pkg-config , qttools @@ -19,15 +20,20 @@ stdenv.mkDerivation rec { pname = "dtkwidget"; - version = "5.6.10"; + version = "5.6.17"; src = fetchFromGitHub { owner = "linuxdeepin"; repo = pname; rev = version; - sha256 = "sha256-PhVK/lUFrDW1bn9lUhLuKWLAVj7E7+/YC5USShrg3ds="; + hash = "sha256-oFmM0e7ht3lCL50pwS/v/BLFmT2jymQaUZ4SmLdxvMo="; }; + patches = [ + ./fix-pkgconfig-path.patch + ./fix-pri-path.patch + ]; + postPatch = '' substituteInPlace src/widgets/dapplication.cpp \ --replace "auto dataDirs = DStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);" \ @@ -56,12 +62,11 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ dtkgui ]; cmakeFlags = [ - "-DDVERSION=${version}" + "-DDTK_VERSION=${version}" "-DBUILD_DOCS=ON" - "-DQCH_INSTALL_DESTINATION=${qtbase.qtDocPrefix}" - "-DMKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs/modules" - "-DCMAKE_INSTALL_LIBDIR=lib" - "-DCMAKE_INSTALL_INCLUDEDIR=include" + "-DMKSPECS_INSTALL_DIR=${placeholder "dev"}/mkspecs/modules" + "-DQCH_INSTALL_DESTINATION=${placeholder "doc"}/${qtbase.qtDocPrefix}" + "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "dev"}/libexec" ]; preConfigure = '' @@ -70,6 +75,8 @@ stdenv.mkDerivation rec { export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix} ''; + outputs = [ "out" "dev" "doc" ]; + meta = with lib; { description = "Deepin graphical user interface library"; homepage = "https://github.com/linuxdeepin/dtkwidget"; diff --git a/pkgs/desktops/deepin/library/dtkwidget/fix-pkgconfig-path.patch b/pkgs/desktops/deepin/library/dtkwidget/fix-pkgconfig-path.patch new file mode 100644 index 000000000000..df4452259580 --- /dev/null +++ b/pkgs/desktops/deepin/library/dtkwidget/fix-pkgconfig-path.patch @@ -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 diff --git a/pkgs/desktops/deepin/library/dtkwidget/fix-pri-path.patch b/pkgs/desktops/deepin/library/dtkwidget/fix-pri-path.patch new file mode 100644 index 000000000000..cf2faac94855 --- /dev/null +++ b/pkgs/desktops/deepin/library/dtkwidget/fix-pri-path.patch @@ -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