all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add perceptualdiff.
@ 2016-07-24  3:43 Tobias Geerinckx-Rice
  2016-07-24 21:32 ` Ludovic Courtès
  2016-07-24 21:44 ` Leo Famulari
  0 siblings, 2 replies; 7+ messages in thread
From: Tobias Geerinckx-Rice @ 2016-07-24  3:43 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 188d142..7d72492 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -801,3 +802,34 @@ the programmer.")
     ;; test/extra/ contains musl-libm, 
     ;; which is MIT/expat licensed, but only used for tests
     (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
+
+(define-public perceptualdiff
+  (package
+    (name "perceptualdiff")
+    (version "1.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/myint/perceptualdiff/archive/v"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "0zl6xmp971fffg7fzcz2fbgxg5x2w7l8qa65c008i4kbkc9016ps"))))
+    (build-system cmake-build-system)
+    (inputs `(("freeimage" ,freeimage)))
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'fix-tests
+                    ;; cmake-build-system uses a build/ directory outside
+                    ;; of the source tree, one level higher than expected
+                    (lambda _
+                      (substitute* "test/run_tests.bash"
+                        (("../build") "../../build")))))))
+    (home-page "https://github.com/myint/perceptualdiff")
+    (synopsis "Perceptual image comparison utility")
+    (description "PerceptualDiff visually compares two images to determine
+whether they look alike.  It uses a computational model of the human visual
+system to detect similarities.  This allows it too see beyond irrelevant
+differences in file encoding, image quality, and other small variations.")
+    (license license:gpl2+)))
-- 
2.9.0

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

* Re: [PATCH] gnu: Add perceptualdiff.
  2016-07-24  3:43 [PATCH] gnu: Add perceptualdiff Tobias Geerinckx-Rice
@ 2016-07-24 21:32 ` Ludovic Courtès
  2016-07-24 21:44 ` Leo Famulari
  1 sibling, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2016-07-24 21:32 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: guix-devel

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> * gnu/packages/image.scm (perceptualdiff): New variable.

LGTM, thanks!

Ludo'.

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

* Re: [PATCH] gnu: Add perceptualdiff.
  2016-07-24  3:43 [PATCH] gnu: Add perceptualdiff Tobias Geerinckx-Rice
  2016-07-24 21:32 ` Ludovic Courtès
@ 2016-07-24 21:44 ` Leo Famulari
  2016-07-24 21:56   ` Tobias Geerinckx-Rice
  1 sibling, 1 reply; 7+ messages in thread
From: Leo Famulari @ 2016-07-24 21:44 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: guix-devel

On Sun, Jul 24, 2016 at 05:43:25AM +0200, Tobias Geerinckx-Rice wrote:
> * gnu/packages/image.scm (perceptualdiff): New variable.

LGTM

> +    (arguments
> +     '(#:phases (modify-phases %standard-phases
> +                  (add-after 'unpack 'fix-tests
> +                    ;; cmake-build-system uses a build/ directory outside
> +                    ;; of the source tree, one level higher than expected
> +                    (lambda _
> +                      (substitute* "test/run_tests.bash"
> +                        (("../build") "../../build")))))))

Do you think this is a bug that should be reported?

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

* Re: [PATCH] gnu: Add perceptualdiff.
  2016-07-24 21:44 ` Leo Famulari
@ 2016-07-24 21:56   ` Tobias Geerinckx-Rice
  2016-07-24 22:21     ` Leo Famulari
  0 siblings, 1 reply; 7+ messages in thread
From: Tobias Geerinckx-Rice @ 2016-07-24 21:56 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo!

On 2016-07-24 23:44, Leo Famulari wrote:
>> +                    ;; cmake-build-system uses a build/ directory 
>> outside
>> +                    ;; of the source tree, one level higher than 
>> expected
> 
> Do you think this is a bug that should be reported?

Oh, I don't know. I assumed it was an artefact from Guix build 
environment set-up, and that building out-of-tree was considered weird 
or something. Never used cmake.

Should the script use some cmake environment variable instead?

Kind regards,

T G-R
-- 
Sent from a web browser. Excuse my brevity.

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

* Re: [PATCH] gnu: Add perceptualdiff.
  2016-07-24 21:56   ` Tobias Geerinckx-Rice
@ 2016-07-24 22:21     ` Leo Famulari
  2016-07-25 10:49       ` Vincent Legoll
  0 siblings, 1 reply; 7+ messages in thread
From: Leo Famulari @ 2016-07-24 22:21 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: guix-devel

On Sun, Jul 24, 2016 at 11:56:05PM +0200, Tobias Geerinckx-Rice wrote:
> Leo!
> 
> On 2016-07-24 23:44, Leo Famulari wrote:
> > > +                    ;; cmake-build-system uses a build/ directory
> > > outside
> > > +                    ;; of the source tree, one level higher than
> > > expected
> > 
> > Do you think this is a bug that should be reported?
> 
> Oh, I don't know. I assumed it was an artefact from Guix build environment
> set-up, and that building out-of-tree was considered weird or something.
> Never used cmake.

Maybe you're right. Unlike the gnu-build-sytem, the cmake-build-system
seems to create a 'build/' directory adjacent to the unpacked source
code.

It's not a big deal one way or the other.

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

* Re: [PATCH] gnu: Add perceptualdiff.
  2016-07-24 22:21     ` Leo Famulari
@ 2016-07-25 10:49       ` Vincent Legoll
  2016-07-25 15:10         ` Leo Famulari
  0 siblings, 1 reply; 7+ messages in thread
From: Vincent Legoll @ 2016-07-25 10:49 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Hello,

> Maybe you're right. Unlike the gnu-build-sytem, the cmake-build-system
> seems to create a 'build/' directory adjacent to the unpacked source
> code.

Yes, I think in cmake's land, the recommended way is to build in a directory
outside of the source code , generally at the same level than the source tree
which can be made read-only...

-- 
Vincent Legoll

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

* Re: [PATCH] gnu: Add perceptualdiff.
  2016-07-25 10:49       ` Vincent Legoll
@ 2016-07-25 15:10         ` Leo Famulari
  0 siblings, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2016-07-25 15:10 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: guix-devel

On Mon, Jul 25, 2016 at 12:49:56PM +0200, Vincent Legoll wrote:
> Hello,
> 
> > Maybe you're right. Unlike the gnu-build-sytem, the cmake-build-system
> > seems to create a 'build/' directory adjacent to the unpacked source
> > code.
> 
> Yes, I think in cmake's land, the recommended way is to build in a directory
> outside of the source code , generally at the same level than the source tree
> which can be made read-only...

Thanks for the clarification, Vincent.

I think the package is ready :)

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

end of thread, other threads:[~2016-07-25 15:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-24  3:43 [PATCH] gnu: Add perceptualdiff Tobias Geerinckx-Rice
2016-07-24 21:32 ` Ludovic Courtès
2016-07-24 21:44 ` Leo Famulari
2016-07-24 21:56   ` Tobias Geerinckx-Rice
2016-07-24 22:21     ` Leo Famulari
2016-07-25 10:49       ` Vincent Legoll
2016-07-25 15:10         ` Leo Famulari

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.