From 45990d1fe5cc1c4df56785caf0e27be5e2614a79 Mon Sep 17 00:00:00 2001 From: Luis Guilherme Coelho Date: Wed, 31 Jul 2024 22:20:33 -0300 Subject: [PATCH] packages: dictionaries: Set PKG_CONFIG_PATH env var instead of patching headers in goldendict-ng package definition --- ajatt/packages/dictionaries.scm | 55 ++++++++++++--------------------- 1 file changed, 20 insertions(+), 35 deletions(-) diff --git a/ajatt/packages/dictionaries.scm b/ajatt/packages/dictionaries.scm index e6151cb..0097b33 100644 --- a/ajatt/packages/dictionaries.scm +++ b/ajatt/packages/dictionaries.scm @@ -63,41 +63,26 @@ (base32 "0li7zvxivgyffjm4gjlaw8syyqiaczn3778q1rl2ncp9l8008gxp")))) (build-system cmake-build-system) (arguments - (list - #:make-flags #~(list "-j" "7") - #:cmake cmake - #:tests? #f - #:configure-flags - #~(list "-DCMAKE_BUILD_TYPE=Release") - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'absolutize-qt-headers - (lambda _ - (let ((qtbase-file - (lambda (path) - (string-append "\"" #$qtbase path "\"")))) - (substitute* "src/ui/mainwindow.cc" - (("") - (qtbase-file - "/include/qt6/QtPrintSupport/QPrinter")) - (("") - (qtbase-file - "/include/qt6/QtPrintSupport/QPageSetupDialog")) - (("") - (qtbase-file - "/include/qt6/QtPrintSupport/QPrintPreviewDialog")) - (("") - (qtbase-file - "/include/qt6/QtPrintSupport/QPrintDialog")))))) - (add-after 'wrap 'wrap-qt-process-path - (lambda* (#:key inputs outputs #:allow-other-keys) - (wrap-program (search-input-file outputs "bin/goldendict") - `("QTWEBENGINE_RESOURCES_PATH" = - (,(search-input-directory - inputs "/share/qt6/resources"))) - `("QTWEBENGINEPROCESS_PATH" = - (,(search-input-file - inputs "/lib/qt6/libexec/QtWebEngineProcess"))))))))) + (list #:tests? #f + #:cmake cmake + #:make-flags + #~(list "-j" "7") + #:configure-flags + #~(list "-DCMAKE_BUILD_TYPE=Release" + (string-append "PKG_CONFIG_PATH=" + #$(this-package-input "qtbase") + "/include/qt6/QtPrintSupport")) + #:phases + #~(modify-phases %standard-phases + (add-after 'wrap 'wrap-qt-process-path + (lambda* (#:key inputs outputs #:allow-other-keys) + (wrap-program (search-input-file outputs "bin/goldendict") + `("QTWEBENGINE_RESOURCES_PATH" = + (,(search-input-directory + inputs "/share/qt6/resources"))) + `("QTWEBENGINEPROCESS_PATH" = + (,(search-input-file + inputs "/lib/qt6/libexec/QtWebEngineProcess"))))))))) (native-inputs (list hunspell icu4c