From a5a74dc3e07d6494de9081306f4d95266d2e330e Mon Sep 17 00:00:00 2001 From: Balint Cristian Date: Thu, 14 Feb 2008 14:15:35 +0000 Subject: [PATCH] rebuild for gcc-43 Modified Files: devel/gdal.spec Added Files: devel/gdal-gcc43.patch --- gdal-gcc43.patch | 68 ++++++++++++++++++++++++++++++++++++++++++++++++ gdal.spec | 23 +++++++++++++--- 2 files changed, 88 insertions(+), 3 deletions(-) create mode 100644 gdal-gcc43.patch diff --git a/gdal-gcc43.patch b/gdal-gcc43.patch new file mode 100644 index 0000000..1d44e8c --- /dev/null +++ b/gdal-gcc43.patch @@ -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 + + 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 // for_each, find_if ++ + #include "ogr_geojson.h" + #include "ogrgeojsonwriter.h" + #include // JSON-C +-#include // for_each, find_if + + /************************************************************************/ + /* STATIC MEMBERS DEFINITION */ diff --git a/gdal.spec b/gdal.spec index 6237d27..7503564 100644 --- a/gdal.spec +++ b/gdal.spec @@ -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 - 1.5.0-3 +- install cpl_config.h manually for bz#430894 +- fix gcc4.3 build + * Mon Jan 14 2008 Balint Cristian - 1.5.0-2 - fix perl dependency issue.