all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: 30340@debbugs.gnu.org
Subject: [bug#30340] [PATCH 1/6] gnu: qtbase: Use the store paths for other packages and dynamically loaded libs.
Date: Fri, 09 Feb 2018 14:43:43 +0100	[thread overview]
Message-ID: <87mv0i1do0.fsf@gnu.org> (raw)
In-Reply-To: <20180203192505.29516-1-h.goebel@crazy-compilers.com> (Hartmut Goebel's message of "Sat, 3 Feb 2018 20:25:00 +0100")

Hi Hartmut,

This sounds like a great improvement!

Hartmut Goebel <h.goebel@crazy-compilers.com> 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 this.
>
> - src/testlib/qtestassert.h: Unchanged for guix.

I don’t understand all of this (does it describe problems or solutions?
what does it mean “files are not patches”? etc.) and I think we should
describe the problems/solutions on their own, without “NixOS does this”
comments, which isn’t really helpful IMO.

As an aside, I think explanations when they’re needed, should go in the
source, not in the commit log.

> * gnu/packages/qt.scm (qtbase) Add comment. [inputs]: Add tzdata.
>   [aguments]<phases>: Add 'patch-paths'.

[...]

> +         (add-after 'unpack 'patch-paths
> +           ;; Use the absolute paths for dynamically loaded libs, otherwise
> +           ;; the lib will be searched in the actual executable's RUNPATH,
> +           ;; 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 “TODO” 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/generator/qtablegenerator.cpp"
> +               ;; Don't search in /usr/…/X11/locale, …
> +               (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
> +                (string-append "// " line))
> +               ;; … but use libx11's path
> +               (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_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\\(\")(Xcursor\"\\), 1\\);)" _ a b)
> +                (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
> +               (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
> +                (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
> +             #t)))))

That makes sense to me, and actually, I don’t think it needs more
explanations.  :-)

Did you notice improvements on KDE applications?

So, LGTM!

Thanks,
Ludo’.

  parent reply	other threads:[~2018-02-09 13:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-03 19:22 [bug#30340] [PATCH 0/6] Adopt NixOS patches for Qt5 Hartmut Goebel
2018-02-03 19:25 ` [bug#30340] [PATCH 1/6] gnu: qtbase: Use the store paths for other packages and dynamically loaded libs Hartmut Goebel
2018-02-03 19:25   ` [bug#30340] [PATCH 2/6] gnu: qtdeclarative: Add note about a patch NixOS has but we don't need Hartmut Goebel
2018-02-06  8:52     ` Danny Milosavljevic
2018-02-03 19:25   ` [bug#30340] [PATCH 3/6] gnu: qtscript: " Hartmut Goebel
2018-02-06  8:53     ` Danny Milosavljevic
2018-02-03 19:25   ` [bug#30340] [PATCH 4/6] gnu: qtserialport: Use the store paths for dynamically loaded libs Hartmut Goebel
2018-02-06  8:55     ` Danny Milosavljevic
2018-02-03 19:25   ` [bug#30340] [PATCH 5/6] gnu: qttools: Add note about a patch NixOS has but we don't need Hartmut Goebel
2018-02-06  8:54     ` Danny Milosavljevic
2018-02-03 19:25   ` [bug#30340] [PATCH 6/6] gnu: qtwebkit: " Hartmut Goebel
2018-02-06  8:57     ` Danny Milosavljevic
2018-02-06  9:00   ` [bug#30340] [PATCH 1/6] gnu: qtbase: Use the store paths for other packages and dynamically loaded libs Danny Milosavljevic
2018-02-06 11:57     ` Hartmut Goebel
2018-02-06 17:54       ` Danny Milosavljevic
2018-02-08 23:49         ` Hartmut Goebel
2018-02-07 16:16   ` Marius Bakke
2018-02-12 15:37     ` Hartmut Goebel
2018-02-13 22:48       ` Marius Bakke
2018-02-16 16:18         ` Hartmut Goebel
2018-02-16 16:49           ` Ludovic Courtès
2018-02-16 18:49             ` [bug#30340] " Hartmut Goebel
2018-02-17 16:08               ` Ludovic Courtès
2018-02-17 20:25                 ` Leo Famulari
2018-02-16 16:26         ` Hartmut Goebel
2018-02-16 16:36           ` Marius Bakke
2018-02-09 13:43   ` Ludovic Courtès [this message]
2018-02-12 15:59     ` Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mv0i1do0.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=30340@debbugs.gnu.org \
    --cc=h.goebel@crazy-compilers.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.