Update gpxsee to 7.31, all patches merged upstream.

This commit is contained in:
landry 2020-07-25 10:56:47 +00:00
parent 9cc227730f
commit 80392929e5
6 changed files with 4 additions and 142 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.1.1.1 2020/01/23 08:20:43 landry Exp $
# $OpenBSD: Makefile,v 1.2 2020/07/25 10:56:47 landry Exp $
COMMENT = gpx file viewer
GH_PROJECT = GPXSee
GH_ACCOUNT = tumic0
GH_TAGNAME = 7.19
GH_TAGNAME = 7.31
PKGNAME = ${DISTNAME:L}
CATEGORIES = geo x11

View File

@ -1,2 +1,2 @@
SHA256 (GPXSee-7.19.tar.gz) = +WFKRusXltyqCM5A5OJi+xUOhSW39xKze6M/KT2jz8A=
SIZE (GPXSee-7.19.tar.gz) = 5006883
SHA256 (GPXSee-7.31.tar.gz) = E6mKiV/Tn+mTVILedhsJf7exfQ+ZbW71m7txu6S9aoM=
SIZE (GPXSee-7.31.tar.gz) = 5377234

View File

@ -1,45 +0,0 @@
$OpenBSD: patch-src_map_albersequal_cpp,v 1.2 2020/01/24 08:02:36 landry Exp $
https://github.com/tumic0/GPXSee/issues/266
../src/map/albersequal.h:28:9: error: expected member name or ';' after declaration specifiers
double _C;
~~~~~~ ^
/usr/include/ctype.h:50:12: note: expanded from macro '_C'
#define _C 0x20
Index: src/map/albersequal.cpp
--- src/map/albersequal.cpp.orig
+++ src/map/albersequal.cpp
@@ -104,10 +104,10 @@ AlbersEqual::AlbersEqual(const Ellipsoid *ellipsoid, d
} else
_n = sin_lat1;
- _C = sqr_m1 + _n * q1;
+ C = sqr_m1 + _n * q1;
_a_over_n = ellipsoid->radius() / _n;
nq0 = _n * q0;
- _rho0 = (_C < nq0) ? 0 : _a_over_n * sqrt(_C - nq0);
+ _rho0 = (C < nq0) ? 0 : _a_over_n * sqrt(C - nq0);
}
PointD AlbersEqual::ll2xy(const Coordinates &c) const
@@ -131,7 +131,7 @@ PointD AlbersEqual::ll2xy(const Coordinates &c) const
e_sin = _e * sin_lat;
q = ALBERS_Q(sin_lat, ONE_MINUS_SQR(e_sin), e_sin);
nq = _n * q;
- rho = (_C < nq) ? 0 : _a_over_n * sqrt(_C - nq);
+ rho = (C < nq) ? 0 : _a_over_n * sqrt(C - nq);
theta = _n * dlam;
return PointD(rho * sin(theta) + _falseEasting,
@@ -168,7 +168,7 @@ Coordinates AlbersEqual::xy2ll(const PointD &p) const
if (rho != 0.0)
theta = atan2(dx, rho0_minus_dy);
rho_n = rho * _n;
- q = (_C - (rho_n * rho_n) / _a2) / _n;
+ q = (C - (rho_n * rho_n) / _a2) / _n;
qc = 1 - ((_one_minus_es) / (_two_e)) * log((1.0 - _e) / (1.0 + _e));
if (fabs(fabs(qc) - fabs(q)) > 1.0e-6) {
q_over_2 = q / 2.0;

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-src_map_albersequal_h,v 1.2 2020/01/24 08:02:36 landry Exp $
https://github.com/tumic0/GPXSee/issues/266
../src/map/albersequal.h:28:9: error: expected member name or ';' after declaration specifiers
double _C;
~~~~~~ ^
/usr/include/ctype.h:50:12: note: expanded from macro '_C'
#define _C 0x20
Index: src/map/albersequal.h
--- src/map/albersequal.h.orig
+++ src/map/albersequal.h
@@ -25,7 +25,7 @@ class AlbersEqual : public CT (private)
double _a2;
double _rho0;
- double _C;
+ double C;
double _n;
double _e;
double _es;

View File

@ -1,51 +0,0 @@
$OpenBSD: patch-src_map_krovak_cpp,v 1.2 2020/01/24 08:02:36 landry Exp $
https://github.com/tumic0/GPXSee/issues/266
../src/map/krovak.h:21:17: error: expected member name or ';' after declaration specifiers
double _e, _A, _B, _t0, _n, _r0, _phiP;
~~~~~~ ^
/usr/include/ctype.h:52:12: note: expanded from macro '_B'
#define _B 0x80
Index: src/map/krovak.cpp
--- src/map/krovak.cpp.orig
+++ src/map/krovak.cpp
@@ -17,10 +17,10 @@ Krovak::Krovak(const Ellipsoid *ellipsoid, double stan
_e = sqrt(ellipsoid->es());
_A = ellipsoid->radius() * sqrt(1.0 - ellipsoid->es())
/ (1.0 - ellipsoid->es() * sinPhiC2);
- _B = sqrt(1.0 + (ellipsoid->es() * cosPhiC4 / (1.0 - ellipsoid->es())));
- double gamma0 = asin(sinPhiC / _B);
+ B = sqrt(1.0 + (ellipsoid->es() * cosPhiC4 / (1.0 - ellipsoid->es())));
+ double gamma0 = asin(sinPhiC / B);
_t0 = tan(M_PI_4 + gamma0 / 2.0) * pow((1.0 + _e * sinPhiC) /
- (1.0 - _e * sinPhiC), _e*_B / 2.0) / pow(tan(M_PI_4 + phiC/2.0), _B);
+ (1.0 - _e * sinPhiC), _e*B / 2.0) / pow(tan(M_PI_4 + phiC/2.0), B);
_n = sin(_phiP);
_r0 = scale * _A / tan(_phiP);
_FE = falseEasting;
@@ -35,10 +35,10 @@ PointD Krovak::ll2xy(const Coordinates &c) const
double phi = deg2rad(c.lat());
double lambda = deg2rad(c.lon());
double eSinPhi = _e * sin(phi);
- double U = 2.0 * (atan(_t0 * pow(tan(phi/2.0 + M_PI_4), _B)
- / pow((1.0 + eSinPhi) / (1.0 - eSinPhi), _e * _B/2.0)) - M_PI_4);
+ double U = 2.0 * (atan(_t0 * pow(tan(phi/2.0 + M_PI_4), B)
+ / pow((1.0 + eSinPhi) / (1.0 - eSinPhi), _e * B/2.0)) - M_PI_4);
double cosU = cos(U);
- double V = _B * (_lambda0 - lambda);
+ double V = B * (_lambda0 - lambda);
double T = asin(_cosAlphaC * sin(U) + _sinAlphaC * cosU * cos(V));
double D = asin(cosU * sin(V) / cos(T));
double theta = _n * D;
@@ -63,8 +63,8 @@ Coordinates Krovak::xy2ll(const PointD &p) const
double V = asin(cos(T) * sin(D) / cos(U));
double phi = U;
for (int i = 0; i < 3; i++)
- phi = 2.0 * (atan(pow(_t0, -1.0/_B) * pow(tan(U/2.0 + M_PI_4), 1.0/_B)
+ phi = 2.0 * (atan(pow(_t0, -1.0/B) * pow(tan(U/2.0 + M_PI_4), 1.0/B)
* pow((1.0 + _e * sin(phi))/(1.0 - _e * sin(phi)), _e/2.0)) - M_PI_4);
- return Coordinates(rad2deg(_lambda0 - V/_B), rad2deg(phi));
+ return Coordinates(rad2deg(_lambda0 - V/B), rad2deg(phi));
}

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-src_map_krovak_h,v 1.2 2020/01/24 08:02:36 landry Exp $
https://github.com/tumic0/GPXSee/issues/266
../src/map/krovak.h:21:17: error: expected member name or ';' after declaration specifiers
double _e, _A, _B, _t0, _n, _r0, _phiP;
~~~~~~ ^
/usr/include/ctype.h:52:12: note: expanded from macro '_B'
#define _B 0x80
Index: src/map/krovak.h
--- src/map/krovak.h.orig
+++ src/map/krovak.h
@@ -18,7 +18,7 @@ class Krovak : public CT (public)
virtual Coordinates xy2ll(const PointD &p) const;
private:
- double _e, _A, _B, _t0, _n, _r0, _phiP;
+ double _e, _A, B, _t0, _n, _r0, _phiP;
double _cosAlphaC, _sinAlphaC, _lambda0, _FE, _FN;
};