packages: dictionaries: Set PKG_CONFIG_PATH env var instead of patching headers in goldendict-ng package definition #2

Merged
hashirama merged 1 commit from anemofilia/ajattix:main into main 2024-08-01 01:56:32 +00:00
Showing only changes of commit 45990d1fe5 - Show all commits

View file

@ -63,32 +63,17 @@
(base32 "0li7zvxivgyffjm4gjlaw8syyqiaczn3778q1rl2ncp9l8008gxp"))))
(build-system cmake-build-system)
(arguments
(list
#:make-flags #~(list "-j" "7")
(list #:tests? #f
#:cmake cmake
#:tests? #f
#:make-flags
#~(list "-j" "7")
#:configure-flags
#~(list "-DCMAKE_BUILD_TYPE=Release")
#~(list "-DCMAKE_BUILD_TYPE=Release"
(string-append "PKG_CONFIG_PATH="
#$(this-package-input "qtbase")
"/include/qt6/QtPrintSupport"))
#: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"
(("<QPrinter>")
(qtbase-file
"/include/qt6/QtPrintSupport/QPrinter"))
(("<QPageSetupDialog>")
(qtbase-file
"/include/qt6/QtPrintSupport/QPageSetupDialog"))
(("<QPrintPreviewDialog>")
(qtbase-file
"/include/qt6/QtPrintSupport/QPrintPreviewDialog"))
(("<QPrintDialog>")
(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")