diff mbox series

[bug#50812,v2,1/5] gnu: Add proj 7.2.1.

Message ID 20210926174150.26146-2-felgru@posteo.net
State Accepted
Headers show
Series [bug#50812,v2,1/5] gnu: Add proj 7.2.1. | expand

Commit Message

Felix Gruber Sept. 26, 2021, 5:41 p.m. UTC
* gnu/packages/geo.scm (proj.7): New variable.
---
 gnu/packages/geo.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

Comments

Xinglu Chen Sept. 26, 2021, 8:34 p.m. UTC | #1
On Sun, Sep 26 2021, Felix Gruber wrote:

> * gnu/packages/geo.scm (proj.7): New variable.
> ---
>  gnu/packages/geo.scm | 39 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
>
> diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
> index 9d4a1a8955..c10b93d83f 100644
> --- a/gnu/packages/geo.scm
> +++ b/gnu/packages/geo.scm
> @@ -511,6 +511,45 @@ fully fledged Spatial SQL capabilities.")
>                     license:mpl1.1
>                     license:public-domain))))
>  
> +(define-public proj.7

Hyphens are typically used to denote a specific version of a package,
e.g., ghc-8.8.

> +  (package
> +    (name "proj")
> +    (version "7.2.1")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "http://download.osgeo.org/proj/proj-"
> +                           version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "050apzdn0isxpsblys1shrl9ccli5vd32kgswlgx1imrbwpg915k"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     `(#:configure-flags '("-DUSE_EXTERNAL_GTEST=ON")))
> +    (inputs
> +     `(("curl" ,curl)
> +       ("libjpeg-turbo" ,libjpeg-turbo)
> +       ("libtiff" ,libtiff)
> +       ("sqlite" ,sqlite)))
> +    (native-inputs
> +     `(("googletest" ,googletest)
> +       ("pkg-config" ,pkg-config)))
> +    (home-page "https://proj.org/")
> +    (synopsis "Coordinate transformation software")
> +    (description
> +     "Proj is a generic coordinate transformation software that transforms
> +geospatial coordinates from one coordinate reference system (CRS) to another.

Nit: I would use @acronym{CRS, coordinate reference system}.

> +This includes cartographic projections as well as geodetic transformations.
> +PROJ includes command line applications for easy conversion of coordinates
> +from text files or directly from user input.  In addition, proj also exposes
> +an application programming interface that lets developers use the
> +functionality of proj in their own software.")

The description includes three different spellings of the name---
“Proj”, “PROJ”, and “proj”.  It would be good to keep things more consistent.
Felix Gruber Sept. 27, 2021, 11:18 a.m. UTC | #2
On 9/26/21 10:34 PM, Xinglu Chen wrote:
> On Sun, Sep 26 2021, Felix Gruber wrote:
> 
>> * gnu/packages/geo.scm (proj.7): New variable.
>> ---
>>  gnu/packages/geo.scm | 39 +++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 39 insertions(+)
>>
>> diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
>> index 9d4a1a8955..c10b93d83f 100644
>> --- a/gnu/packages/geo.scm
>> +++ b/gnu/packages/geo.scm
>> @@ -511,6 +511,45 @@ fully fledged Spatial SQL capabilities.")
>>                     license:mpl1.1
>>                     license:public-domain))))
>>  
>> +(define-public proj.7
> 
> Hyphens are typically used to denote a specific version of a package,
> e.g., ghc-8.8.

I've named the package proj.7 as there is already a proj.4 package for
an old API-incompatible version of proj. But you're right that this is
inconsistent with how most version-specific packages are named.

Maybe we should rename proj.4? I wonder if there was a reason for naming
it this way in the first place?

Cheers,
Felix
Xinglu Chen Sept. 27, 2021, 12:36 p.m. UTC | #3
On Mon, Sep 27 2021, Felix Gruber wrote:

> On 9/26/21 10:34 PM, Xinglu Chen wrote:
>> On Sun, Sep 26 2021, Felix Gruber wrote:
>> 
>>> * gnu/packages/geo.scm (proj.7): New variable.
>>> ---
>>>  gnu/packages/geo.scm | 39 +++++++++++++++++++++++++++++++++++++++
>>>  1 file changed, 39 insertions(+)
>>>
>>> diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
>>> index 9d4a1a8955..c10b93d83f 100644
>>> --- a/gnu/packages/geo.scm
>>> +++ b/gnu/packages/geo.scm
>>> @@ -511,6 +511,45 @@ fully fledged Spatial SQL capabilities.")
>>>                     license:mpl1.1
>>>                     license:public-domain))))
>>>  
>>> +(define-public proj.7
>> 
>> Hyphens are typically used to denote a specific version of a package,
>> e.g., ghc-8.8.
>
> I've named the package proj.7 as there is already a proj.4 package for
> an old API-incompatible version of proj. But you're right that this is
> inconsistent with how most version-specific packages are named.
>
> Maybe we should rename proj.4? I wonder if there was a reason for naming
> it this way in the first place?

Yes, I think renaming it to ‘proj-4’ would be a good idea.
Guillaume Le Vaillant Sept. 27, 2021, 12:49 p.m. UTC | #4
> On Sun, Sep 26 2021, Felix Gruber wrote:
> 
>> * gnu/packages/geo.scm (proj.7): New variable.
>> ---
>>  gnu/packages/geo.scm | 39 +++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 39 insertions(+)

Hi,

Instead of adding a proj-7 package, wouldn't it be possible to update
the proj package (which is currently at version 6.3.1).

Also, according to [1], the current version of proj is 8.1.1. Can't the
newer version be used instead of 7.2.1?

[1] https://proj.org/download.html
Felix Gruber Sept. 28, 2021, 6:26 a.m. UTC | #5
On 9/27/21 2:49 PM, Guillaume Le Vaillant wrote:
> Hi,
> 
> Instead of adding a proj-7 package, wouldn't it be possible to update
> the proj package (which is currently at version 6.3.1).

You're right, that works. I've updated the proj package to 7.2.1 and of
the packages depending on proj (obtained with `guix refresh -l proj`)
all but the following two build: python-hyperkitty and itk-snap.
I've checked that those two packages already fail to build with proj
6.3.1 due to build failures in non-proj-related dependencies.

It thus seems safe to update proj directly instead of adding a new
proj-7 package.

> Also, according to [1], the current version of proj is 8.1.1. Can't the
> newer version be used instead of 7.2.1?
> 
> [1] https://proj.org/download.html

Updating to proj 8.1.1 unfortunately breaks many dependent packages as
proj 8.0.1 removed the deprecated proj_api.h API which apparently is
still widely used.

[1] https://proj.org/news.html#id47

After updating proj to 8.1.1 the following dependencies failed to build:

* `/gnu/store/004411fgpblva5gp33xc6l7ri93snsk3-vxl-2.0.2.drv'
* `/gnu/store/1p04p9zk2n4p78izl77n4d3bm15pn7xj-qmapshack-1.15.2.drv'
* `/gnu/store/3lvgc4vbrjck0q55sac038pm4r8674mp-itk-snap-3.8.0.drv'
* `/gnu/store/49f67f3lxfsnpph9qaamwf5jw4dz02i4-saga-7.9.0.drv'
* `/gnu/store/547lhnc9w46iwx6v6ysr0ij7jjmgd7d9-r-hierfstat-0.5-7.drv'
* `/gnu/store/7rjgcsmrpaxgm80nsaka1hgabhk20iq2-r-rastervis-0.50.3.drv'
* `/gnu/store/8r4d9gis8bxxh78b7v3di9w7jfbjp81g-r-zonebuilder-0.0.2.drv'
* `/gnu/store/agv23snqvrdf92pk8rw3wfxp1vb4x9rr-r-tmaptools-3.1-1.drv'
*
`/gnu/store/b4y5li1ffq86zrp3vg2hadi5c8q5cip5-r-spectre-0.5.5-1.f6648ab.drv'
* `/gnu/store/bmqqrl99c8srywankdsv75p8vmgs612i-postgis-3.1.2.drv'
* `/gnu/store/cb3bspgrsi43c41f6n8gryycwdj6an1k-insight-toolkit-4.13.2.drv'
* `/gnu/store/fxh3jwq1652vrns40vqn0j6jgn9096sv-r-rmetasim-3.1.14.drv'
* `/gnu/store/hg69zwr6xjdf84y0gjmgldrmnhc6h63m-osm2pgsql-1.2.2.drv'
* `/gnu/store/pxlq4xn2fj91zil2j8d225gwc27p16fp-r-zoon-0.6.5.drv'
* `/gnu/store/r37iqmzgz00kpk3z93jqrigmjwsp9hv4-r-zonator-0.6.0.drv'
* `/gnu/store/s8y7j2hhfb4bsifl15s8l5cixgh2ka1r-qgis-3.16.3.drv'
* `/gnu/store/vl4ssl7zj6lxkp3dz0mnx3ncs1syihdm-insight-toolkit-5.0.0.drv'
*
`/gnu/store/x9qrim5fbpxcf66c9y99kjzrcf439fki-spatialite-gui-2.1.0-beta1.drv'
*
`/gnu/store/xhn1xr91q36x4skl7jkxawnz28qjcjcy-python-cartopy-0.19.0.post1.drv'
*
`/gnu/store/y1yyq3w87yn2mph3bmpq10208m0n637j-r-cicero-monocle3-1.3.2-1.fa2fb65.drv'
* `/gnu/store/z1l6xjswk905pwb4ibwpl8z2yjjrf8vl-python-hyperkitty-1.3.3.drv'


So for now, I propose to update proj to 7.2.1 which is the last version
that still includes proj_api.h and which thus still lets us build all
the packages that depend on proj.

I'll send a v4 of the patchset with this change.

Best,
Felix
diff mbox series

Patch

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 9d4a1a8955..c10b93d83f 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -511,6 +511,45 @@  fully fledged Spatial SQL capabilities.")
                    license:mpl1.1
                    license:public-domain))))
 
+(define-public proj.7
+  (package
+    (name "proj")
+    (version "7.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://download.osgeo.org/proj/proj-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "050apzdn0isxpsblys1shrl9ccli5vd32kgswlgx1imrbwpg915k"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags '("-DUSE_EXTERNAL_GTEST=ON")))
+    (inputs
+     `(("curl" ,curl)
+       ("libjpeg-turbo" ,libjpeg-turbo)
+       ("libtiff" ,libtiff)
+       ("sqlite" ,sqlite)))
+    (native-inputs
+     `(("googletest" ,googletest)
+       ("pkg-config" ,pkg-config)))
+    (home-page "https://proj.org/")
+    (synopsis "Coordinate transformation software")
+    (description
+     "Proj is a generic coordinate transformation software that transforms
+geospatial coordinates from one coordinate reference system (CRS) to another.
+This includes cartographic projections as well as geodetic transformations.
+PROJ includes command line applications for easy conversion of coordinates
+from text files or directly from user input.  In addition, proj also exposes
+an application programming interface that lets developers use the
+functionality of proj in their own software.")
+    (license (list license:expat
+                   ;; src/projections/patterson.cpp
+                   license:asl2.0
+                   ;; src/geodesic.*, src/tests/geodtest.cpp
+                   license:x11))))
+
 (define-public proj
   (package
     (name "proj")