[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: Patch libxt's default search path.
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] gnu: Patch libxt's default search path. |
Date: |
Sun, 04 Dec 2016 22:19:37 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
John Darrington <address@hidden> skribis:
> * gnu/packages/patches/libxt-guix-search-paths.patch: New file.
> * gnu/packages/xorg.scm (libxt) [source]: Add patch.
> ---
> gnu/packages/patches/libxt-guix-search-paths.patch | 123
> +++++++++++++++++++++
> gnu/packages/xorg.scm | 3 +-
> 2 files changed, 125 insertions(+), 1 deletion(-)
> create mode 100644 gnu/packages/patches/libxt-guix-search-paths.patch
>
> diff --git a/gnu/packages/patches/libxt-guix-search-paths.patch
> b/gnu/packages/patches/libxt-guix-search-paths.patch
> new file mode 100644
> index 0000000..dfeea8a
> --- /dev/null
> +++ b/gnu/packages/patches/libxt-guix-search-paths.patch
> @@ -0,0 +1,123 @@
Please add a comment here explaining what it does and why we chose this
approach.
> + {
> +-#if defined(WIN32)
> +- static char xfilesearchpath[] = "";
> +-
> +- return xfilesearchpath;
> +-#else
> +- return XFILESEARCHPATHDEFAULT;
> +-#endif
> ++ static const char *search_path_default_stem[6] = {
static const char *const *search_path_default_stem[]
> ++ "/lib/X11/%L/%T/%N%C%S",
> ++ "/lib/X11/%l/%T/%N%C%S",
> ++ "/lib/X11/%T/%N%C%S",
> ++ "/lib/X11/%L/%T/%N%S",
> ++ "/lib/X11/%l/%T/%N%S",
> ++ "/lib/X11/%T/%N%S"
> ++ };
> ++
> ++#define SIZEOF_STEMS (strlen (search_path_default_stem[0]) \
> ++ + strlen (search_path_default_stem[1]) \
> ++ + strlen (search_path_default_stem[2]) \
> ++ + strlen (search_path_default_stem[3]) \
> ++ + strlen (search_path_default_stem[4]) \
> ++ + strlen (search_path_default_stem[5]))
> ++
> ++
> ++ int i;
> ++ const char *current_profile = "/run/current-system/profile";
> ++ char *home = getenv ("HOME");
> ++ char *guix_profile = getenv ("GUIX_PROFILE");
GUIX_PROFILE is not meant to be systematically defined, but maybe that’s
good enough.
Could you build, say, xterm against this, check whether this fixes the
ctrl-click issue for instance, and also run it in Valgrind to make sure?
If that works, ok for core-updates or the next ‘staging’ since ‘staging’
is now frozen.
Thanks,
Ludo’.