unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: gettext: Enable "xgettext --language=glade"
@ 2013-11-17 12:25 Andreas Enge
  2013-11-17 21:00 ` Ludovic Courtès
  2013-11-17 23:19 ` Ludovic Courtès
  0 siblings, 2 replies; 8+ messages in thread
From: Andreas Enge @ 2013-11-17 12:25 UTC (permalink / raw)
  To: guix-devel

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

As discussed yesterday on irc, the current gettext does not handle glade,
as it is not linked with expat. This causes problems when patching pspp,
for instance. The attached patch solves the problem and compiles on master.
Is it okay to push it to core-updates, to avoid disruption on master?
Since guile currently does not compile in core-updates, I cannot test
the patch there.

Andreas


[-- Attachment #2: 0001-gnu-gettext-Enable-xgettext-language-glade.patch --]
[-- Type: text/plain, Size: 2098 bytes --]

From a1c81413937dbaae283a1fb4ea9d80c13e62dd90 Mon Sep 17 00:00:00 2001
From: Andreas Enge <andreas@enge.fr>
Date: Sun, 17 Nov 2013 13:22:15 +0100
Subject: [PATCH] gnu: gettext: Enable "xgettext --language=glade".

* gnu/packages/gettext.scm (gettext): Add input expat, explicitly link with it.
---
 gnu/packages/gettext.scm | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index 07d2b0d..6436e26 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -17,11 +17,12 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages gettext)
-  #:use-module (guix licenses)
+  #:use-module ((guix licenses) #:select (gpl3))
   #:use-module (gnu packages)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages xml))
 
 (define-public gettext
   (package
@@ -35,8 +36,16 @@
               (base32
                "0j7rp56c61j4k1bz1xdc041hzv7186yyzhbp95fmc0zq7l2c3wrn"))))
     (build-system gnu-build-system)
+    (inputs
+     `(("expat" ,expat)))
     (arguments
      `(#:phases (alist-cons-before
+                 'configure 'link-expat
+                 (lambda _
+                   (substitute* "gettext-tools/configure"
+                     (("LIBEXPAT=\"-ldl\"") "LIBEXPAT=\"-ldl -lexpat\"")
+                     (("LTLIBEXPAT=\"-ldl\"") "LTLIBEXPAT=\"-ldl -lexpat\"")))
+                (alist-cons-before
                  'check 'patch-tests
                  (lambda* (#:key inputs #:allow-other-keys)
                    (let ((bash (which "sh")))
@@ -48,7 +57,7 @@
                                               "posix_spawn")
                        (("/bin/sh")
                         bash))))
-                 %standard-phases)))
+                 %standard-phases))))
     (home-page "http://www.gnu.org/software/gettext/")
     (synopsis "Tools and documentation for translation")
     (description
-- 
1.8.4


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

* Re: [PATCH] gnu: gettext: Enable "xgettext --language=glade"
  2013-11-17 12:25 [PATCH] gnu: gettext: Enable "xgettext --language=glade" Andreas Enge
@ 2013-11-17 21:00 ` Ludovic Courtès
  2013-11-17 23:19 ` Ludovic Courtès
  1 sibling, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2013-11-17 21:00 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> skribis:

> As discussed yesterday on irc, the current gettext does not handle glade,
> as it is not linked with expat. This causes problems when patching pspp,
> for instance. The attached patch solves the problem and compiles on master.
> Is it okay to push it to core-updates, to avoid disruption on master?
> Since guile currently does not compile in core-updates, I cannot test
> the patch there.

The patch looks good to me.

I’m currently working on a patch to fix the libgcc_s issue that breaks
Guile in core-updates.  If you don’t mind, I’ll push both your patch and
mine at once, to avoid overloading Hydra.

Thanks!

Ludo’.

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

* Re: [PATCH] gnu: gettext: Enable "xgettext --language=glade"
  2013-11-17 12:25 [PATCH] gnu: gettext: Enable "xgettext --language=glade" Andreas Enge
  2013-11-17 21:00 ` Ludovic Courtès
@ 2013-11-17 23:19 ` Ludovic Courtès
  2013-11-18  8:17   ` Andreas Enge
  1 sibling, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2013-11-17 23:19 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> skribis:

>       `(#:phases (alist-cons-before
> +                 'configure 'link-expat
> +                 (lambda _
> +                   (substitute* "gettext-tools/configure"
> +                     (("LIBEXPAT=\"-ldl\"") "LIBEXPAT=\"-ldl -lexpat\"")
> +                     (("LTLIBEXPAT=\"-ldl\"") "LTLIBEXPAT=\"-ldl -lexpat\"")))

Actually, it seems to be solvable without adding the dependency:

--8<---------------cut here---------------start------------->8---
$ xgettext -L glade /dev/null 
xgettext: Language "glade" is not supported. xgettext relies on expat.
          This version was built without expat.

$ LD_LIBRARY_PATH=$(guix build expat)/lib xgettext -L glade /dev/null 
xgettext: /dev/null:1:1: no element found
--8<---------------cut here---------------end--------------->8---

(The error message is misleading because it’s not a build-time issue.)

Would it work for you to just use that LD_LIBRARY_PATH trick where it’s
needed?

That way we avoid making gettext “fatter”.  I suppose we’ll seldom need
to do that trick anyway.

WDYT?

Ludo’.

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

* Re: [PATCH] gnu: gettext: Enable "xgettext --language=glade"
  2013-11-17 23:19 ` Ludovic Courtès
@ 2013-11-18  8:17   ` Andreas Enge
  2013-11-18  9:17     ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Enge @ 2013-11-18  8:17 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Mon, Nov 18, 2013 at 12:19:24AM +0100, Ludovic Courtès wrote:
> Actually, it seems to be solvable without adding the dependency:
> 
> --8<---------------cut here---------------start------------->8---
> $ xgettext -L glade /dev/null 
> xgettext: Language "glade" is not supported. xgettext relies on expat.
>           This version was built without expat.
> 
> $ LD_LIBRARY_PATH=$(guix build expat)/lib xgettext -L glade /dev/null 
> xgettext: /dev/null:1:1: no element found
> --8<---------------cut here---------------end--------------->8---

I know, that was one of the things we tested early on; but...

> Would it work for you to just use that LD_LIBRARY_PATH trick where it’s
> needed?
> That way we avoid making gettext “fatter”.  I suppose we’ll seldom need
> to do that trick anyway.

... might there not be users who want a fully functional xgettext? Now that
we found a simple solution, I am rather in favour of implementing it.
Not to mention that this solves the issue once and for all, and we do not
need to remember the LD_LIBRARY_PATH trick later on...

Andreas

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

* Re: [PATCH] gnu: gettext: Enable "xgettext --language=glade"
  2013-11-18  8:17   ` Andreas Enge
@ 2013-11-18  9:17     ` Ludovic Courtès
  2013-11-18  9:58       ` Andreas Enge
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2013-11-18  9:17 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> skribis:

> On Mon, Nov 18, 2013 at 12:19:24AM +0100, Ludovic Courtès wrote:
>> Actually, it seems to be solvable without adding the dependency:
>> 
>> --8<---------------cut here---------------start------------->8---
>> $ xgettext -L glade /dev/null 
>> xgettext: Language "glade" is not supported. xgettext relies on expat.
>>           This version was built without expat.
>> 
>> $ LD_LIBRARY_PATH=$(guix build expat)/lib xgettext -L glade /dev/null 
>> xgettext: /dev/null:1:1: no element found
>> --8<---------------cut here---------------end--------------->8---
>
> I know, that was one of the things we tested early on; but...

OK, sorry for stating the obvious then (apologies for not following the
discussion closely enough!).

>> Would it work for you to just use that LD_LIBRARY_PATH trick where it’s
>> needed?
>> That way we avoid making gettext “fatter”.  I suppose we’ll seldom need
>> to do that trick anyway.
>
> ... might there not be users who want a fully functional xgettext? Now that
> we found a simple solution, I am rather in favour of implementing it.
> Not to mention that this solves the issue once and for all, and we do not
> need to remember the LD_LIBRARY_PATH trick later on...

Yeah, makes sense to me; so feel free to commit now.

Are there other optional dependencies that are dlopen’d, or is it the
only one?  It’s OK if it’s just expat, but we wouldn’t want to add
bigger things.

Thanks,
Ludo’.

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

* Re: [PATCH] gnu: gettext: Enable "xgettext --language=glade"
  2013-11-18  9:17     ` Ludovic Courtès
@ 2013-11-18  9:58       ` Andreas Enge
  2013-11-18 10:05         ` Andreas Enge
  2013-11-18 12:58         ` Ludovic Courtès
  0 siblings, 2 replies; 8+ messages in thread
From: Andreas Enge @ 2013-11-18  9:58 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Mon, Nov 18, 2013 at 10:17:36AM +0100, Ludovic Courtès wrote:
> Yeah, makes sense to me; so feel free to commit now.

Would you still like to commit in conjunction with your gcc patch? There is
no particular hurry.

> Are there other optional dependencies that are dlopen’d, or is it the
> only one?  It’s OK if it’s just expat, but we wouldn’t want to add
> bigger things.

Not that I know of, this just came up as a problem... But anyway, things
should not become bigger, right? If I understood correctly, the only effect
of adding "-lexpat" will be to encode an rpath (and to need expat as an
input to gettext, of course).

Andreas

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

* Re: [PATCH] gnu: gettext: Enable "xgettext --language=glade"
  2013-11-18  9:58       ` Andreas Enge
@ 2013-11-18 10:05         ` Andreas Enge
  2013-11-18 12:58         ` Ludovic Courtès
  1 sibling, 0 replies; 8+ messages in thread
From: Andreas Enge @ 2013-11-18 10:05 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Mon, Nov 18, 2013 at 10:58:20AM +0100, Andreas Enge wrote:
> Would you still like to commit in conjunction with your gcc patch? There is
> no particular hurry.

Actually, the patch collides with your gettext update and requires manual
intervention. I will push it then, because anyway with guile broken, nothing
will be compiled on hydra, so we need not worry about its load.

Andreas

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

* Re: [PATCH] gnu: gettext: Enable "xgettext --language=glade"
  2013-11-18  9:58       ` Andreas Enge
  2013-11-18 10:05         ` Andreas Enge
@ 2013-11-18 12:58         ` Ludovic Courtès
  1 sibling, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2013-11-18 12:58 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> skribis:

> On Mon, Nov 18, 2013 at 10:17:36AM +0100, Ludovic Courtès wrote:
>> Yeah, makes sense to me; so feel free to commit now.
>
> Would you still like to commit in conjunction with your gcc patch? There is
> no particular hurry.

No, you can do it separately now (my GCC patch from yesterday didn’t
quite make it.)

>> Are there other optional dependencies that are dlopen’d, or is it the
>> only one?  It’s OK if it’s just expat, but we wouldn’t want to add
>> bigger things.
>
> Not that I know of, this just came up as a problem... But anyway, things
> should not become bigger, right? If I understood correctly, the only effect
> of adding "-lexpat" will be to encode an rpath (and to need expat as an
> input to gettext, of course).

Yes.  It also means that from now on, gettext will depend not only on
glibc but also on Expat, and that upgrading Expat will entail a full
rebuild (so it can only be done in core-updates.)

It’s probably OK because Expat has no extra dependencies, is quite
small, and fairly stable.  Otherwise that would be less convenient.

Thanks,
Ludo’.

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

end of thread, other threads:[~2013-11-18 12:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-17 12:25 [PATCH] gnu: gettext: Enable "xgettext --language=glade" Andreas Enge
2013-11-17 21:00 ` Ludovic Courtès
2013-11-17 23:19 ` Ludovic Courtès
2013-11-18  8:17   ` Andreas Enge
2013-11-18  9:17     ` Ludovic Courtès
2013-11-18  9:58       ` Andreas Enge
2013-11-18 10:05         ` Andreas Enge
2013-11-18 12:58         ` 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).