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

pull/2/head
Luis Guilherme Coelho 2024-07-31 22:20:33 -03:00
parent 78d4627b8d
commit 45990d1fe5
No known key found for this signature in database
GPG Key ID: 1F2E76ACE3F531C8
1 changed files with 20 additions and 35 deletions

View File

@ -63,32 +63,17 @@
(base32 "0li7zvxivgyffjm4gjlaw8syyqiaczn3778q1rl2ncp9l8008gxp")))) (base32 "0li7zvxivgyffjm4gjlaw8syyqiaczn3778q1rl2ncp9l8008gxp"))))
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list #:tests? #f
#:make-flags #~(list "-j" "7")
#:cmake cmake #:cmake cmake
#:tests? #f #:make-flags
#~(list "-j" "7")
#:configure-flags #: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 #:phases
#~(modify-phases %standard-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 (add-after 'wrap 'wrap-qt-process-path
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(wrap-program (search-input-file outputs "bin/goldendict") (wrap-program (search-input-file outputs "bin/goldendict")