all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 1/4] gnu: xfontsel: Simplify definition.
@ 2017-01-11 20:56 John Darrington
  2017-01-11 20:56 ` [PATCH 2/4] gnu: editres: Use %app-defaults-dir John Darrington
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: John Darrington @ 2017-01-11 20:56 UTC (permalink / raw)
  To: guix-devel; +Cc: John Darrington

* gnu/packages/xorg.scm (%app-defaults-dir): New variable.
(xfontsel): Remove wrapper.
---
 gnu/packages/xorg.scm | 23 +++++------------------
 1 file changed, 5 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index e6ee0c0..556b9f4 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -10,7 +10,7 @@
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
-;;; Copyright © 2016 John Darrington <jmd@gnu.org>
+;;; Copyright © 2016, 2017 John Darrington <jmd@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -335,6 +335,7 @@ provided.")
     (license (license:x11-style "file://dri3proto.h"
                                 "See 'dri3proto.h' in the distribution."))))
 
+(define %app-defaults-dir "/lib/X11/app-defaults")
 
 (define-public editres
   (package
@@ -3982,23 +3983,9 @@ protocol.")
                 "1grir464hy52a71r3mpm9mzvkf7nwr3vk0b1vc27pd3gp588a38p"))))
     (build-system gnu-build-system)
     (arguments
-     ;; By default, it tries to install XFontSel file in
-     ;; "/gnu/store/<libxt>/share/X11/app-defaults": it defines this
-     ;; directory from 'libxt' (using 'pkg-config').  To put this file
-     ;; inside output dir and to use it properly, we need to configure
-     ;; --with-appdefaultdir and to wrap 'xfontsel' binary.
-     (let ((app-defaults-dir "/share/X11/app-defaults"))
-       `(#:configure-flags
-         (list (string-append "--with-appdefaultdir="
-                              %output ,app-defaults-dir))
-         #:phases
-         (modify-phases %standard-phases
-           (add-after 'install 'wrap-xfontsel
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out")))
-                 (wrap-program (string-append out "/bin/xfontsel")
-                   `("XAPPLRESDIR" =
-                     (,(string-append out ,app-defaults-dir)))))))))))
+     `(#:configure-flags
+       (list (string-append "--with-appdefaultdir="
+                            %output ,%app-defaults-dir))))
     (inputs
      `(("libx11" ,libx11)
        ("libxaw" ,libxaw)
-- 
2.1.4

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

* [PATCH 2/4] gnu: editres: Use %app-defaults-dir.
  2017-01-11 20:56 [PATCH 1/4] gnu: xfontsel: Simplify definition John Darrington
@ 2017-01-11 20:56 ` John Darrington
  2017-01-12 15:30   ` Ludovic Courtès
  2017-01-11 20:56 ` [PATCH 3/4] gnu: xfd: Remove wrapper John Darrington
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: John Darrington @ 2017-01-11 20:56 UTC (permalink / raw)
  To: guix-devel; +Cc: John Darrington

* gnu/packages/xorg.scm (editres): Replace string literal with
%app-defaults-dir.
---
 gnu/packages/xorg.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 556b9f4..16eb344 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -355,7 +355,7 @@ provided.")
     (arguments
      `(#:configure-flags
        (list (string-append "--with-appdefaultdir="
-                            %output "/lib/X11/app-defaults"))))
+                            %output ,%app-defaults-dir))))
     (inputs
      `(("libxaw" ,libxaw)
        ("libxmu" ,libxmu)
-- 
2.1.4

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

* [PATCH 3/4] gnu: xfd: Remove wrapper.
  2017-01-11 20:56 [PATCH 1/4] gnu: xfontsel: Simplify definition John Darrington
  2017-01-11 20:56 ` [PATCH 2/4] gnu: editres: Use %app-defaults-dir John Darrington
@ 2017-01-11 20:56 ` John Darrington
  2017-01-12 15:30   ` Ludovic Courtès
  2017-01-11 20:56 ` [PATCH 4/4] gnu: xfig: Use modify-phases John Darrington
  2017-01-12 15:30 ` [PATCH 1/4] gnu: xfontsel: Simplify definition Ludovic Courtès
  3 siblings, 1 reply; 8+ messages in thread
From: John Darrington @ 2017-01-11 20:56 UTC (permalink / raw)
  To: guix-devel; +Cc: John Darrington

* gnu/packages/xorg.scm (xfd): Remove wrapper.
---
 gnu/packages/xorg.scm | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 16eb344..45ff4c9 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -4015,19 +4015,9 @@ Font Description (XLFD) full name for a font.")
                 "0n97iqqap9wyxjan2n520vh4rrf5bc0apsw2k9py94dqzci258y1"))))
     (build-system gnu-build-system)
     (arguments
-     ;; The same 'app-defaults' problem as with 'xfontsel' package.
-     (let ((app-defaults-dir "/share/X11/app-defaults"))
        `(#:configure-flags
          (list (string-append "--with-appdefaultdir="
-                              %output ,app-defaults-dir))
-         #:phases
-         (modify-phases %standard-phases
-           (add-after 'install 'wrap-xfd
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out")))
-                 (wrap-program (string-append out "/bin/xfd")
-                   `("XAPPLRESDIR" =
-                     (,(string-append out ,app-defaults-dir)))))))))))
+                              %output ,%app-defaults-dir))))
     (inputs
      `(("fontconfig" ,fontconfig)
        ("libx11" ,libx11)
-- 
2.1.4

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

* [PATCH 4/4] gnu: xfig: Use modify-phases.
  2017-01-11 20:56 [PATCH 1/4] gnu: xfontsel: Simplify definition John Darrington
  2017-01-11 20:56 ` [PATCH 2/4] gnu: editres: Use %app-defaults-dir John Darrington
  2017-01-11 20:56 ` [PATCH 3/4] gnu: xfd: Remove wrapper John Darrington
@ 2017-01-11 20:56 ` John Darrington
  2017-01-12 15:31   ` Ludovic Courtès
  2017-01-12 15:30 ` [PATCH 1/4] gnu: xfontsel: Simplify definition Ludovic Courtès
  3 siblings, 1 reply; 8+ messages in thread
From: John Darrington @ 2017-01-11 20:56 UTC (permalink / raw)
  To: guix-devel; +Cc: John Darrington

* gnu/packages/xfig.scm (xfig): Use modify-phases.
---
 gnu/packages/xfig.scm | 159 +++++++++++++++++++++++++-------------------------
 1 file changed, 79 insertions(+), 80 deletions(-)

diff --git a/gnu/packages/xfig.scm b/gnu/packages/xfig.scm
index 6436e52..27d9cf9 100644
--- a/gnu/packages/xfig.scm
+++ b/gnu/packages/xfig.scm
@@ -34,12 +34,12 @@
     (version "3.2.5c")
     (source
      (origin
-      (method url-fetch)
-      (uri (string-append "mirror://sourceforge/mcj/mcj-source/xfig."
-                          version ".full.tar.gz"))
-      (sha256
-       (base32
-        "1yd1jclvw5w3ja4jjzr1ysbn8iklh88wq84jn9d1gavrbfbqyqpa"))))
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/mcj/mcj-source/xfig."
+                           version ".full.tar.gz"))
+       (sha256
+        (base32
+         "1yd1jclvw5w3ja4jjzr1ysbn8iklh88wq84jn9d1gavrbfbqyqpa"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("imake" ,imake)
@@ -59,51 +59,51 @@
     (arguments
      `(#:tests? #f
        #:phases
-       (alist-replace
-        'configure
-        (lambda* (#:key inputs outputs #:allow-other-keys)
-          (let ((imake (assoc-ref inputs "imake"))
-                (out   (assoc-ref outputs "out")))
-           (substitute* "Imakefile"
-             (("XCOMM (BINDIR = )[[:graph:]]*" _ front)
-              (string-append front out "/bin"))
-             (("(PNGLIBDIR = )[[:graph:]]*" _ front)
-              (string-append front (assoc-ref inputs "libpng") "/lib"))
-             (("(PNGINC = -I)[[:graph:]]*" _ front)
-              (string-append front (assoc-ref inputs "libpng") "/include"))
-             (("(JPEGLIBDIR = )[[:graph:]]*" _ front)
-              (string-append front (assoc-ref inputs "libjpeg") "/lib"))
-             (("(JPEGINC = -I)[[:graph:]]*" _ front)
-              (string-append front (assoc-ref inputs "libjpeg") "/include"))
-             (("(ZLIBDIR = )[[:graph:]]*" _ front)
-              (string-append front (assoc-ref inputs "zlib") "/lib"))
-             (("(XPMLIBDIR = )[[:graph:]]*" _ front)
-              (string-append front (assoc-ref inputs "libxpm") "/lib"))
-             (("(XPMINC = -I)[[:graph:]]*" _ front)
-              (string-append front (assoc-ref inputs "libxpm") "/include"))
-             (("(XFIGLIBDIR = )[[:graph:]]*" _ front)
-              (string-append front out "/lib"))
-             (("(XFIGDOCDIR = )[[:graph:]]*" _ front)
-              (string-append front out "/share/doc"))
-             (("XCOMM USEINLINE") "USEINLINE"))
-           ;; The -a argument is required in order to pick up the correct paths
-           ;; to several X header files.
-           (zero? (system* "xmkmf" "-a"))
-           ;; Reset some variables that are inherited from imake templates
-           (substitute* "Makefile"
-             ;; These imake variables somehow remain undefined
-             (("DefaultGcc2[[:graph:]]*Opt") "-O2")
-             ;; Reset a few variable defaults that are set in imake templates
-             ((imake) out)
-             (("(MANPATH = )[[:graph:]]*" _ front)
-              (string-append front out "/share/man"))
-             (("(CONFDIR = )([[:graph:]]*)" _ front default)
-              (string-append front out default)))))
-        (alist-cons-after
-         'install 'install/libs
-         (lambda _
-           (zero? (system* "make" "install.libs")))
-         (alist-cons-after
+       (modify-phases %standard-phases
+         (replace 'configure
+                  (lambda* (#:key inputs outputs #:allow-other-keys)
+                    (let ((imake (assoc-ref inputs "imake"))
+                          (out   (assoc-ref outputs "out")))
+                      (substitute* "Imakefile"
+                        (("XCOMM (BINDIR = )[[:graph:]]*" _ front)
+                         (string-append front out "/bin"))
+                        (("(PNGLIBDIR = )[[:graph:]]*" _ front)
+                         (string-append front (assoc-ref inputs "libpng") "/lib"))
+                        (("(PNGINC = -I)[[:graph:]]*" _ front)
+                         (string-append front (assoc-ref inputs "libpng") "/include"))
+                        (("(JPEGLIBDIR = )[[:graph:]]*" _ front)
+                         (string-append front (assoc-ref inputs "libjpeg") "/lib"))
+                        (("(JPEGINC = -I)[[:graph:]]*" _ front)
+                         (string-append front (assoc-ref inputs "libjpeg") "/include"))
+                        (("(ZLIBDIR = )[[:graph:]]*" _ front)
+                         (string-append front (assoc-ref inputs "zlib") "/lib"))
+                        (("(XPMLIBDIR = )[[:graph:]]*" _ front)
+                         (string-append front (assoc-ref inputs "libxpm") "/lib"))
+                        (("(XPMINC = -I)[[:graph:]]*" _ front)
+                         (string-append front (assoc-ref inputs "libxpm") "/include"))
+                        (("(XFIGLIBDIR = )[[:graph:]]*" _ front)
+                         (string-append front out "/lib"))
+                        (("(XFIGDOCDIR = )[[:graph:]]*" _ front)
+                         (string-append front out "/share/doc"))
+                        (("XCOMM USEINLINE") "USEINLINE"))
+                      ;; The -a argument is required in order to pick up the correct paths
+                      ;; to several X header files.
+                      (zero? (system* "xmkmf" "-a"))
+                      ;; Reset some variables that are inherited from imake templates
+                      (substitute* "Makefile"
+                        ;; These imake variables somehow remain undefined
+                        (("DefaultGcc2[[:graph:]]*Opt") "-O2")
+                        ;; Reset a few variable defaults that are set in imake templates
+                        ((imake) out)
+                        (("(MANPATH = )[[:graph:]]*" _ front)
+                         (string-append front out "/share/man"))
+                        (("(CONFDIR = )([[:graph:]]*)" _ front default)
+                         (string-append front out default))))))
+         (add-after
+          'install 'install/libs
+          (lambda _
+            (zero? (system* "make" "install.libs"))))
+         (add-after
           'install 'install/doc
           (lambda _
             (begin
@@ -118,15 +118,14 @@
                   (dump-port in out)
                   (close-pipe in)
                   (close-port out)))
-              (zero? (system* "make" "install.doc"))))
-          (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))))))
+              (zero? (system* "make" "install.doc")))))
+         (add-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"))))))))))
     (home-page "http://xfig.org/")
     (synopsis "Interactive drawing tool")
     (description
@@ -144,12 +143,12 @@ selected in various ways.  For text, 35 fonts are available.")
     (version "3.2.5e")
     (source
      (origin
-      (method url-fetch)
-      (uri (string-append "mirror://sourceforge/mcj/mcj-source/transfig."
-                          version ".tar.gz"))
-      (sha256
-       (base32
-        "0i3p7qmg2w8qrad3pn42b0miwarql7yy0gpd49b1bpal6bqsiicf"))))
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/mcj/mcj-source/transfig."
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "0i3p7qmg2w8qrad3pn42b0miwarql7yy0gpd49b1bpal6bqsiicf"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("imake" ,imake)
@@ -183,20 +182,20 @@ selected in various ways.  For text, 35 fonts are available.")
               (("(XPMINC = -I)[[:graph:]]*" _ front)
                (string-append front (assoc-ref inputs "libxpm") "/include/X11"))
               (("/usr/local/lib/fig2dev") (string-append out "/lib")))
-           ;; The -a argument is required in order to pick up the correct paths
-           ;; to several X header files.
-           (zero? (system* "xmkmf" "-a"))
-           (substitute* '("Makefile"
-                          "fig2dev/Makefile"
-                          "transfig/Makefile")
-             ;; These imake variables somehow remain undefined
-             (("DefaultGcc2[[:graph:]]*Opt") "-O2")
-             ;; Reset a few variable defaults that are set in imake templates
-             ((imake) out)
-             (("(MANPATH = )[[:graph:]]*" _ front)
-              (string-append front out "/share/man"))
-             (("(CONFDIR = )([[:graph:]]*)" _ front default)
-              (string-append front out default)))))
+            ;; The -a argument is required in order to pick up the correct paths
+            ;; to several X header files.
+            (zero? (system* "xmkmf" "-a"))
+            (substitute* '("Makefile"
+                           "fig2dev/Makefile"
+                           "transfig/Makefile")
+              ;; These imake variables somehow remain undefined
+              (("DefaultGcc2[[:graph:]]*Opt") "-O2")
+              ;; Reset a few variable defaults that are set in imake templates
+              ((imake) out)
+              (("(MANPATH = )[[:graph:]]*" _ front)
+               (string-append front out "/share/man"))
+              (("(CONFDIR = )([[:graph:]]*)" _ front default)
+               (string-append front out default)))))
         (alist-cons-after
          'install 'install/doc
          (lambda _
-- 
2.1.4

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

* Re: [PATCH 1/4] gnu: xfontsel: Simplify definition.
  2017-01-11 20:56 [PATCH 1/4] gnu: xfontsel: Simplify definition John Darrington
                   ` (2 preceding siblings ...)
  2017-01-11 20:56 ` [PATCH 4/4] gnu: xfig: Use modify-phases John Darrington
@ 2017-01-12 15:30 ` Ludovic Courtès
  3 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2017-01-12 15:30 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel

John Darrington <jmd@gnu.org> skribis:

> * gnu/packages/xorg.scm (%app-defaults-dir): New variable.
> (xfontsel): Remove wrapper.

LGTM!

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

* Re: [PATCH 2/4] gnu: editres: Use %app-defaults-dir.
  2017-01-11 20:56 ` [PATCH 2/4] gnu: editres: Use %app-defaults-dir John Darrington
@ 2017-01-12 15:30   ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2017-01-12 15:30 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel

John Darrington <jmd@gnu.org> skribis:

> * gnu/packages/xorg.scm (editres): Replace string literal with
> %app-defaults-dir.

OK!

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

* Re: [PATCH 3/4] gnu: xfd: Remove wrapper.
  2017-01-11 20:56 ` [PATCH 3/4] gnu: xfd: Remove wrapper John Darrington
@ 2017-01-12 15:30   ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2017-01-12 15:30 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel

John Darrington <jmd@gnu.org> skribis:

> * gnu/packages/xorg.scm (xfd): Remove wrapper.

LGTM!

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

* Re: [PATCH 4/4] gnu: xfig: Use modify-phases.
  2017-01-11 20:56 ` [PATCH 4/4] gnu: xfig: Use modify-phases John Darrington
@ 2017-01-12 15:31   ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2017-01-12 15:31 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel

John Darrington <jmd@gnu.org> skribis:

> * gnu/packages/xfig.scm (xfig): Use modify-phases.

LGTM.

Thank you!

Ludo'.

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

end of thread, other threads:[~2017-01-12 15:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-11 20:56 [PATCH 1/4] gnu: xfontsel: Simplify definition John Darrington
2017-01-11 20:56 ` [PATCH 2/4] gnu: editres: Use %app-defaults-dir John Darrington
2017-01-12 15:30   ` Ludovic Courtès
2017-01-11 20:56 ` [PATCH 3/4] gnu: xfd: Remove wrapper John Darrington
2017-01-12 15:30   ` Ludovic Courtès
2017-01-11 20:56 ` [PATCH 4/4] gnu: xfig: Use modify-phases John Darrington
2017-01-12 15:31   ` Ludovic Courtès
2017-01-12 15:30 ` [PATCH 1/4] gnu: xfontsel: Simplify definition Ludovic Courtès

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.