From 3b239720598a83f8bc88ff2026b743b45235cd08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 29 Oct 2014 17:58:42 +0100 Subject: [PATCH] gnu: Add GPS Correlate. * gnu/packages/gps.scm (gpscorrelate): New variable. --- gnu/packages/gps.scm | 61 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/gnu/packages/gps.scm b/gnu/packages/gps.scm index d1ccea6c67..1b85a16980 100644 --- a/gnu/packages/gps.scm +++ b/gnu/packages/gps.scm @@ -19,11 +19,16 @@ (define-module (gnu packages gps) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages which) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages compression) + #:use-module (gnu packages docbook) + #:use-module (gnu packages geeqie) ;exiv2 #:use-module (gnu packages xml) + #:use-module (gnu packages gtk) #:use-module (gnu packages qt)) (define-public gpsbabel @@ -65,3 +70,59 @@ manipulation abilities making it a convenient for server-side processing or as the back-end for other tools. It does not convert, transfer, send, or manipulate maps.") (license license:gpl2+))) + +(define-public gpscorrelate + ;; This program is "lightly maintained", so to speak, so we end up taking it + ;; directly from its Git repo. + (let ((commit "365f6e1b3f")) + (package + (name "gpscorrelate") + (version (string-append "1.6.1." commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/freefoote/gpscorrelate") + (commit commit))) + (sha256 + (base32 + "006a6l8p38a4h7y2959sqrmjjn29d8pd50zj9nypcp5ph18nybjb")))) + (build-system gnu-build-system) + (arguments + `(#:phases (alist-replace + 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; This is a rudimentary build system. + (substitute* "Makefile" + (("prefix[[:blank:]]*=.*$") + (string-append "prefix = " (assoc-ref outputs "out") + "\n"))) + + ;; Make sure the DocBook XML and XSL files are found. + ;; Note: this is a space-separated list. + (setenv "XML_CATALOG_FILES" + (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook/catalog.xml " + (assoc-ref inputs "docbook-xsl") + "/xml/xsl/" + ,(package-full-name docbook-xsl) + "/catalog.xml"))) + %standard-phases) + #:tests? #f)) + (inputs + `(("gtk+" ,gtk+-2) + ("libxml2" ,libxml2) + ("exiv2" ,exiv2))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("docbook-xml" ,docbook-xml) + ("docbook-xsl" ,docbook-xsl) + ("libxslt" ,libxslt))) + (home-page "http://freefoote.dview.net/linux/gpscorrelate") + (synopsis "GPS photo correlation tool to geo-localize images") + (description + "GPS Correlate is a program to match a recorded GPS track with the EXIF +tags in digital camera photos, and update the EXIF tags with the location that +the photo was taken. It does this by using the timestamp in the photo and +finding a data point in the GPS track that matches, or interpolating a point +between two other data points.") + (license license:gpl2+))))