rebuild for gcc-43 Modified Files: devel/gdal.spec Added Files:

devel/gdal-gcc43.patch
This commit is contained in:
Balint Cristian 2008-02-14 14:15:35 +00:00
parent 1e4a1df7fa
commit a5a74dc3e0
2 changed files with 88 additions and 3 deletions

68
gdal-gcc43.patch Normal file
View File

@ -0,0 +1,68 @@
--- frmts/ilwis/ilwisdataset.cpp.orig
+++ frmts/ilwis/ilwisdataset.cpp
@@ -407,5 +407,4 @@
{
string st = ReadElement("MapStore", "Type", pszFileName.c_str());
- transform(st.begin(), st.end(), st.begin(), tolower);
if( EQUAL(st.c_str(),"byte"))
@@ -482,6 +481,4 @@
else
georef = ReadElement("MapList", "GeoRef", osFileName);
-
- transform(georef.begin(), georef.end(), georef.begin(), tolower);
//Capture the geotransform, only if the georef is not 'none',
@@ -789,7 +786,6 @@
// Fetch coordinate system
string csy = ReadElement("GeoRef", "CoordSystem", pszGeoRef);
- transform(csy.begin(), csy.end(), csy.begin(), tolower);
-
string pszProj;
+
if( (csy.length() != 0) && !EQUAL(csy.c_str(),"unknown.csy"))
{
@@ -797,5 +793,5 @@
//Form the coordinate system file name
if( !(EQUALN( csy.c_str(), "latlon.csy", 10 )) &&
- !(EQUALN( csy.c_str(), "LatlonWGS84.csy", 15 )))
+ !(EQUALN( csy.c_str(), "LatlonWGS84.csy", 15 )))
{
string pszBaseName = string(CPLGetBasename(csy.c_str()) );
@@ -1319,5 +1315,4 @@
string domName = ReadElement("BaseMap", "Domain", pszFileName.c_str());
string pszBaseName = string(CPLGetBasename( domName.c_str() ));
- transform(pszBaseName.begin(), pszBaseName.end(), pszBaseName.begin(), tolower);
string pszPath = string(CPLGetPath( pszFileName.c_str() ));
@@ -1371,5 +1366,4 @@
string domType = ReadElement("Domain", "Type", pszDomainName.c_str());
- transform(domType.begin(), domType.end(), domType.begin(), tolower);
if EQUAL(domType.c_str(),"domainvalue")
{
--- frmts/idrisi/IdrisiDataset.cpp.orig 2008-02-13 22:21:36.000000000 +0200
+++ frmts/idrisi/IdrisiDataset.cpp 2008-02-13 22:22:27.000000000 +0200
@@ -35,6 +35,7 @@
#include "gdal_pam.h"
#include "gdal_rat.h"
#include "gdal_alg.h"
+#include <climits>
CPL_CVSID( "$Id: IdrisiDataset.cpp 12896 2007-11-20 21:01:46Z rouault $" );
--- ogr/ogrsf_frmts/geojson/ogrgeojsonlayer.cpp.orig 2008-02-14 02:43:16.000000000 +0200
+++ ogr/ogrsf_frmts/geojson/ogrgeojsonlayer.cpp 2008-02-14 13:21:22.000000000 +0200
@@ -26,10 +26,11 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
****************************************************************************/
+#include <algorithm> // for_each, find_if
+
#include "ogr_geojson.h"
#include "ogrgeojsonwriter.h"
#include <jsonc/json.h> // JSON-C
-#include <algorithm> // for_each, find_if
/************************************************************************/
/* STATIC MEMBERS DEFINITION */

View File

@ -1,12 +1,13 @@
Name: gdal
Version: 1.5.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: GIS file format library
Group: System Environment/Libraries
License: MIT
URL: http://gdal.maptools.org
Source0: %{name}-%{version}-fedora.tar.gz
Source1: http://download.osgeo.org/gdal/gdalautotest-1.5.0.tar.gz
Patch0: %{name}-gcc43.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libtool swig pkgconfig
BuildRequires: doxygen tetex-latex ghostscript
@ -59,6 +60,7 @@ The GDAL perl modules provides support to handle multiple GIS file formats.
%prep
%setup -q -n %{name}-%{version}-fedora
%patch0 -p0 -b .gcc43
# unpack test cases olso.
tar -xzf %{SOURCE1} .
@ -95,12 +97,13 @@ chmod -x ogr/ogrsf_frmts/ogdi/ogrogdidriver.cpp
# bug 189337 c8
# HAVE_NETCDF is not present anymore in hdf
pushd frmts/hdf4
for file in `find . -type f -name "*.c*"`
for file in `find . -type f -name "*.*"`
do
sed -i \
-e 's|MAX_NC_NAME|H4_MAX_NC_NAME|' \
-e 's|MAX_VAR_DIMS|H4_MAX_VAR_DIMS|' \
-e 's|MAX_NC_DIMS|H4_MAX_NC_DIMS|g' \
-e 's|UNKNOWN|H4_UNKNOWN|g' \
$file
done
popd
@ -134,13 +137,20 @@ export CPPFLAGS="$CPPFLAGS `dap-config --cflags`"
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
# we have multilib ogdi-config
%if "%{_lib}" == "lib"
%define cpuarch 32
%else
%define cpuarch 64
%endif
%configure \
--prefix=%{_prefix} \
--includedir=%{_includedir}/%{name}/ \
--datadir=%{_datadir}/%{name}/ \
--with-threads \
--with-dods-root=%{_libdir} \
--with-ogdi=`ogdi-config --libdir` \
--with-ogdi=`ogdi-config-%{cpuarch} --libdir` \
--with-cfitsio=%{_prefix} \
--with-geotiff=external \
--with-tiff=external \
@ -252,6 +262,9 @@ pushd swig/perl; doxygen; popd
pushd swig/perl/latex; make refman.pdf; popd
%endif
# install cpl_config.h bz#430894
install -p -m 644 port/cpl_config.h %{buildroot}%{_includedir}/%{name}/
# cleanup junks
rm -rf %{buildroot}%{_includedir}/%{name}/%{name}
for junk in {*.a,*.la,*.bs,.exists,.packlist,.cvsignore} ; do
@ -356,6 +369,10 @@ rm -rf $RPM_BUILD_ROOT
%{perl_vendorarch}/*
%changelog
* Tue Feb 12 2008 Balint Cristian <rezso@rdsor.ro> - 1.5.0-3
- install cpl_config.h manually for bz#430894
- fix gcc4.3 build
* Mon Jan 14 2008 Balint Cristian <rezso@rdsor.ro> - 1.5.0-2
- fix perl dependency issue.