gnu: qtdeclarative-5: Fix linking on riscv64-linux.

* gnu/packages/qt.scm (qtdeclarative-5)[arguments]: Add phase when
building for riscv64-linux to adjust the linker flags.
This commit is contained in:
Efraim Flashner 2022-09-02 08:28:17 +03:00
parent 0c518f974e
commit 83be24a13f
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351

View File

@ -1045,7 +1045,17 @@ xmlpatternsvalidator.")))
;; is provided by qtdeclarative-5.
(substitute*
"lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake"
(("\\$\\{_qt5Core_install_prefix\\}") out)))))))))
(("\\$\\{_qt5Core_install_prefix\\}") out)))))
;; TODO: Add phase unconditionally.
,@(if (target-riscv64?)
'((add-after 'unpack 'fix-linking-riscv64
(lambda _
(substitute* "src/qml/qml.pro"
(("DEFINES \\+= QT_NO_FOREACH")
(string-append
"isEqual(QT_ARCH, \"riscv64\"): QMAKE_LIBS += -latomic\n\n"
"DEFINES += QT_NO_FOREACH"))))))
'())))))
(native-inputs
(list perl
pkg-config