From 2fce45391a91a898d0183149ad602a0db397fea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Vitor=20de=20Lima=20Matos?= Date: Sun, 15 May 2022 18:07:31 -0300 Subject: [PATCH] semantik: fix for new kf5 --- pkgs/applications/office/semantik/default.nix | 10 +++++++++- pkgs/applications/office/semantik/qt5.patch | 11 ++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/office/semantik/default.nix b/pkgs/applications/office/semantik/default.nix index 41bf38fc4b47..afd131317ab3 100644 --- a/pkgs/applications/office/semantik/default.nix +++ b/pkgs/applications/office/semantik/default.nix @@ -1,6 +1,7 @@ { lib , mkDerivation , fetchFromGitLab +, fetchpatch , wafHook , pkg-config , cmake @@ -33,7 +34,14 @@ mkDerivation rec { sha256 = "sha256-aXOokji6fYTpaeI/IIV+5RnTE2Cm8X3WfADf4Uftkss="; }; - patches = [ ./qt5.patch ]; + patches = [ + (fetchpatch { + name = "fix-kdelibs4support.patch"; + url = "https://gitlab.com/ita1024/semantik/-/commit/a991265bd6e3ed6541f8ec099420bc08cc62e30c.patch"; + sha256 = "sha256-E4XjdWfUnqhmFJs9ORznHoXMDS9zHWNXvQIKKkN4AAo="; + }) + ./qt5.patch + ]; postPatch = '' echo "${lib.getDev qtwebengine}" diff --git a/pkgs/applications/office/semantik/qt5.patch b/pkgs/applications/office/semantik/qt5.patch index 6d41babdff47..c5d5f3f1306f 100644 --- a/pkgs/applications/office/semantik/qt5.patch +++ b/pkgs/applications/office/semantik/qt5.patch @@ -40,14 +40,14 @@ diff --color -ur a/wscript b/wscript if not os.path.exists(specpath): raise ValueError('No spec path, cannot build') -@@ -196,17 +220,28 @@ +@@ -196,17 +220,29 @@ conf.env.append_value('INCLUDES_KDECORE', specpath) - libs = ['KF5KIOCore', 'KF5Auth', 'KF5KIOWidgets', - 'KF5IconThemes', 'KF5ConfigWidgets', 'KF5XmlGui', - 'KF5CoreAddons', 'KF5ConfigGui', 'KF5ConfigCore', -- 'KF5WidgetsAddons', 'KF5I18n', 'KF5SonnetUi'] +- 'KF5WidgetsAddons', 'KF5I18n', 'KF5SonnetUi', 'KF5AuthCore'] + libs = { + 'KF5KIOCore': '@KF5KIOCore_dev@', + 'KF5Auth': '@KF5Auth_dev@', @@ -61,6 +61,7 @@ diff --color -ur a/wscript b/wscript + 'KF5WidgetsAddons': '@KF5WidgetsAddons_dev@', + 'KF5I18n': '@KF5I18n_dev@', + 'KF5SonnetUi': '@KF5SonnetUi_dev@', ++ 'KF5AuthCore': '@KF5Auth_dev@', + } - for lib in libs: @@ -73,6 +74,6 @@ diff --color -ur a/wscript b/wscript - p = '%s/qt_%s.pri' % (path, name) + p = '%s/qt_%s.pri' % (mkspec_path+"/mkspecs/modules", name) + print("[log] path :",path,", name : ",name) - for line in Utils.readf(p).splitlines(): - lst = line.strip().split(' = ') - if lst[0].endswith('.name'): + try: + code = Utils.readf(p) + except EnvironmentError: