unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: xfig: Add 'wrap-xfig phase.
@ 2014-11-24 16:07 Federico Beffa
  2014-11-24 17:04 ` Eric Bavier
  0 siblings, 1 reply; 5+ messages in thread
From: Federico Beffa @ 2014-11-24 16:07 UTC (permalink / raw)
  To: Guix-devel

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

I would like to propose the attached patch for xfig.  It makes xfig
find its resource file so that it works properly.

On a side note: I've noticed that wrap-program generates two wrappers.
In fact I find the following files in .../bin/: xfig, .xfig-real and
.xfig-wrap-01.  What is the purpose of the latter?
(This happens with all packages using wrap-program.)

Regards,
Fede

[-- Attachment #2: 0001-gnu-xfig-Add-wrap-xfig-phase.patch --]
[-- Type: text/x-patch, Size: 1495 bytes --]

From b420b54a2dc5b2f39bb439b900b178e24b6f4d80 Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Mon, 24 Nov 2014 14:22:16 +0100
Subject: [PATCH] gnu: xfig: Add 'wrap-xfig phase.

* gnu/packages/xfig.scm (xfig): Set XAPPLRESDIR environment variable to help
  xfig find the app-defaults resource files.
---
 gnu/packages/xfig.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/xfig.scm b/gnu/packages/xfig.scm
index b154074..b637db7 100644
--- a/gnu/packages/xfig.scm
+++ b/gnu/packages/xfig.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -118,7 +119,14 @@
                   (close-pipe in)
                   (close-port out)))
               (zero? (system* "make" "install.doc"))))
-          %standard-phases)))))
+          (alist-cons-after
+           'install 'wrap-xfig
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/xfig")
+                           `("XAPPLRESDIR" suffix
+                             (,(string-append out "/etc/X11/app-defaults"))))))
+           %standard-phases))))))
     (home-page "http://xfig.org/")
     (synopsis "Interactive drawing tool")
     (description
-- 
1.8.4


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

* Re: [PATCH] gnu: xfig: Add 'wrap-xfig phase.
  2014-11-24 16:07 [PATCH] gnu: xfig: Add 'wrap-xfig phase Federico Beffa
@ 2014-11-24 17:04 ` Eric Bavier
  2014-11-24 17:24   ` Federico Beffa
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Bavier @ 2014-11-24 17:04 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel


Federico Beffa writes:

> I would like to propose the attached patch for xfig.  It makes xfig
> find its resource file so that it works properly.

Thanks for looking into it.

+               (wrap-program (string-append out "/bin/xfig")
+                           `("XAPPLRESDIR" suffix
+                             (,(string-append out "/etc/X11/app-defaults"))))))

Could you align the arguments to wrap-program here?

> On a side note: I've noticed that wrap-program generates two wrappers.
> In fact I find the following files in .../bin/: xfig, .xfig-real and
> .xfig-wrap-01.  What is the purpose of the latter?
> (This happens with all packages using wrap-program.)

See commit de61113, and the discussion at
https://lists.gnu.org/archive/html/guix-devel/2014-09/msg00190.html

-- 
Eric Bavier

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

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

* Re: [PATCH] gnu: xfig: Add 'wrap-xfig phase.
  2014-11-24 17:04 ` Eric Bavier
@ 2014-11-24 17:24   ` Federico Beffa
  2014-11-24 17:28     ` Eric Bavier
  0 siblings, 1 reply; 5+ messages in thread
From: Federico Beffa @ 2014-11-24 17:24 UTC (permalink / raw)
  To: Eric Bavier; +Cc: Guix-devel

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

On Mon, Nov 24, 2014 at 6:04 PM, Eric Bavier <ericbavier@gmail.com> wrote:
> Could you align the arguments to wrap-program here?

Does this correspond to the expected alignment? (This is formatted by
emacs. Indeed in the previous version I forgot to press TAB on a
line.)

> See commit de61113, and the discussion at
> https://lists.gnu.org/archive/html/guix-devel/2014-09/msg00190.html
>

OK

Thanks,
Fede

[-- Attachment #2: 0001-gnu-xfig-Add-wrap-xfig-phase.patch --]
[-- Type: text/x-patch, Size: 1499 bytes --]

From 608884dfbf6cf2995531dcfb16986ab972803db3 Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Mon, 24 Nov 2014 14:22:16 +0100
Subject: [PATCH] gnu: xfig: Add 'wrap-xfig phase.

* gnu/packages/xfig.scm (xfig): Set XAPPLRESDIR environment variable to help
  xfig find the app-defaults resource files.
---
 gnu/packages/xfig.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/xfig.scm b/gnu/packages/xfig.scm
index b154074..6436e52 100644
--- a/gnu/packages/xfig.scm
+++ b/gnu/packages/xfig.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -118,7 +119,14 @@
                   (close-pipe in)
                   (close-port out)))
               (zero? (system* "make" "install.doc"))))
-          %standard-phases)))))
+          (alist-cons-after
+           'install 'wrap-xfig
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/xfig")
+                             `("XAPPLRESDIR" suffix
+                               (,(string-append out "/etc/X11/app-defaults"))))))
+           %standard-phases))))))
     (home-page "http://xfig.org/")
     (synopsis "Interactive drawing tool")
     (description
-- 
1.8.4


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

* Re: [PATCH] gnu: xfig: Add 'wrap-xfig phase.
  2014-11-24 17:24   ` Federico Beffa
@ 2014-11-24 17:28     ` Eric Bavier
  2014-11-24 17:30       ` Federico Beffa
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Bavier @ 2014-11-24 17:28 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel


Federico Beffa writes:

> On Mon, Nov 24, 2014 at 6:04 PM, Eric Bavier <ericbavier@gmail.com> wrote:
>> Could you align the arguments to wrap-program here?
>
> Does this correspond to the expected alignment? (This is formatted by
> emacs. Indeed in the previous version I forgot to press TAB on a
> line.)

LGTM!  Ok to push.

-- 
Eric Bavier

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

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

* Re: [PATCH] gnu: xfig: Add 'wrap-xfig phase.
  2014-11-24 17:28     ` Eric Bavier
@ 2014-11-24 17:30       ` Federico Beffa
  0 siblings, 0 replies; 5+ messages in thread
From: Federico Beffa @ 2014-11-24 17:30 UTC (permalink / raw)
  To: Eric Bavier; +Cc: Guix-devel

On Mon, Nov 24, 2014 at 6:28 PM, Eric Bavier <ericbavier@gmail.com> wrote:
> LGTM!  Ok to push.

Pushed, thanks.

Fede

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

end of thread, other threads:[~2014-11-24 17:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-24 16:07 [PATCH] gnu: xfig: Add 'wrap-xfig phase Federico Beffa
2014-11-24 17:04 ` Eric Bavier
2014-11-24 17:24   ` Federico Beffa
2014-11-24 17:28     ` Eric Bavier
2014-11-24 17:30       ` Federico Beffa

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).