From 35fdd9e2fcd5b953b3a088d0bb22d84f7dc5ded9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Fri, 24 Apr 2015 10:43:57 +0200 Subject: [PATCH 4/4] gnu: qt: Fix for i686. See . * gnu/packages/qt.scm (qt): Copy mesa's GL headers to a temporary directory, patching them for Qt. --- gnu/packages/qt.scm | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 8de1ffe..0f4282d 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -166,8 +166,29 @@ webrtc/tools/e2e_quality/audio/perf"))))) `(#:phases (alist-replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Mesa headers need monkey-patching for Qt. See: + ;; https://bugreports.qt.io/browse/QTBUG-45205 + (let* ((out (assoc-ref outputs "out")) + (mesa (assoc-ref inputs "mesa")) + (mesa-include (string-append mesa "/include")) + (mesa-pkgconfig (string-append mesa "/lib/pkgconfig")) + (mesa* (tmpnam)) + (mesa*-include (string-append mesa* "/include")) + (mesa*-pkgconfig (string-append mesa* "/lib/pkgconfig"))) + (copy-recursively mesa-include mesa*-include) + (substitute* (string-append mesa*-include "/GL/glext.h") + (("typedef ptrdiff_t GLsizeiptr;" all) + (string-append "#ifndef BUILDING_CHROMIUM\n" all)) + (("typedef ptrdiff_t GLintptr;" all) + (string-append all "\n#endif"))) + (copy-recursively mesa-pkgconfig mesa*-pkgconfig) + (substitute* (find-files mesa*-pkgconfig "\\.pc$") + (("includedir=.*") + (string-append "includedir=" mesa*-include "\n"))) + (setenv "PKG_CONFIG_PATH" + (string-append mesa*-pkgconfig ":" + (getenv "PKG_CONFIG_PATH"))) (substitute* '("configure" "qtbase/configure") (("/bin/pwd") (which "pwd"))) (substitute* "qtbase/src/corelib/global/global.pri" -- 2.2.1