gnu: powertabeditor: Fix build with Qt 5.11.

Fixes <https://bugs.gnu.org/31659>.

* gnu/packages/music.scm (powertabeditor)[arguments]: Add build phase
"add-missing-headers".
This commit is contained in:
Ricardo Wurmus 2018-05-31 08:28:28 +02:00
parent 0d6f84aab1
commit 1e341fa508
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -1184,6 +1184,19 @@ (define-public powertabeditor
(("boost::rational<int> duration\\(4, pos.getDurationType\\(\\)\\);") (("boost::rational<int> duration\\(4, pos.getDurationType\\(\\)\\);")
"boost::rational<int> duration(4, static_cast<int>(pos.getDurationType()));")) "boost::rational<int> duration(4, static_cast<int>(pos.getDurationType()));"))
#t)) #t))
;; Fix build with Qt 5.11.
(add-after 'unpack 'add-missing-headers
(lambda _
(substitute* (find-files "source/dialogs/" "\\.h$")
(("#include <QDialog>" m)
(string-append m "\n#include <QButtonGroup>")))
(substitute* "source/widgets/mixer/mixeritem.h"
(("#include <QWidget>" m)
(string-append m "\n#include <QStyle>")))
(substitute* "source/widgets/playback/playbackwidget.h"
(("#include <QWidget>" m)
(string-append m "\n#include <QButtonGroup>\n#include <QAction>")))
#t))
(add-before 'configure 'remove-third-party-libs (add-before 'configure 'remove-third-party-libs
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
;; Link with required static libraries, because we're not ;; Link with required static libraries, because we're not