guix-commits
[Top][All Lists]
Advanced

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

03/03: gnu: Add metapixel.


From: guix-commits
Subject: 03/03: gnu: Add metapixel.
Date: Thu, 6 Aug 2020 06:05:12 -0400 (EDT)

ambrevar pushed a commit to branch master
in repository guix.

commit 85c4f486b4516df2ee50d62da377b5589c97cf42
Author: Pierre Neidhardt <mail@ambrevar.xyz>
AuthorDate: Thu Aug 6 12:02:20 2020 +0200

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

diff --git a/gnu/packages/image-processing.scm 
b/gnu/packages/image-processing.scm
index ea63801..e62c5c7 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,6 +42,7 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
@@ -879,3 +881,62 @@ pipeline, along with supporting a manual segmentation 
toolbox.  ITK-SNAP has a
 full-featured UI aimed at clinical researchers.")
     ;; This includes the submodules greedy and c3d.
     (license license:gpl3+)))
+
+(define-public metapixel
+  ;; Follow stable branch.
+  (let ((commit "98ee9daa093b6c334941242e63f90b1c2876eb4f"))
+    (package
+      (name "metapixel")
+      (version (git-version "1.0.2" "1" commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/schani/metapixel";)
+               (commit commit)
+               ;; TODO: Package rwimg and lispreader?
+               (recursive? #t)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0r7n3a6bvcxkbpda4mwmrpicii09iql5z69nkjqygkwxw7ny3309"))))
+      (build-system gnu-build-system)
+      (inputs
+       `(("giflib" ,giflib)
+         ("libjpeg" ,libjpeg-turbo)
+         ("libpng" ,libpng)
+         ("perl" ,perl)))
+      (native-inputs
+       `(("pkg-config" ,pkg-config)
+         ("docbook-xml" ,docbook-xml)
+         ("docbook-xsl" ,docbook-xsl)
+         ("xsltproc" ,libxslt)))
+      (arguments
+       `(#:tests? #f                    ; No tests.
+         #:make-flags (list
+                       (string-append "PREFIX=" (assoc-ref %outputs "out"))
+                       (string-append "MANPAGE_XSL="
+                                      (assoc-ref %build-inputs "docbook-xsl")
+                                      
"/xml/xsl/docbook-xsl-*/manpages/docbook.xsl"))
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (add-before 'install 'make-local-docbook-xml
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "metapixel.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";)
+                  (string-append (assoc-ref inputs "docbook-xml")
+                                 "/xml/dtd/docbook/docbookx.dtd")))
+               #t))
+           (add-before 'install 'fix-directory-creation
+             (lambda* (#:key outputs #:allow-other-keys)
+               (mkdir-p (string-append (assoc-ref outputs "out") 
"/share/man/man1"))
+               #t)))))
+      (home-page "https://www.complang.tuwien.ac.at/schani/metapixel/";)
+      (synopsis "Photomosaics generator")
+      (description "Metapixel is a program for generating photomosaics.  It can
+generate classical photomosaics, in which the source image is viewed as a
+matrix of equally sized rectangles for each of which a matching image is
+substitued, as well as collage-style photomosaics, in which rectangular parts
+of the source image at arbitrary positions (i.e. not aligned to a matrix) are
+substituted by matching images.")
+      (license license:gpl2))))



reply via email to

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