Merge branch 'saga-gcc' of dani/copr-dani-qgis into daniviga-2.18

This commit is contained in:
Daniele Viganò 2018-01-18 14:16:12 +00:00 committed by Gogs
commit d6d3512392
4 changed files with 280 additions and 3 deletions

1
.gitignore vendored
View File

@ -13,3 +13,4 @@
/qgis-2.18.12.tar.bz2 /qgis-2.18.12.tar.bz2
/qgis-2.18.13.tar.bz2 /qgis-2.18.13.tar.bz2
/qgis-2.18.14.tar.bz2 /qgis-2.18.14.tar.bz2
/qgis-2.18.15.tar.bz2

View File

@ -0,0 +1,135 @@
From f3c103afb8be0e3fc79c0777ae9bfbd7d3ebdca3 Mon Sep 17 00:00:00 2001
Applied-Upstream: https://sourceforge.net/p/saga-gis/code/ci/f3c103afb8be0e3fc79c0777ae9bfbd7d3ebdca3/
From: oconrad <conrad@geowiss.uni-hamburg.de>
Date: Thu, 18 Aug 2016 13:01:36 +0200
Subject: saga_api, CSG_MetaData, gcc v6 compatibility: is_valid() function
removed (you can use () operator to check if a child entry with given name
exists)
diff --git a/saga-gis/src/saga_core/saga_api/metadata.cpp b/saga-gis/src/saga_core/saga_api/metadata.cpp
index 030be0c..4e2f135 100644
--- a/src/saga_core/saga_api/metadata.cpp
+++ b/src/saga_core/saga_api/metadata.cpp
@@ -174,17 +174,6 @@ void CSG_MetaData::Destroy(void)
///////////////////////////////////////////////////////////
//---------------------------------------------------------
-bool CSG_MetaData::is_Valid(void) const
-{
- return( this != NULL );
-}
-
-
-///////////////////////////////////////////////////////////
-// //
-///////////////////////////////////////////////////////////
-
-//---------------------------------------------------------
CSG_MetaData * CSG_MetaData::Add_Child(void)
{
return( Ins_Child(-1) );
diff --git a/saga-gis/src/saga_core/saga_api/metadata.h b/saga-gis/src/saga_core/saga_api/metadata.h
index 905a668..858be49 100644
--- a/src/saga_core/saga_api/metadata.h
+++ b/src/saga_core/saga_api/metadata.h
@@ -157,8 +157,6 @@ public:
const CSG_MetaData & operator [] (int Index) const { return( *Get_Child(Index ) ); }
const CSG_MetaData & operator [] (const CSG_String &Name) const { return( *Get_Child(_Get_Child(Name)) ); }
- bool is_Valid (void) const;
-
int Get_Property_Count (void) const { return( m_Prop_Names.Get_Count() ); }
const CSG_String & Get_Property_Name (int i) const { return( m_Prop_Names [i] ); }
const SG_Char * Get_Property (int i) const { return( i >= 0 && i < m_Prop_Values.Get_Count() ? m_Prop_Values[i].c_str() : NULL ); }
diff --git a/saga-gis/src/saga_core/saga_api/projections.cpp b/saga-gis/src/saga_core/saga_api/projections.cpp
index d84d386..638c0da 100644
--- a/src/saga_core/saga_api/projections.cpp
+++ b/src/saga_core/saga_api/projections.cpp
@@ -220,7 +220,7 @@ double SG_Get_Projection_Unit_To_Meter (TSG_Projection_Unit Unit)
//---------------------------------------------------------
bool SG_Set_Projection_Unit (const CSG_MetaData &m, TSG_Projection_Unit &Unit, CSG_String &Name, double &To_Meter)
{
- if( m["UNIT"].is_Valid() )
+ if( m("UNIT") )
{
if( m["UNIT"].Get_Property("name", Name) && (Unit = SG_Get_Projection_Unit(Name)) != SG_PROJ_UNIT_Undefined )
{
@@ -1042,8 +1042,8 @@ bool CSG_Projections::WKT_to_Proj4(CSG_String &Proj4, const CSG_String &WKT) con
// ]
if( !m.Get_Name().Cmp("GEOGCS") )
{
- if( !m["DATUM"].is_Valid()
- || !m["DATUM"]["SPHEROID"].is_Valid()
+ if( !m("DATUM")
+ || !m["DATUM"]("SPHEROID")
|| m["DATUM"]["SPHEROID"].Get_Children_Count() != 2
|| !m["DATUM"]["SPHEROID"][0].Get_Content().asDouble(a) || a <= 0.0
|| !m["DATUM"]["SPHEROID"][1].Get_Content().asDouble(d) || d < 0.0 )
@@ -1056,7 +1056,7 @@ bool CSG_Projections::WKT_to_Proj4(CSG_String &Proj4, const CSG_String &WKT) con
Proj4 += CSG_String::Format(SG_T(" +a=%f"), a); // Semimajor radius of the ellipsoid axis
Proj4 += CSG_String::Format(SG_T(" +b=%f"), d > 0.0 ? a - a / d : a); // Semiminor radius of the ellipsoid axis
- if( m["DATUM"]["TOWGS84"].is_Valid() && m["DATUM"]["TOWGS84"].Get_Children_Count() == 7 )
+ if( m["DATUM"]("TOWGS84") && m["DATUM"]["TOWGS84"].Get_Children_Count() == 7 )
{
for(i=0; i<7; i++)
{
@@ -1064,7 +1064,7 @@ bool CSG_Projections::WKT_to_Proj4(CSG_String &Proj4, const CSG_String &WKT) con
}
}
- if( m["PRIMEM"].is_Valid() && m["PRIMEM"].Get_Content().asDouble(d) && d != 0.0 )
+ if( m("PRIMEM") && m["PRIMEM"].Get_Content().asDouble(d) && d != 0.0 )
{
Proj4 += CSG_String::Format(SG_T(" +pm=%f"), d);
}
@@ -1090,7 +1090,7 @@ bool CSG_Projections::WKT_to_Proj4(CSG_String &Proj4, const CSG_String &WKT) con
// ]
if( !m.Get_Name().Cmp(SG_T("PROJCS")) )
{
- if( !m["PROJECTION"].is_Valid() )
+ if( !m("PROJECTION") )
{
SG_UI_Msg_Add_Error(CSG_String::Format(SG_T(">> WKT: %s"), _TL("no projection specified")));
@@ -1104,9 +1104,9 @@ bool CSG_Projections::WKT_to_Proj4(CSG_String &Proj4, const CSG_String &WKT) con
return( false );
}
- if( !m["GEOGCS"].is_Valid()
- || !m["GEOGCS"]["DATUM"].is_Valid()
- || !m["GEOGCS"]["DATUM"]["SPHEROID"].is_Valid()
+ if( !m("GEOGCS")
+ || !m["GEOGCS"]("DATUM")
+ || !m["GEOGCS"]["DATUM"]("SPHEROID")
|| m["GEOGCS"]["DATUM"]["SPHEROID"].Get_Children_Count() != 2
|| !m["GEOGCS"]["DATUM"]["SPHEROID"][0].Get_Content().asDouble(a) || a <= 0.0
|| !m["GEOGCS"]["DATUM"]["SPHEROID"][1].Get_Content().asDouble(d) || d < 0.0 )
@@ -1121,7 +1121,7 @@ bool CSG_Projections::WKT_to_Proj4(CSG_String &Proj4, const CSG_String &WKT) con
Proj4 += CSG_String::Format(SG_T(" +a=%f"), a);
Proj4 += CSG_String::Format(SG_T(" +b=%f"), d <= 0.0 ? a : a - a / d); // Semiminor radius of the ellipsoid axis
- if( m["GEOGCS"]["DATUM"]["TOWGS84"].is_Valid() && m["GEOGCS"]["DATUM"]["TOWGS84"].Get_Children_Count() == 7 )
+ if( m["GEOGCS"]["DATUM"]("TOWGS84") && m["GEOGCS"]["DATUM"]["TOWGS84"].Get_Children_Count() == 7 )
{
for(i=0; i<7; i++)
{
@@ -1129,7 +1129,7 @@ bool CSG_Projections::WKT_to_Proj4(CSG_String &Proj4, const CSG_String &WKT) con
}
}
- if( m["PRIMEM"].is_Valid() && m["PRIMEM"].Get_Content().asDouble(d) && d != 0.0 )
+ if( m("PRIMEM") && m["PRIMEM"].Get_Content().asDouble(d) && d != 0.0 )
{
Proj4 += CSG_String::Format(SG_T(" +pm=%f"), d);
}
@@ -1149,7 +1149,7 @@ bool CSG_Projections::WKT_to_Proj4(CSG_String &Proj4, const CSG_String &WKT) con
}
}
- if( m["UNIT"].is_Valid() && m["UNIT"].Get_Content().asDouble(d) && d != 0.0 && d != 1.0 )
+ if( m("UNIT") && m["UNIT"].Get_Content().asDouble(d) && d != 0.0 && d != 1.0 )
{
Proj4 += CSG_String::Format(SG_T(" +to_meter=%f"), d);
}

View File

@ -0,0 +1,132 @@
Description: Fix spelling errors.
* minium -> minimum
* coodinate -> coordinate
* contributers -> contributors
* ins't -> isn't
* Internation -> International
Author: Bas Couwenberg <sebastic@debian.org>
Forwarded: https://sourceforge.net/p/saga-gis/patches/15/
Applied-Upstream: https://sourceforge.net/p/saga-gis/code/ci/ed0361f4a2d25ac727cc184ceaca3125ef6c7dfe/
https://sourceforge.net/p/saga-gis/code/ci/450e5927b0b0759d23b8b31258cc431e9d5aa844/
--- a/src/modules/grid/grid_filter/Filter_Multi_Dir_Lee.cpp
+++ b/src/modules/grid/grid_filter/Filter_Multi_Dir_Lee.cpp
@@ -190,7 +190,7 @@ CFilter_Multi_Dir_Lee::CFilter_Multi_Dir
Set_Author(_TL("Copyrights (c) 2003 by Andre Ringeler"));
Set_Description (_TW(
- "The module searches for the minium variance within 16 directions "
+ "The module searches for the minimum variance within 16 directions "
"and applies a Lee Filter in the direction of minimum variance. The "
"filter is edge-preserving and can be used to remove speckle noise "
"from SAR images or to smooth DTMs. Applied to DTMs, this filter "
--- a/src/modules/terrain_analysis/ta_hydrology/Flow_RecursiveDown.cpp
+++ b/src/modules/terrain_analysis/ta_hydrology/Flow_RecursiveDown.cpp
@@ -128,7 +128,7 @@ CFlow_RecursiveDown::CFlow_RecursiveDown
Parameters.Add_Value(
NULL , "MINDQV" , _TL("DEMON - Min. DQV"),
- _TL("DEMON - Minium Drainage Quota Volume (DQV) for traced flow tubes"),
+ _TL("DEMON - Minimum Drainage Quota Volume (DQV) for traced flow tubes"),
PARAMETER_TYPE_Double , 0.0, 0.0, true, 1.0, true
);
--- a/src/saga_core/saga_gui/res/saga.bra.txt
+++ b/src/saga_core/saga_gui/res/saga.bra.txt
@@ -1216,7 +1216,7 @@ TEXT TRANSLATION
"DEM without Sinks" "MDE sem skins"
"DEMON" "DEMON"
"DEMON - Min. DQV" "DEMON - Min. DQV"
-"DEMON - Minium Drainage Quota Volume (DQV) for traced flow tubes" "DEMON - Volume mínimo de drenagem do contigente (DQV) para tubos de fluxo rastreados"
+"DEMON - Minimum Drainage Quota Volume (DQV) for traced flow tubes" "DEMON - Volume mínimo de drenagem do contigente (DQV) para tubos de fluxo rastreados"
"DESCRIPTION" "Descrição"
"DIFF_MEAN" "DIFF_MEAN"
"DN" "DN"
--- a/src/saga_core/saga_gui/res/saga.ger.txt
+++ b/src/saga_core/saga_gui/res/saga.ger.txt
@@ -1216,7 +1216,7 @@ TEXT TRANSLATION
"DEM without Sinks" ""
"DEMON" "DEMON"
"DEMON - Min. DQV" ""
-"DEMON - Minium Drainage Quota Volume (DQV) for traced flow tubes" "DEMON - Minimales Abflussquotenvolumen (DQV) für aufgezeichnete Fließröhren"
+"DEMON - Minimum Drainage Quota Volume (DQV) for traced flow tubes" "DEMON - Minimales Abflussquotenvolumen (DQV) für aufgezeichnete Fließröhren"
"DESCRIPTION" "BESCHREIBUNG"
"DIFF_MEAN" "DIFFERENZ_DURCHSCHNITT"
"DN" ""
--- a/src/saga_core/saga_gui/res/saga.lng.txt
+++ b/src/saga_core/saga_gui/res/saga.lng.txt
@@ -1216,7 +1216,7 @@ TEXT TRANSLATION
"DEM without Sinks" ""
"DEMON" ""
"DEMON - Min. DQV" ""
-"DEMON - Minium Drainage Quota Volume (DQV) for traced flow tubes" ""
+"DEMON - Minimum Drainage Quota Volume (DQV) for traced flow tubes" ""
"DESCRIPTION" ""
"DIFF_MEAN" ""
"DN" ""
--- a/src/modules/projection/pj_proj4/crs_grid_geogcoords.cpp
+++ b/src/modules/projection/pj_proj4/crs_grid_geogcoords.cpp
@@ -79,7 +79,7 @@ CCRS_Grid_GeogCoords::CCRS_Grid_GeogCoor
Set_Description (_TW(
"Creates for a given grid geographic coordinate information, "
"i.e. two grids specifying the longitude and latitude for each cell. "
- "The coodinate system of the input grid has to be defined. "
+ "The coordinate system of the input grid has to be defined. "
));
Set_Description (Get_Description() + "\n" + CSG_CRSProjector::Get_Description());
--- a/src/saga_core/saga_cmd/man/saga_cmd.1
+++ b/src/saga_core/saga_cmd/man/saga_cmd.1
@@ -221,7 +221,7 @@ Multiple input files can be specified by
On the website of \fIhttp://www.saga\-gis.org\fR, a list of known bugs can be found and new bug reports can be submitted.
.SH "AUTHORS"
.IX Header "AUTHORS"
-\&\fB\s-1SAGA\s0\fR was written by Olaf Conrad with help from a large number of contributers. This manual page was written by Johan Van de Wauw.
+\&\fB\s-1SAGA\s0\fR was written by Olaf Conrad with help from a large number of contributors. This manual page was written by Johan Van de Wauw.
Both are released under the \s-1GNU\s0 General Public License v2.
.PP
More info \fIhttp://www.saga\-gis.org\fR
--- a/src/saga_core/saga_gui/man/saga_gui.1
+++ b/src/saga_core/saga_gui/man/saga_gui.1
@@ -142,7 +142,7 @@ Graphical user interface to the System f
On the project website: \fIhttp://www.saga\-gis.org\fR, a list of known bugs can be found and new bug reports can be submitted.
.SH "AUTHORS"
.IX Header "AUTHORS"
-\&\fB\s-1SAGA\s0\fR was written by Olaf Conrad with help from a large number of contributers. This manual page was written by Johan Van de Wauw.
+\&\fB\s-1SAGA\s0\fR was written by Olaf Conrad with help from a large number of contributors. This manual page was written by Johan Van de Wauw.
Both are released under the \s-1GNU\s0 General Public License v2.
.PP
More info \fIhttp://www.saga\-gis.org\fR
--- a/src/modules/pointcloud/pointcloud_tools/pc_reclass_extract.cpp
+++ b/src/modules/pointcloud/pointcloud_tools/pc_reclass_extract.cpp
@@ -91,7 +91,7 @@ CPC_Reclass_Extract::CPC_Reclass_Extract
"In addition to these settings, two special cases ('NoData values' and 'other values' not "
"included in the parameter setup) are supported:\n"
"In mode (a) and (b) the 'NoData option' is evaluated before the method settings, in mode "
- "(c) the option is evaluated only if the NoData value ins't included in the lookup table.\n"
+ "(c) the option is evaluated only if the NoData value isn't included in the lookup table.\n"
"The 'other values' option is always evaluated after checking the method settings.\n\n")
);
--- a/src/saga_core/saga_api/projections.cpp
+++ b/src/saga_core/saga_api/projections.cpp
@@ -1639,7 +1639,7 @@ bool CSG_Projections::_Set_Dictionary(CS
{ "hammer" , " ", "Hammer_Eckert_Greifendorff" , "*) Hammer & Eckert-Greifendorff" },
{ "hatano" , " ", "Hatano_Asymmetrical_Equal_Area" , "*) Hatano Asymmetrical Equal Area" },
{ "igh" , " ", "World_Goode_Homolosine_Land" , "*) Interrupted Goode Homolosine" },
- { "imw_p" , " ", "Internation_Map_of_the_World_Polyconic" , "*) Internation Map of the World Polyconic" },
+ { "imw_p" , " ", "International_Map_of_the_World_Polyconic" , "*) International Map of the World Polyconic" },
{ "kav5" , " ", "Kavraisky_V" , "*) Kavraisky V" },
{ "kav7" , " ", "Kavraisky_VII" , "*) Kavraisky VII" },
{ "krovak" , " ", "Krovak" , "Krovak" },
--- a/src/saga_core/saga_gui/res/saga_dic.txt
+++ b/src/saga_core/saga_gui/res/saga_dic.txt
@@ -50,7 +50,7 @@ PROJ4 DIR WKT DESC
"hammer" " " "Hammer_Eckert_Greifendorff" "*) Hammer & Eckert-Greifendorff"
"hatano" " " "Hatano_Asymmetrical_Equal_Area" "*) Hatano Asymmetrical Equal Area"
"igh" " " "Interrupted_Goodes_Homolosine" "*) Interrupted Goode's Homolosine"
-"imw_p" " " "Internation_Map_of_the_World_Polyconic" "*) Internation Map of the World Polyconic"
+"imw_p" " " "International_Map_of_the_World_Polyconic" "*) International Map of the World Polyconic"
"kav5" " " "Kavraisky_V" "*) Kavraisky V"
"kav7" " " "Kavraisky_VII" "*) Kavraisky VII"
"krovak" " " "Krovak" "Krovak"

View File

@ -1,6 +1,6 @@
Name: saga Name: saga
Version: 2.3.1 Version: 2.3.1
Release: 2%{?dist} Release: 3%{?dist}
Summary: Geographic information system with an API for processing geodata Summary: Geographic information system with an API for processing geodata
Group: Applications/Engineering Group: Applications/Engineering
@ -12,6 +12,8 @@ License: GPLv2 and LGPLv2
URL: http://www.saga-gis.org URL: http://www.saga-gis.org
#Source0: https://sourceforge.net/projects/saga-gis/files/SAGA%20-%202.3/SAGA%20%{version}/saga_%{version}_gpl2.tar.gz #Source0: https://sourceforge.net/projects/saga-gis/files/SAGA%20-%202.3/SAGA%20%{version}/saga_%{version}_gpl2.tar.gz
Source0: %{name}_%{version}_gpl2.tar.gz Source0: %{name}_%{version}_gpl2.tar.gz
Patch0: %{name}-projections-gcc6.patch
Patch1: %{name}-spelling-errors.patch
BuildRequires: libappstream-glib BuildRequires: libappstream-glib
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
@ -68,6 +70,9 @@ This package includes the headers and development libraries for SAGA.
%prep %prep
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
# Convert to UNIX line-breaks # Convert to UNIX line-breaks
sed -i 's/\r//' AUTHORS sed -i 's/\r//' AUTHORS
@ -132,8 +137,8 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/%{name}.a
%{_mandir}/man1/%{name}_*1* %{_mandir}/man1/%{name}_*1*
%files -n python2-saga %files -n python2-saga
%{python_sitearch}/*.py* %{python2_sitearch}/*.py*
%{python_sitearch}/*.so %{python2_sitearch}/*.so
%files devel %files devel
%{_includedir}/%{name}/ %{_includedir}/%{name}/
@ -145,6 +150,10 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/%{name}.a
%changelog %changelog
* Thu Jan 18 2018 Daniele Viganò <daniele@vigano.me> - 2.3.1-3
- Add from Debian to address segfaults with shapefiles and newer GCC
- Add a patch from Debian to fix spelling
* Tue Aug 29 2017 Daniele Viganò <daniele@vigano.me> - 2.3.1-2 * Tue Aug 29 2017 Daniele Viganò <daniele@vigano.me> - 2.3.1-2
- Sync with upstream master - Sync with upstream master
- Python 2 binary package renamed to python2-saga - Python 2 binary package renamed to python2-saga