summary refs log tree commit diff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2017-12-12 02:55:30 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2017-12-12 22:34:29 +0100
commita7ebe9dc39450efef2543ff7315c69811f9fa6f4 (patch)
tree31caa0080e3f07f48f3d8a13cb59929da823c13c
parent64bae7237c65b32d97e16ff6802124c26867754a (diff)
downloadguix-a7ebe9dc39450efef2543ff7315c69811f9fa6f4.tar.gz
gnu: xfig: Update to 3.2.6a.
* gnu/packages/xfig.scm (xfig): Update to 3.2.6a.
[native-inputs]: Remove groff, imake, makedepend.  Add desktop-file-utils.
[inputs]: Remove libxmu and zlib.
[arguments]: Remove custom phases.  Add a ‘strip-bogus-exec-prefix’ phase.
Run the rudimentary test suite.
-rw-r--r--gnu/packages/xfig.scm101
1 files changed, 20 insertions, 81 deletions
diff --git a/gnu/packages/xfig.scm b/gnu/packages/xfig.scm
index 287615f1ce..3bb839f6e4 100644
--- a/gnu/packages/xfig.scm
+++ b/gnu/packages/xfig.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
+;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,105 +24,43 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages image)
-  #:use-module (gnu packages groff)
   #:use-module (gnu packages compression))
 
 (define-public xfig
   (package
     (name "xfig")
-    (version "3.2.5c")
+    (version "3.2.6a")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "mirror://sourceforge/mcj/mcj-source/xfig."
-                           version ".full.tar.gz"))
+       (uri (string-append "mirror://sourceforge/mcj/"
+                           name "-" version ".tar.xz"))
        (sha256
         (base32
-         "1yd1jclvw5w3ja4jjzr1ysbn8iklh88wq84jn9d1gavrbfbqyqpa"))))
+         "0z1636w27hvgjpq98z40k8h535b4x2xr2whkvr7bibaa89fynym8"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("imake" ,imake)
-       ("makedepend" ,makedepend)
-       ("groff" ,groff)))               ;for creating some doc
+     ;; For tests.
+     `(("desktop-file-utils" ,desktop-file-utils)))
     (inputs
      `(("libxaw3d" ,libxaw3d)
-       ;; Requires libjpeg>=9a, otherwise jmorecfg.h define an enum FALSE that
-       ;; conflicts with the FALSE macro from X11/Intrinsic.h
-       ("libjpeg"  ,libjpeg)
-       ("libpng"   ,libpng)
-       ("libxpm"   ,libxpm)
-       ("libx11"   ,libx11)
-       ("libxmu"   ,libxmu)
-       ("libxt"    ,libxt)
-       ("zlib"     ,zlib)))
+       ("libjpeg" ,libjpeg)
+       ("libpng" ,libpng)
+       ("libxpm" ,libxpm)
+       ("libx11" ,libx11)
+       ("libxt" ,libxt)))
     (arguments
-     `(#:tests? #f
-       #:phases
+     `(#:phases
        (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 XAPPLOADDIR = /home/user/xfig *")
-                         (string-append "XAPPLOADDIR = " out ,%app-defaults-dir))
-                        (("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.
-                      (invoke "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))))
-                    #t))
-         (add-after
-          'install 'install/libs
-          (lambda _
-            (zero? (system* "make" "install.libs"))))
-         (add-after
-          'install 'install/doc
-          (lambda _
-            (begin
-              ;; The Doc/xfig_man.html file is expected by the install.html
-              ;; target, but is not present in the tarball, so generate it.
-              (use-modules (ice-9 popen))
-              (let* ((in  (open-pipe* OPEN_READ
-                                      "groff" "-mandoc" "-Thtml"
-                                      "Doc/xfig.man"))
-                     (out (open-output-file "Doc/xfig_man.html")))
-                (begin
-                  (dump-port in out)
-                  (close-pipe in)
-                  (close-port out)))
-              (zero? (system* "make" "install.doc"))))))))
+         (add-before 'install 'strip-bogus-exec-prefix
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "xfig.desktop"
+               ;; The patch-dot-desktop-files phase requires a relative name.
+               (("Exec=/usr/bin/xfig") "Exec=xfig"))
+             #t)))))
     (home-page "http://mcj.sourceforge.net/")
     (synopsis "Interactive drawing tool")
     (description