The previoius patch was incomplete, as can be seen in bug #322664. Attached is a more complete patch.
diff -Nur gdal-1.2.6-orig/debian/changelog gdal-1.2.6/debian/changelog --- gdal-1.2.6-orig/debian/changelog 2005-08-06 12:07:08.000000000 +0200 +++ gdal-1.2.6/debian/changelog 2005-08-12 08:25:06.000000000 +0200 @@ -1,3 +1,21 @@ +gdal (1.2.6-1.2) unstable; urgency=low + + * Fix broken library building introduced by my last NMU. (Closes: #322664) + * Moved GCC 4 patch into debian/patches/01_gcc4.patch, based on + patch from Stephan Hermann and Ubuntu. Updated rules to use it. + * Add Conflicts and Replaces on libgdal1 for libgdal1c2 to ease upgrades. + + -- Petter Reinholdtsen <[EMAIL PROTECTED]> Fri, 12 Aug 2005 08:11:40 +0200 + +gdal (1.2.6-1.1) unstable; urgency=low + + * Non-maintainer upload to move to new C++ ABI. (Closes: #321587) + * Rename library package from libgdal1 to libgdal1c2. + * Add forward declaration of ILWISDataset in + frmts/ilwis/ilwisdataset.h to make GCC 4.0 happy. + + -- Petter Reinholdtsen <[EMAIL PROTECTED]> Sat, 6 Aug 2005 11:57:48 +0200 + gdal (1.2.6-1) unstable; urgency=high * New upstream release diff -Nur gdal-1.2.6-orig/debian/control gdal-1.2.6/debian/control --- gdal-1.2.6-orig/debian/control 2005-08-06 12:07:08.000000000 +0200 +++ gdal-1.2.6/debian/control 2005-08-12 08:16:37.000000000 +0200 @@ -5,11 +5,13 @@ Build-Depends: debhelper (>> 4.1.25), zlib1g-dev, libcfitsio-dev, netcdfg-dev, libtiff4-dev, libjasper-1.701-dev, libpng12-dev, libjpeg62-dev, libungif4-dev, libhdf4g-dev, postgresql-dev, postgresql-client, libxerces26-dev, unixodbc-dev, libsqlite0-dev, python-dev, python-numeric, doxygen, d-shlibs, libgeos-dev Standards-Version: 3.6.1 -Package: libgdal1 +Package: libgdal1c2 Section: libs Architecture: any Depends: ${shlibs:Depends} Recommends: proj +Conflicts: libgdal1 +Replaces: libgda11 Description: Geospatial Data Abstraction Library GDAL is a translator library for raster geospatial data formats. As a library, it presents a single abstract data model to the @@ -32,7 +34,7 @@ Package: libgdal1-dev Section: libdevel Architecture: any -Depends: libgdal1 (=${Source-Version}), libc6-dev, unixodbc-dev +Depends: libgdal1c2 (=${Source-Version}), libc6-dev, unixodbc-dev Suggests: libgdal-doc Provides: libgdal-dev Conflicts: libgdal-dev @@ -59,7 +61,7 @@ Package: libgdal-doc Section: doc Architecture: all -Suggests: libgdal1 (=${Source-Version}) +Suggests: libgdal1c2 (=${Source-Version}) Description: Documentation for the Geospatial Data Abstraction Library GDAL is a translator library for raster geospatial data formats. As a library, it presents a single abstract data model to the diff -Nur gdal-1.2.6-orig/debian/libgdal1c2.docs gdal-1.2.6/debian/libgdal1c2.docs --- gdal-1.2.6-orig/debian/libgdal1c2.docs 1970-01-01 01:00:00.000000000 +0100 +++ gdal-1.2.6/debian/libgdal1c2.docs 2003-10-22 19:16:34.000000000 +0200 @@ -0,0 +1 @@ +NEWS diff -Nur gdal-1.2.6-orig/debian/libgdal1c2.files gdal-1.2.6/debian/libgdal1c2.files --- gdal-1.2.6-orig/debian/libgdal1c2.files 1970-01-01 01:00:00.000000000 +0100 +++ gdal-1.2.6/debian/libgdal1c2.files 2003-10-22 19:16:34.000000000 +0200 @@ -0,0 +1,2 @@ +usr/lib/libgdal.so.* +usr/share/gdal diff -Nur gdal-1.2.6-orig/debian/libgdal1.docs gdal-1.2.6/debian/libgdal1.docs --- gdal-1.2.6-orig/debian/libgdal1.docs 2003-10-22 19:16:34.000000000 +0200 +++ gdal-1.2.6/debian/libgdal1.docs 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -NEWS diff -Nur gdal-1.2.6-orig/debian/libgdal1.files gdal-1.2.6/debian/libgdal1.files --- gdal-1.2.6-orig/debian/libgdal1.files 2003-10-22 19:16:34.000000000 +0200 +++ gdal-1.2.6/debian/libgdal1.files 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -usr/lib/libgdal.so.* -usr/share/gdal diff -Nur gdal-1.2.6-orig/debian/patches/01_gcc4.patch gdal-1.2.6/debian/patches/01_gcc4.patch --- gdal-1.2.6-orig/debian/patches/01_gcc4.patch 1970-01-01 01:00:00.000000000 +0100 +++ gdal-1.2.6/debian/patches/01_gcc4.patch 2005-08-12 08:18:22.000000000 +0200 @@ -0,0 +1,10 @@ +--- gdal-1.2.6.orig/frmts/ilwis/ilwisdataset.h ++++ gdal-1.2.6/frmts/ilwis/ilwisdataset.h +@@ -116,6 +116,7 @@ + /* ILWISRasterBand */ + /************************************************************************/ + ++class ILWISDataset; + class ILWISRasterBand : public GDALRasterBand + { + friend class ILWISDataset; diff -Nur gdal-1.2.6-orig/debian/rules gdal-1.2.6/debian/rules --- gdal-1.2.6-orig/debian/rules 2005-08-06 12:07:08.000000000 +0200 +++ gdal-1.2.6/debian/rules 2005-08-12 08:19:08.000000000 +0200 @@ -36,8 +36,13 @@ mv libtool-2 libtool chmod 755 libtool +patch: patch-stamp +patch-stamp: + dh_testdir + patch -p1 < debian/patches/01_gcc4.patch + touch patch-stamp -build: build-stamp +build: patch build-stamp build-stamp: config.status dh_testdir @@ -45,8 +50,14 @@ $(MAKE) docs touch build-stamp - -clean: +unpatch: patch unpatch-stamp +unpatch-stamp: + dh_testdir + if [ -e patch-stamp ]; then \ + patch -p1 -R < debian/patches/01_gcc4.patch ; \ + rm patch-stamp ; \ + fi +clean: unpatch # reminiscence to old procedure of building man pages, will now created # by doxygen. This rm will be deleted in further releases of gdal sh -c "if (test -d man/man1) then rm -r man/man1; fi" @@ -86,9 +97,9 @@ dh_strip dh_compress dh_fixperms - dh_makeshlibs -V'libgdal1 (>= 1.2.6)' + dh_makeshlibs -V'libgdal1c2 (>= 1.2.6)' dh_installdeb - dh_shlibdeps -L libgdal1 -l. + dh_shlibdeps -L libgdal1c2 -l. dh_python dh_gencontrol dh_md5sums