summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-09-15 21:35:30 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-09-15 21:35:30 -0400
commit0a92a64e59ac1895c685231c662ec2bee18ff90a (patch)
tree77171c9745b99ec02371e08b428b290f7a53cce8 /gnu
parentca42eeebd8cb5a8f0912bed53633ad12827eb188 (diff)
downloadguix-0a92a64e59ac1895c685231c662ec2bee18ff90a.tar.gz
gnu: proj.4: Restore package.
Partially revert f7a12f9224: the proj.4 still has a user, r-proj4.

* gnu/packages/geo.scm (proj.4): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/geo.scm50
1 files changed, 50 insertions, 0 deletions
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index cb0e99e347..2c3a17a201 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -566,6 +566,56 @@ lets developers use the functionality of Proj in their own software.")
              (substitute* "CMakeLists.txt"
                (("MAJOR 7 MINOR 2 PATCH 0") "MAJOR 7 MINOR 2 PATCH 1")))))))))
 
+(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-paths
+           (lambda _
+             (substitute* '("nad/test27"
+                            "nad/test83"
+                            "nad/testvarious"
+                            "nad/testdatumfile"
+                            "nad/testflaky"
+                            "nad/testIGNF")
+               (("/bin/rm") (which "rm")))
+             #t))
+         ;; 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-paths 'ignore-failing-tests
+           (lambda _
+             (substitute* '("nad/Makefile.in")
+               (("\tPROJ_LIB.*" all) (string-append  "#" all)))
+             #t)))))
+    (inputs
+     (list glib))
+    (home-page "https://proj.org/")
+    (synopsis "Cartographic Projections Library")
+    (description
+     "Proj.4 is a library for converting coordinates between cartographic
+projections.")
+    (license (list license:expat
+                   ;; src/PJ_patterson.c
+                   license:asl2.0
+                   ;; src/geodesic.c/h
+                   license:x11
+                   ;; Embedded EPSG database.
+                   (license:non-copyleft "http://www.epsg.org/TermsOfUse")
+                   ;; cmake/*
+                   license:boost1.0))))
+
 (define-public python-pyproj
   (package
     (name "python-pyproj")