From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejSQC-0007Gc-QA for guix-patches@gnu.org; Wed, 07 Feb 2018 11:18:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejSQ8-0007QE-6R for guix-patches@gnu.org; Wed, 07 Feb 2018 11:18:08 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:53734) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ejSQ7-0007Pz-W1 for guix-patches@gnu.org; Wed, 07 Feb 2018 11:18:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ejSQ7-0005Re-4H for guix-patches@gnu.org; Wed, 07 Feb 2018 11:18:03 -0500 Subject: [bug#30340] [PATCH 1/6] gnu: qtbase: Use the store paths for other packages and dynamically loaded libs. Resent-Message-ID: From: Marius Bakke In-Reply-To: <20180203192505.29516-1-h.goebel@crazy-compilers.com> References: <20180203192212.29173-1-h.goebel@crazy-compilers.com> <20180203192505.29516-1-h.goebel@crazy-compilers.com> Date: Wed, 07 Feb 2018 17:16:59 +0100 Message-ID: <87k1voixl0.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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 , 30340@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hartmut Goebel writes: > Adobt the NixOS patches as of 2018-01-19: I don't see any patches in this series. FWIW I think we deviate enough from NixOS at this point that the comments are unnecessary. > - .cmake.in and .prf files are not patches. > > - src/corelib/tools/qtimezoneprivate_tz.cpp: NixOS uses $TZDIR, we use > hardcoded path to tzdata. Why hardcode the path? We set TZDIR as well in (gnu system). [...] > @@ -540,7 +542,42 @@ developers using C++ or QML, a CSS & JavaScript like= language.") > "qt_config.prf" "winrt/package_manifest.prf")) > (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata) > (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)) > - #t)))))) > + #t))) > + (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. Is there any reason we cannot add these libraries to RUNPATH instead? The below approach seems somewhat fragile to me. > + (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 > + (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))))) > (native-search-paths > (list (search-path-specification > (variable "QMAKEPATH") > --=20 > 2.13.6 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlp7JnsACgkQoqBt8qM6 VPoyOAgAiLqfZLEZMGwAPDBn/eV8e9P3vyvTngtrYUIXgdTVCVdYiCoxDmUAQ6k1 sm8VIaEhDbx1DL8ulpBKb3jDNCfkBEdCcS48MM45KqWJbrYryNLwXF2pCnnYV0gR U0vuglZpsrjxlQGtjI1tY6wIK2UGvwcQMVgNZ2MdgGapihC9B+3qJ5ekTJC57efo XjIBYBReA86UpjUg3uV/oDOYEo97u3F/rdJ/C3mZ7P0ksscsBIwjz0yR8JbzKDsY fyKl6Iv294CYcGwOJDKMRSomB+d0KCznfLRnnI/WIVoOE4qO5z7nDYKsvSjhtut8 rQctAnTHEGpCjfOkazuZu5KhYvJr3A== =9vT6 -----END PGP SIGNATURE----- --=-=-=--