From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ek8yF-0006Hx-1D for guix-patches@gnu.org; Fri, 09 Feb 2018 08:44:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ek8yA-0007N9-1y for guix-patches@gnu.org; Fri, 09 Feb 2018 08:44:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:55112) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ek8y9-0007N2-U1 for guix-patches@gnu.org; Fri, 09 Feb 2018 08:44:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ek8y9-0002ER-JF for guix-patches@gnu.org; Fri, 09 Feb 2018 08:44:01 -0500 Subject: [bug#30340] [PATCH 1/6] gnu: qtbase: Use the store paths for other packages and dynamically loaded libs. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20180203192212.29173-1-h.goebel@crazy-compilers.com> <20180203192505.29516-1-h.goebel@crazy-compilers.com> Date: Fri, 09 Feb 2018 14:43:43 +0100 In-Reply-To: <20180203192505.29516-1-h.goebel@crazy-compilers.com> (Hartmut Goebel's message of "Sat, 3 Feb 2018 20:25:00 +0100") Message-ID: <87mv0i1do0.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Hartmut Goebel Cc: 30340@debbugs.gnu.org Hi Hartmut, This sounds like a great improvement! Hartmut Goebel skribis: > Adobt the NixOS patches as of 2018-01-19: > > - .cmake.in and .prf files are not patches. > > - src/corelib/tools/qtimezoneprivate_tz.cpp: NixOS uses $TZDIR, we use > hardcoded path to tzdata. > > - src/corelib/kernel/qcoreapplication.cpp: NixOS adds plugin paths derived > from PATH. We do not need this, since we have native-search-path > QT_PLUGIN_PATH. > > - src/network/kernel/qdnslookup_unix.cpp, > src/network/kernel/qhostinfo_unix.cpp: Use hardcoded path to libresolv. > > - src/network/ssl/qsslcontext_openssl.cpp: NixOS changes a conditional > compilation for Qt 5.9 (but leaves it unchanged for Qt 5.10) to fix > compilation with libressl. But Qt does not support libressl anway, see > config.tests/openssl/openssl.cpp in qtbase 5.9.4. > > - src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp: > Use hardcoded path to libx11. > > - src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp: > Use hardcoded path to mess's libGL, no need for a fall-back. > > - src/plugins/platforms/xcb/qxcbcursor.cpp: Use hardcoded path to Xcursor. > > - src/plugins/platformthemes/gtk3/main.cpp: NixOS changes $XDG_DATA_DIRS = and > $GIO_EXTRA_MODULES in the code. We use search-path-specification for th= is. > > - src/testlib/qtestassert.h: Unchanged for guix. I don=E2=80=99t understand all of this (does it describe problems or soluti= ons? what does it mean =E2=80=9Cfiles are not patches=E2=80=9D? etc.) and I thin= k we should describe the problems/solutions on their own, without =E2=80=9CNixOS does t= his=E2=80=9D comments, which isn=E2=80=99t really helpful IMO. As an aside, I think explanations when they=E2=80=99re needed, should go in= the source, not in the commit log. > * gnu/packages/qt.scm (qtbase) Add comment. [inputs]: Add tzdata. > [aguments]: Add 'patch-paths'. [...] > + (add-after 'unpack 'patch-paths > + ;; Use the absolute paths for dynamically loaded libs, otherw= ise > + ;; the lib will be searched in the actual executable's RUNPAT= H, > + ;; which may not include the requested lib. > + (lambda* (#:key inputs #:allow-other-keys) > + ;; tzdata > + (substitute* "src/corelib/tools/qtimezoneprivate_tz.cpp" > + (("\"/usr(/(share|lib)/zoneinfo/)" _ path _) > + (string-append "\"" (assoc-ref inputs "tzdata") path))) > + ;; libresolve. TODO: Check is this is really required I think you can remove =E2=80=9CTODO=E2=80=9D here. > + (let ((glibc (assoc-ref inputs ,(if (%current-target-system) > + "cross-libc" "libc")))) > + (substitute* '("src/network/kernel/qdnslookup_unix.cpp" > + "src/network/kernel/qhostinfo_unix.cpp") > + (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"= \\)\\);)" _ a b) > + (string-append a glibc "/lib/lib" b)))) > + ;; X11/locale (compose path) > + (substitute* "src/plugins/platforminputcontexts/compose/gen= erator/qtablegenerator.cpp" > + ;; Don't search in /usr/=E2=80=A6/X11/locale, =E2=80=A6 > + (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/= usr/.*/X11/locale\"\\)\\);" line) > + (string-append "// " line)) > + ;; =E2=80=A6 but use libx11's path > + (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X= 11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b) > + (string-append a "\"" (assoc-ref inputs "libx11") b))) > + ;; libGL > + (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb= _glx/qglxintegration.cpp" > + (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)"= _ a b) > + (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)= )) > + ;; libXcusor > + (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp" > + (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcurso= r\"\\), 1\\);)" _ a b) > + (string-append a (assoc-ref inputs "libxcursor") "/lib/l= ib" b)) > + (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcu= rsor\"\\)\\);)" _ a b) > + (string-append a (assoc-ref inputs "libxcursor") "/lib/l= ib" b))) > + #t))))) That makes sense to me, and actually, I don=E2=80=99t think it needs more explanations. :-) Did you notice improvements on KDE applications? So, LGTM! Thanks, Ludo=E2=80=99.