From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: qt: Fix for i686. Date: Fri, 01 May 2015 00:25:05 +0200 Message-ID: <87mw1pdzjy.fsf@gnu.org> References: <87h9rzdl2q.fsf@taylan.uni.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnwtR-0007MO-GT for guix-devel@gnu.org; Thu, 30 Apr 2015 18:25:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnwtN-0005c4-F1 for guix-devel@gnu.org; Thu, 30 Apr 2015 18:25:17 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnwtN-0005c0-B3 for guix-devel@gnu.org; Thu, 30 Apr 2015 18:25:13 -0400 In-Reply-To: <87h9rzdl2q.fsf@taylan.uni.cx> ("Taylan Ulrich \=\?utf-8\?Q\?\=5C\=22Bay\=C4\=B1rl\=C4\=B1\=2FKammer\=5C\=22\=22's\?\= message of "Wed, 29 Apr 2015 17:13:17 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Taylan Ulrich =?utf-8?Q?=22Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer=22?= Cc: guix-devel@gnu.org taylanbayirli@gmail.com (Taylan Ulrich "Bay=C4=B1rl=C4=B1/Kammer") skribis: > This is really hacky but seems to work. Good. :-) > From 35fdd9e2fcd5b953b3a088d0bb22d84f7dc5ded9 Mon Sep 17 00:00:00 2001 > From: =3D?UTF-8?q?Taylan=3D20Ulrich=3D20Bay=3DC4=3DB1rl=3DC4=3DB1/Kammer?= =3D > > Date: Fri, 24 Apr 2015 10:43:57 +0200 > Subject: [PATCH 4/4] gnu: qt: Fix for i686. =E2=80=9CFix compilation on i686.=E2=80=9D > See . > > * gnu/packages/qt.scm (qt): Copy mesa's GL headers to a temporary directo= ry, > patching them for Qt. [...] > `(#: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=3D.*") > + (string-append "includedir=3D" mesa*-include "\n"))) > + (setenv "PKG_CONFIG_PATH" > + (string-append mesa*-pkgconfig ":" > + (getenv "PKG_CONFIG_PATH"))) For clarity, could you make it a separate phase before the =E2=80=98configu= re=E2=80=99 phase, and also augment the comment to mention that we do the monkey-patching here rather than using the bundled copy so we can still use our own headers and DSO (what Mark explained)? OK to push with this change, thanks a lot! Ludo=E2=80=99.