all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
To: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: add proj4.
Date: Mon, 16 Jan 2017 21:05:12 +0100	[thread overview]
Message-ID: <20170116210512.6e519268@alma-ubu> (raw)
In-Reply-To: <20170116002121.1aec454e@scratchpost.org>

On Mon, 16 Jan 2017 00:21:28 +0100
Danny Milosavljevic <dannym@scratchpost.org> wrote:

> Hi,
> 
> > * gnu/packages/geo.scm:139:13: proj4-4.9.3: invalid license field
> > 
> > But the documentation explicitly speaks about list values. What's
> > wrong?  
> 
> You quoted the list. That means that all the symbols in it stay
> symbols and are not resolved. Instead of substituting the actual
> license license:asl2.0, it will literally put 'license:asl2.0 into
> the list.
> 
> I'd just use something like (list license:a license:b) .

It's a list of records, not of symbols, of cause! Thanks.

> 
> It would also be possible to use quasiquote but I'd not do that in
> this case. It's too obtuse. `(,license:a ,license:b)
> 
> > * /home/bjoern/guix/gnu/packages/geo.scm:100:2: proj4-4.9.3: line
> > 125 is way too long (102 characters)  
> 
> It's an URL in a comment - I'd be fine with it as-is and I wouldn't
> break it anywhere.
> 
> > About the package name: The official name is "proj.4", so I left it
> > as that.  
> 
> Seems reasonable.
> 
> > As variable name, I chose "proj4". Is that correct?  
> 
> Why not use the variable name "proj.4" too then? *scratches head*


Because my Scheme-time is far too long ago, and I'm used to languages
where "dot" in variable names is bad.

Here is the new patch with the two corrections.

Björn




* gnu/packages/geo.scm (proj4): New variable.
---
 gnu/packages/geo.scm | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 56 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 86828e717..0e63fe8c7 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2017 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,8 +20,9 @@
 
 (define-module (gnu packages geo)
   #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system gnu)
   #:use-module (guix download)
-  #:use-module (guix licenses)
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (gnu packages glib)
@@ -92,4 +94,56 @@
 the OpenStreetMap project.  It can provide directions for walking, bicycling,
 and driving.")
     (home-page "https://wiki.gnome.org/Apps/Maps")
-    (license gpl2+)))
+    (license license:gpl2+)))
+
+(define-public proj.4
+  (package
+    (name "proj.4")
+    (version "4.9.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://download.osgeo.org/proj/proj-"
+                                  version
+                                  ".tar.gz"))
+              (sha256
+               (base32
+                "1xw5f427xk9p2nbsj04j6m5zyjlyd66sbvl2bkg8hd1kx8pm9139"))))
+    (build-system gnu-build-system)
+    (arguments `(#:phases
+                 (modify-phases %standard-phases
+                   (add-after
+                       'unpack 'patch-test-shebangs
+                     (lambda _
+                       (substitute* '("nad/test27"
+                                      "nad/test83"
+                                      "nad/testvarious"
+                                      "nad/testdatumfile"
+                                      "nad/testflaky"
+                                      "nad/testIGNF")
+                         (("/bin/rm") (which "rm")))))
+                   ;; Precision problems on i686 and other platforms. See:
+                   ;; https://web.archive.org/web/20151006134301/http://trac.osgeo.org/proj/ticket/255
+                   ;; Disable failing test.
+                   (add-after
+                       'patch-test-shebangs 'ignore-failing-tests
+                     (lambda _
+                       (substitute* '("nad/Makefile.in")
+                         (("\tPROJ_LIB.*" all) (string-append  "#" all))))))))
+    (inputs
+     `(("glib" ,glib)))
+    (home-page "http://proj4.org/")
+    (synopsis "Cartographic Projections Library")
+    (description
+     "Proj.4 is a library for converting coordinates between cartographic projections.
+")
+    (license (list license:expat
+               ;; config.guess, config.sub
+               license:gpl3+
+               ;; libtool
+               license:gpl2+
+               ;; src/PJ_patterson.c
+               license:asl2.0
+               ;; src/geodesic.c/h
+               license:x11
+               ;; cmake/*
+               license:boost1.0))))
-- 
2.11.0

  reply	other threads:[~2017-01-16 20:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-15 22:21 [PATCH] gnu: add proj4 Björn Höfling
2017-01-15 22:24 ` Björn Höfling
2017-01-15 23:21   ` Danny Milosavljevic
2017-01-16 20:05     ` Björn Höfling [this message]
2017-01-16 22:46       ` Leo Famulari
2017-01-17 13:42       ` Marius Bakke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170116210512.6e519268@alma-ubu \
    --to=bjoern.hoefling@bjoernhoefling.de \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.