unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#32811] [PATCH] enlightenment.scm: Fix initial locale and keyboard selection
@ 2018-09-23 13:22 Timo Eisenmann
  2018-09-24 12:28 ` Ludovic Courtès
  2018-09-24 15:39 ` eisenmann
  0 siblings, 2 replies; 8+ messages in thread
From: Timo Eisenmann @ 2018-09-23 13:22 UTC (permalink / raw)
  To: 32811; +Cc: Timo Eisenmann

* gnu/packages/enlightenment.scm (enlightenment): Add glibc to inputs and fix path to xorg.lst
---
 gnu/packages/enlightenment.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm
index 45dc1dbbe..2d3d0795f 100644
--- a/gnu/packages/enlightenment.scm
+++ b/gnu/packages/enlightenment.scm
@@ -275,6 +275,10 @@ Libraries with some extra bells and whistles.")
                  (("/usr/share/X11/xkb/rules/xorg.lst")
                   (string-append xkeyboard
                                  "/share/X11/xkb/rules/base.lst")))
+	       (substitute* "src/modules/wizard/page_011.c"
+                 (("/usr/share/X11/xkb/rules/xorg.lst")
+                  (string-append xkeyboard
+                                 "/share/X11/xkb/rules/base.lst")))
                (substitute* "src/modules/everything/evry_plug_apps.c"
                  (("/usr/bin/") ""))
                (substitute* "configure"
@@ -295,6 +299,7 @@ Libraries with some extra bells and whistles.")
        ("dbus" ,dbus)
        ("efl" ,efl)
        ("freetype" ,freetype)
+       ("glibc" ,glibc)
        ("libxcb" ,libxcb)
        ("libxext" ,libxext)
        ("linux-pam" ,linux-pam)
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#32811] [PATCH] enlightenment.scm: Fix initial locale and keyboard selection
  2018-09-23 13:22 [bug#32811] [PATCH] enlightenment.scm: Fix initial locale and keyboard selection Timo Eisenmann
@ 2018-09-24 12:28 ` Ludovic Courtès
  2018-09-24 15:39 ` eisenmann
  1 sibling, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2018-09-24 12:28 UTC (permalink / raw)
  To: Timo Eisenmann; +Cc: 32811

Hi Timo,

Timo Eisenmann <eisenmann@fn.de> skribis:

> * gnu/packages/enlightenment.scm (enlightenment): Add glibc to inputs and fix path to xorg.lst

Could you explain the effect of adding glibc as an input?  Normally this
is unnecessary because glibc is an implicit input.

Thank you for the patch!

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#32811] [PATCH] enlightenment.scm: Fix initial locale and keyboard selection
  2018-09-23 13:22 [bug#32811] [PATCH] enlightenment.scm: Fix initial locale and keyboard selection Timo Eisenmann
  2018-09-24 12:28 ` Ludovic Courtès
@ 2018-09-24 15:39 ` eisenmann
  2018-09-24 19:31   ` Ludovic Courtès
  1 sibling, 1 reply; 8+ messages in thread
From: eisenmann @ 2018-09-24 15:39 UTC (permalink / raw)
  To: Ludovic Court�s; +Cc: 32811

Hello Ludo,
> Could you explain the effect of adding glibc as an input?  Normally this
> is unnecessary because glibc is an implicit input.

glibc provides locale, which enlightenment uses to list languages.Without explicitly installing it, no languages are shown.
Regards,
Timo Eisenmann

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#32811] [PATCH] enlightenment.scm: Fix initial locale and keyboard selection
  2018-09-24 15:39 ` eisenmann
@ 2018-09-24 19:31   ` Ludovic Courtès
  2018-09-25 10:51     ` Timo Eisenmann
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2018-09-24 19:31 UTC (permalink / raw)
  To: eisenmann; +Cc: 32811

Hello Timo,

eisenmann@fn.de skribis:

>> Could you explain the effect of adding glibc as an input?  Normally this
>> is unnecessary because glibc is an implicit input.
>
> glibc provides locale, which enlightenment uses to list languages.Without explicitly installing it, no languages are shown.

OK, I see.  However, ‘locale’ is already present in the build
environment even without adding glibc explicitly.  Thus I wonder what’s
happening.

Do you happen to know what part of the Enlightenment code refers to the
‘locale’ command?

Thank you,
Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#32811] [PATCH] enlightenment.scm: Fix initial locale and keyboard selection
  2018-09-24 19:31   ` Ludovic Courtès
@ 2018-09-25 10:51     ` Timo Eisenmann
  2018-09-26  7:36       ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Timo Eisenmann @ 2018-09-25 10:51 UTC (permalink / raw)
  To: ludo; +Cc: 32811

Hello Ludo,

 >>> Could you explain the effect of adding glibc as an input?  Normally 
this
 >>> is unnecessary because glibc is an implicit input.
 >>
 >> glibc provides locale, which enlightenment uses to list 
languages.Without explicitly installing it, no languages are shown.
 >
 > OK, I see.  However, ‘locale’ is already present in the build
 > environment even without adding glibc explicitly. Thus I wonder what’s
 > happening.

So implicit inputs provide their binaries only during build-time?
Enlightenment actually uses the output of 'locale -a' during runtime.

 > Do you happen to know what part of the Enlightenment code refers to the
 > ‘locale’ command?

Enlightenment uses
   output = popen("locale -a", "r");
in these three files:
   src/bin/e_intl.c (_e_intl_locale_system_locales_get)
   src/modules/conf_intl/e_int_config_intl.c (_fill_data)
   src/modules/wizard/page_010.c (wizard_page_init)

'page_010' is the language selection screen during first time config.

Regards,
Timo Eisenmann

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#32811] [PATCH] enlightenment.scm: Fix initial locale and keyboard selection
  2018-09-25 10:51     ` Timo Eisenmann
@ 2018-09-26  7:36       ` Ludovic Courtès
  2018-09-26 15:37         ` Timo Eisenmann
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2018-09-26  7:36 UTC (permalink / raw)
  To: Timo Eisenmann; +Cc: 32811

Hi,

Timo Eisenmann <eisenmann@fn.de> skribis:

>> OK, I see.  However, ‘locale’ is already present in the build
>> environment even without adding glibc explicitly. Thus I wonder what’s
>> happening.
>
> So implicit inputs provide their binaries only during build-time?

Yes, inputs in general denote build-time dependencies.  Run-time
dependencies are automatically determined by scanning the build result
in search of /gnu/store references.

>> Do you happen to know what part of the Enlightenment code refers to the
>> ‘locale’ command?
>
> Enlightenment uses
>   output = popen("locale -a", "r");
> in these three files:
>   src/bin/e_intl.c (_e_intl_locale_system_locales_get)
>   src/modules/conf_intl/e_int_config_intl.c (_fill_data)
>   src/modules/wizard/page_010.c (wizard_page_init)
>
> 'page_010' is the language selection screen during first time config.

In that case a proper solution would be to replace ‘locale’ with
‘/gnu/store/…/bin/locale’ in the files above, using the ‘substitute*’
macro.  Would you like to give it a try?  There are many examples of
similar uses of ‘substitute*’ in the package definitions.

HTH!

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#32811] [PATCH] enlightenment.scm: Fix initial locale and keyboard selection
  2018-09-26  7:36       ` Ludovic Courtès
@ 2018-09-26 15:37         ` Timo Eisenmann
  2018-09-26 21:41           ` bug#32811: " Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Timo Eisenmann @ 2018-09-26 15:37 UTC (permalink / raw)
  To: ludo; +Cc: 32811

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]

Hi Ludo,

>>> Do you happen to know what part of the Enlightenment code refers to 
>>> the ‘locale’ command? 
>> Enlightenment uses output = popen("locale -a", "r"); in these three 
>> files: src/bin/e_intl.c (_e_intl_locale_system_locales_get) 
>> src/modules/conf_intl/e_int_config_intl.c (_fill_data) 
>> src/modules/wizard/page_010.c (wizard_page_init) 'page_010' is the 
>> language selection screen during first time config. 
> In that case a proper solution would be to replace ‘locale’ with 
> ‘/gnu/store/…/bin/locale’ in the files above, using the ‘substitute*’ 
> macro. Would you like to give it a try? There are many examples of 
> similar uses of ‘substitute*’ in the package definitions.

I attached a patch that uses 'substitute*'.

Thanks for your help,
Timo Eisenmann


[-- Attachment #2: 0001-enlightenment.scm-Fix-initial-locale-and-keyboard-se.patch --]
[-- Type: text/plain, Size: 1976 bytes --]

From 28035fa1ff242d1e4d45fccf0dfe58742702d6aa Mon Sep 17 00:00:00 2001
From: Timo Eisenmann <eisenmann@fn.de>
Date: Wed, 26 Sep 2018 17:01:33 +0200
Subject: [PATCH] enlightenment.scm: Fix initial locale and keyboard selection

* gnu/packages/enlightenment.scm (enlightenment): Fix paths to 'locale' and 'xorg.lst'
---
 gnu/packages/enlightenment.scm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm
index 45dc1dbbe..0ced70288 100644
--- a/gnu/packages/enlightenment.scm
+++ b/gnu/packages/enlightenment.scm
@@ -268,13 +268,19 @@ Libraries with some extra bells and whistles.")
          (add-before 'configure 'set-system-actions
            (lambda* (#:key inputs #:allow-other-keys)
              (let ((xkeyboard (assoc-ref inputs "xkeyboard-config"))
-                   (utils     (assoc-ref inputs "util-linux")))
+                   (utils     (assoc-ref inputs "util-linux"))
+                   (libc      (assoc-ref inputs "libc")))
                ;; We need to patch the path to 'base.lst' to be able
                ;; to switch the keyboard layout in E.
-               (substitute* "src/modules/xkbswitch/e_mod_parse.c"
+               (substitute* (list "src/modules/xkbswitch/e_mod_parse.c"
+                                  "src/modules/wizard/page_011.c")
                  (("/usr/share/X11/xkb/rules/xorg.lst")
                   (string-append xkeyboard
                                  "/share/X11/xkb/rules/base.lst")))
+               (substitute* (list "src/bin/e_intl.c"
+                                  "src/modules/conf_intl/e_int_config_intl.c"
+                                  "src/modules/wizard/page_010.c")
+                 (("locale -a") (string-append libc "/bin/locale -a")))
                (substitute* "src/modules/everything/evry_plug_apps.c"
                  (("/usr/bin/") ""))
                (substitute* "configure"
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* bug#32811: [PATCH] enlightenment.scm: Fix initial locale and keyboard selection
  2018-09-26 15:37         ` Timo Eisenmann
@ 2018-09-26 21:41           ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2018-09-26 21:41 UTC (permalink / raw)
  To: Timo Eisenmann; +Cc: 32811-done

Hi Timo,

Timo Eisenmann <eisenmann@fn.de> skribis:

> From 28035fa1ff242d1e4d45fccf0dfe58742702d6aa Mon Sep 17 00:00:00 2001
> From: Timo Eisenmann <eisenmann@fn.de>
> Date: Wed, 26 Sep 2018 17:01:33 +0200
> Subject: [PATCH] enlightenment.scm: Fix initial locale and keyboard selection
>
> * gnu/packages/enlightenment.scm (enlightenment): Fix paths to 'locale' and 'xorg.lst'

Awesome, pushed as e15ede6e28cfaf5fe951faf88d7c1e3213a476a4.  I added a
copyright line for you (let me know if I got it wrong!) and tweaked the
commit log to match our conventions.

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-09-26 21:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-23 13:22 [bug#32811] [PATCH] enlightenment.scm: Fix initial locale and keyboard selection Timo Eisenmann
2018-09-24 12:28 ` Ludovic Courtès
2018-09-24 15:39 ` eisenmann
2018-09-24 19:31   ` Ludovic Courtès
2018-09-25 10:51     ` Timo Eisenmann
2018-09-26  7:36       ` Ludovic Courtès
2018-09-26 15:37         ` Timo Eisenmann
2018-09-26 21:41           ` bug#32811: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).