[Git][debian-gis-team/proj][experimental] 3 commits: Add patch to avoid XY, LP and UV datatype clashes with other libraries.

Sebastiaan Couwenberg gitlab at salsa.debian.org
Sat Feb 10 10:38:05 UTC 2018


Sebastiaan Couwenberg pushed to branch experimental at Debian GIS Project / proj


Commits:
6c397e86 by Bas Couwenberg at 2018-02-10T11:18:27+01:00
Add patch to avoid XY, LP and UV datatype clashes with other libraries.

See: #889922 & #889926

- - - - -
995b8e3e by Bas Couwenberg at 2018-02-10T11:27:40+01:00
Fix deprecated source override location.

- - - - -
bcca2104 by Bas Couwenberg at 2018-02-10T11:27:40+01:00
Set distribution to experimental.

- - - - -


4 changed files:

- debian/changelog
- + debian/patches/0001-Avoid-XY-LP-and-UV-datatype-clashes-with-other-libra.patch
- debian/patches/series
- debian/source.lintian-overrides → debian/source/lintian-overrides


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,11 @@
-proj (5.0.0~rc2-1~exp3) UNRELEASED; urgency=medium
+proj (5.0.0~rc2-1~exp3) experimental; urgency=medium
 
   * Ignore test failures on problematic architectures only.
+  * Add patch to avoid XY, LP and UV datatype clashes with other libraries.
+    See: #889922 & #889926
+  * Fix deprecated source override location.
 
- -- Bas Couwenberg <sebastic at debian.org>  Fri, 09 Feb 2018 14:40:43 +0100
+ -- Bas Couwenberg <sebastic at debian.org>  Sat, 10 Feb 2018 11:13:32 +0100
 
 proj (5.0.0~rc2-1~exp2) experimental; urgency=medium
 


=====================================
debian/patches/0001-Avoid-XY-LP-and-UV-datatype-clashes-with-other-libra.patch
=====================================
--- /dev/null
+++ b/debian/patches/0001-Avoid-XY-LP-and-UV-datatype-clashes-with-other-libra.patch
@@ -0,0 +1,135 @@
+Description: Avoid XY, LP and UV datatype clashes with other libraries.
+ Remove unnecessary definitions of UV and UVW from project.h that collides with
+ external libraries. To prevent similar problems in the future the
+ datatypes XY, LP, UV, XYZ, LPZ and UVW has been prefixed by PJ_ in
+ proj.h and proj_internal.h
+Author: Kristian Evers <kristianevers at gmail.com>
+Origin: https://github.com/OSGeo/proj.4/commit/9c75d794177276189d0a2809bc462291e1a070d3
+
+--- a/src/proj.h
++++ b/src/proj.h
+@@ -212,13 +212,13 @@ typedef struct { double o, p, k; }
+ typedef struct { double e, n, u; }          PJ_ENU;  /* East, North, Up */
+ 
+ /* Classic proj.4 pair/triplet types */
+-typedef struct { double   u,   v; }  UV;
+-typedef struct { double   x,   y; }  XY;
+-typedef struct { double lam, phi; }  LP;
+-
+-typedef struct { double   x,   y,  z; }  XYZ;
+-typedef struct { double   u,   v,  w; }  UVW;
+-typedef struct { double lam, phi,  z; }  LPZ;
++typedef struct { double   u,   v; }  PJ_UV;
++typedef struct { double   x,   y; }  PJ_XY;
++typedef struct { double lam, phi; }  PJ_LP;
++
++typedef struct { double   x,   y,  z; }  PJ_XYZ;
++typedef struct { double   u,   v,  w; }  PJ_UVW;
++typedef struct { double lam, phi,  z; }  PJ_LPZ;
+ 
+ 
+ /* Avoid preprocessor renaming and implicit type-punning: Use a union to make it explicit */
+@@ -229,12 +229,12 @@ union PJ_COORD {
+     PJ_LPZT lpzt;
+      PJ_OPK opk;
+      PJ_ENU enu;
+-        XYZ xyz;
+-        UVW uvw;
+-        LPZ lpz;
+-         XY xy;
+-         UV uv;
+-         LP lp;
++     PJ_XYZ xyz;
++     PJ_UVW uvw;
++     PJ_LPZ lpz;
++      PJ_XY xy;
++      PJ_UV uv;
++      PJ_LP lp;
+ };
+ 
+ 
+@@ -263,8 +263,8 @@ struct PJ_GRID_INFO {
+     char        gridname[32];       /* name of grid                         */
+     char        filename[260];      /* full path to grid                    */
+     char        format[8];          /* file format of grid                  */
+-    LP          lowerleft;          /* Coordinates of lower left corner     */
+-    LP          upperright;         /* Coordinates of upper right corner    */
++    PJ_LP       lowerleft;          /* Coordinates of lower left corner     */
++    PJ_LP       upperright;         /* Coordinates of upper right corner    */
+     int         n_lon, n_lat;       /* Grid size                            */
+     double      cs_lon, cs_lat;     /* Cell size of grid                    */
+ };
+@@ -336,16 +336,16 @@ PJ_COORD proj_coord (double x, double y,
+ double proj_roundtrip (PJ *P, PJ_DIRECTION direction, int n, PJ_COORD *coo);
+ 
+ /* Geodesic distance between two points with angular 2D coordinates */
+-double proj_lp_dist (const PJ *P, LP a, LP b);
++double proj_lp_dist (const PJ *P, PJ_LP a, PJ_LP b);
+ 
+ /* The geodesic distance AND the vertical offset */
+-double proj_lpz_dist (const PJ *P, LPZ a, LPZ b);
++double proj_lpz_dist (const PJ *P, PJ_LPZ a, PJ_LPZ b);
+ 
+ /* Euclidean distance between two points with linear 2D coordinates */
+-double proj_xy_dist (XY a, XY b);
++double proj_xy_dist (PJ_XY a, PJ_XY b);
+ 
+ /* Euclidean distance between two points with linear 3D coordinates */
+-double proj_xyz_dist (XYZ a, XYZ b);
++double proj_xyz_dist (PJ_XYZ a, PJ_XYZ b);
+ 
+ 
+ /* Set or read error level */
+@@ -355,7 +355,7 @@ int  proj_errno_reset (const PJ *P);
+ int  proj_errno_restore (const PJ *P, int err);
+ 
+ /* Scaling and angular distortion factors */
+-PJ_FACTORS proj_factors(PJ *P, LP lp);
++PJ_FACTORS proj_factors(PJ *P, PJ_LP lp);
+ 
+ /* Info functions - get information about various PROJ.4 entities */
+ PJ_INFO proj_info(void);
+--- a/src/proj_internal.h
++++ b/src/proj_internal.h
+@@ -91,9 +91,9 @@ PJ_COORD pj_approx_3D_trans (PJ *P, PJ_D
+ /* Grid functionality */
+ int             proj_vgrid_init(PJ *P, const char *grids);
+ int             proj_hgrid_init(PJ *P, const char *grids);
+-double          proj_vgrid_value(PJ *P, LP lp);
+-LP              proj_hgrid_value(PJ *P, LP lp);
+-LP              proj_hgrid_apply(PJ *P, LP lp, PJ_DIRECTION direction);
++double          proj_vgrid_value(PJ *P, PJ_LP lp);
++PJ_LP           proj_hgrid_value(PJ *P, PJ_LP lp);
++PJ_LP           proj_hgrid_apply(PJ *P, PJ_LP lp, PJ_DIRECTION direction);
+ 
+ /* High level functionality for handling thread contexts */
+ enum proj_log_level {
+--- a/src/projects.h
++++ b/src/projects.h
+@@ -157,10 +157,6 @@ typedef struct { double u, v, w; } projU
+ #define XYZ projUVW
+ #define LPZ projUVW
+ 
+-/* Yes, this is ridiculous, but a consequence of an old and bad decision about implicit type-punning through preprocessor abuse */
+-typedef struct { double u, v; }        UV;
+-typedef struct { double u, v, w; }     UVW;
+-
+ #else
+ typedef struct { double x, y; }        XY;
+ typedef struct { double x, y, z; }     XYZ;
+@@ -169,6 +165,15 @@ typedef struct { double lam, phi, z; } L
+ typedef struct { double u, v; }        UV;
+ typedef struct { double u, v, w; }     UVW;
+ #endif  /* ndef PJ_LIB__ */
++
++#else
++typedef PJ_XY XY;
++typedef PJ_LP LP;
++typedef PJ_UV UV;
++typedef PJ_XYZ XYZ;
++typedef PJ_LPZ LPZ;
++typedef PJ_UVW UVW;
++
+ #endif  /* ndef PROJ_H   */
+ 
+ 


=====================================
debian/patches/series
=====================================
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 manpage-section.patch
 avoid-numerical-differences-on-non-amd64-architectures.patch
+0001-Avoid-XY-LP-and-UV-datatype-clashes-with-other-libra.patch


=====================================
debian/source.lintian-overrides → debian/source/lintian-overrides
=====================================



View it on GitLab: https://salsa.debian.org/debian-gis-team/proj/compare/a9b14055bf05bd4a01755261d963ec99d9c5b545...bcca210407f15fab82403ea5a04175f766aeb907

---
View it on GitLab: https://salsa.debian.org/debian-gis-team/proj/compare/a9b14055bf05bd4a01755261d963ec99d9c5b545...bcca210407f15fab82403ea5a04175f766aeb907
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20180210/ec68f76a/attachment-0001.html>


More information about the Pkg-grass-devel mailing list