guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

11/12: gnu: Add libuemf.


From: guix-commits
Subject: 11/12: gnu: Add libuemf.
Date: Sun, 31 May 2020 22:18:56 -0400 (EDT)

apteryx pushed a commit to branch master
in repository guix.

commit 3f1f98d9d8c4e7f5dfca921fe1957e4d53783e35
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Tue Jan 28 01:21:24 2020 -0500

    gnu: Add libuemf.
    
    * gnu/packages/image.scm (libuemf): New variable.
---
 gnu/packages/image.scm | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 24f1b15..05b64dd 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -25,6 +25,7 @@
 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -74,6 +75,7 @@
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages textutils)
   #:use-module (gnu packages video)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
@@ -856,6 +858,55 @@ compose, and analyze GIF images.")
     (home-page "http://giflib.sourceforge.net/";)
     (license license:x11)))
 
+(define-public libuemf
+  (package
+    (name "libuemf")
+    (version "0.2.7")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/libuemf/libUEMF-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "05djs99vqf067x81xfpskh7a66y5x7b4mmjavybcy7swnm0swg7v"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; Overriding CMAKE_INSTALL_PREFIX is not a good idea.
+         (add-after 'unpack 'fix-CMakeLists.txt
+           (lambda _
+             (substitute* "CMakeLists.txt"
+               ((".*SET\\(CMAKE_INSTALL_PREFIX.*") ""))
+             #t))
+         (delete 'check)
+         (add-after 'install 'check
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (sources (string-append "../libUEMF-" ,version))
+                    (drm-tools (assoc-ref inputs "drm-tools"))
+                    (extract (string-append drm-tools "/bin/extract"))
+                    (execinput (string-append drm-tools "/bin/execinput")))
+               (with-directory-excursion sources
+                 (substitute* "testit.sh"
+                   (("^EPATH=.*")
+                    (format #f "EPATH=~a~%" bin))
+                   (("`which diff`")
+                    "diff")
+                   (("^EXTRACT=.*")
+                    (format #f "EXTRACT=~a~%" extract))
+                   (("^EXECINPUT=.*")
+                    (format #f "EXECINPUT=~a~%" execinput)))
+                 (invoke "sh" "testit.sh"))))))))
+    (native-inputs `(("drm-tools" ,drm-tools))) ;for tests
+    (home-page "http://libuemf.sourceforge.net/";)
+    (synopsis "Library for working with WFM, EMF and EMF+ images")
+    (description "The libUEMF library is a portable C99 implementation for
+reading and writing @abbr{WFM, Windows Metafile}, @abbr{EMF, Enhanced
+Metafile}, and @abbr{EMF+, Enhanced Metafile Plus} files.")
+    (license license:gpl2+)))
+
 (define-public libungif
   (package
     (name "libungif")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]