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,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"
(("<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")
`("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