Commit Message
* gnu/packages/image.scm (perceptualdiff): New variable.
---
gnu/packages/image.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
Comments
Tobias Geerinckx-Rice <me@tobias.gr> skribis:
> * gnu/packages/image.scm (perceptualdiff): New variable.
LGTM, thanks!
Ludo'.
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?
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
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.
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...
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 :)
@@ -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+)))