[gdal] Various FTBS patches for Rawhide/F17, Cleaner script

Volker Fröhlich volter at fedoraproject.org
Sun May 20 14:55:31 UTC 2012


commit 253ca64ded3d807bd24291bcf1561772d8ffe312
Author: Volker Fröhlich <volker27 at gmx.at>
Date:   Sun May 20 16:51:33 2012 +0200

    Various FTBS patches for Rawhide/F17, Cleaner script
    
    - Add rough script to create a clean tarball
    - Patch for Swig 2.0.6
    - Patch for libdap 3.11.3
    - Patch for libpoppler 0.20

 clean-gdal.sh                |   19 ++++
 gdal-1.9.0-poppler020.patch  |  190 ++++++++++++++++++++++++++++++++++++++++++
 gdal-1.9.1-dods-3.11.3.patch |   14 +++
 gdal-1.9.1-java-swig.patch   |   29 +++++++
 gdal.spec                    |   24 +++++-
 5 files changed, 272 insertions(+), 4 deletions(-)
---
diff --git a/clean-gdal.sh b/clean-gdal.sh
new file mode 100755
index 0000000..eb2cbf7
--- /dev/null
+++ b/clean-gdal.sh
@@ -0,0 +1,19 @@
+# Volker Fröhlich
+tar xvfz gdal-1.9.1RC2.tar.gz
+
+mv gdal-1.9.1{,-fedora} && pushd gdal-1.9.1-fedora
+
+rm data/cubewerx_extra.wkt
+rm data/esri_extra.wkt
+rm data/ecw_cs.wkt
+
+#Muss man swig wirklich löschen?
+rm -r swig/php
+rm -r frmts/bsb
+
+popd
+
+
+#TODO: Provenance reinkopieren
+
+tar cvfz gdal-1.9.1-fedora.tar.gz gdal-1.9.1-fedora
diff --git a/gdal-1.9.0-poppler020.patch b/gdal-1.9.0-poppler020.patch
new file mode 100644
index 0000000..af43bc4
--- /dev/null
+++ b/gdal-1.9.0-poppler020.patch
@@ -0,0 +1,190 @@
+Index: /branches/1.9/gdal/configure
+===================================================================
+--- /branches/1.9/gdal/configure	(revision 24333)
++++ /branches/1.9/gdal/configure	(revision 24437)
+@@ -639,4 +639,5 @@
+ HAVE_PODOFO
+ POPPLER_INC
++POPPLER_0_20_OR_LATER
+ POPPLER_BASE_STREAM_HAS_TWO_ARGS
+ POPPLER_HAS_OPTCONTENT
+@@ -26470,4 +26471,5 @@
+ POPPLER_HAS_OPTCONTENT=no
+ POPPLER_BASE_STREAM_HAS_TWO_ARGS=no
++POPPLER_0_20_OR_LATER=no
+ 
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for poppler" >&5
+@@ -26536,4 +26538,20 @@
+             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
++
++            # And now we check if we have Poppler >= 0.20.0
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have Poppler >= 0.20.0" >&5
++$as_echo_n "checking if we have Poppler >= 0.20.0... " >&6; }
++            rm -f testpoppler.*
++            echo '#include <poppler/Error.h>' > testpoppler.cpp
++            echo 'int main(int argc, char** argv) { setErrorCallback(0,0); return 0; }' >> testpoppler.cpp
++            if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then
++                POPPLER_0_20_OR_LATER=yes
++                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++            else
++                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++            fi
++
+         else
+             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+@@ -26556,4 +26574,6 @@
+ 
+ POPPLER_BASE_STREAM_HAS_TWO_ARGS=$POPPLER_BASE_STREAM_HAS_TWO_ARGS
++
++POPPLER_0_20_OR_LATER=$POPPLER_0_20_OR_LATER
+ 
+ POPPLER_INC=$POPPLER_INC
+Index: /branches/1.9/gdal/nmake.opt
+===================================================================
+--- /branches/1.9/gdal/nmake.opt	(revision 23610)
++++ /branches/1.9/gdal/nmake.opt	(revision 24437)
+@@ -469,8 +469,10 @@
+ # Uncomment for PDF support
+ # Uncomment POPPLER_BASE_STREAM_HAS_TWO_ARGS = YES for Poppler >= 0.16.0
++# Uncomment POPPLER_0_20_OR_LATER = YES for Poppler >= 0.20.0
+ #POPPLER_ENABLED = YES
+ #POPPLER_CFLAGS = -Ie:/kde/include -Ie:/kde/include/poppler
+ #POPPLER_HAS_OPTCONTENT = YES
+ #POPPLER_BASE_STREAM_HAS_TWO_ARGS = YES
++#POPPLER_0_20_OR_LATER = YES
+ #POPPLER_LIBS = e:/kde/lib/poppler.lib e:/kde/lib/freetype.lib e:/kde/lib/liblcms-1.lib advapi32.lib gdi32.lib
+ 
+Index: /branches/1.9/gdal/configure.in
+===================================================================
+--- /branches/1.9/gdal/configure.in	(revision 24333)
++++ /branches/1.9/gdal/configure.in	(revision 24437)
+@@ -2941,4 +2941,5 @@
+ POPPLER_HAS_OPTCONTENT=no
+ POPPLER_BASE_STREAM_HAS_TWO_ARGS=no
++POPPLER_0_20_OR_LATER=no
+ 
+ AC_MSG_CHECKING([for poppler])
+@@ -3000,4 +3001,17 @@
+             POPPLER_BASE_STREAM_HAS_TWO_ARGS=yes
+             AC_MSG_RESULT([yes])
++
++            # And now we check if we have Poppler >= 0.20.0
++            AC_MSG_CHECKING([if we have Poppler >= 0.20.0])
++            rm -f testpoppler.*
++            echo '#include <poppler/Error.h>' > testpoppler.cpp
++            echo 'int main(int argc, char** argv) { setErrorCallback(0,0); return 0; }' >> testpoppler.cpp
++            if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then
++                POPPLER_0_20_OR_LATER=yes
++                AC_MSG_RESULT([yes])
++            else
++                AC_MSG_RESULT([no])
++            fi
++
+         else
+             AC_MSG_RESULT([no])
+@@ -3015,4 +3029,5 @@
+ AC_SUBST(POPPLER_HAS_OPTCONTENT, $POPPLER_HAS_OPTCONTENT)
+ AC_SUBST(POPPLER_BASE_STREAM_HAS_TWO_ARGS, $POPPLER_BASE_STREAM_HAS_TWO_ARGS)
++AC_SUBST(POPPLER_0_20_OR_LATER, $POPPLER_0_20_OR_LATER)
+ AC_SUBST(POPPLER_INC, $POPPLER_INC)
+ 
+Index: /branches/1.9/gdal/frmts/pdf/pdfdataset.cpp
+===================================================================
+--- /branches/1.9/gdal/frmts/pdf/pdfdataset.cpp	(revision 23986)
++++ /branches/1.9/gdal/frmts/pdf/pdfdataset.cpp	(revision 24437)
+@@ -327,5 +327,9 @@
+         poSplashOut = new SplashOutputDev(splashModeRGB8, 4, gFalse, sColor);
+         PDFDoc* poDoc = poGDS->poDoc;
++#ifdef POPPLER_0_20_OR_LATER
++        poSplashOut->startDoc(poDoc);
++#else
+         poSplashOut->startDoc(poDoc->getXRef());
++#endif
+         double dfDPI = poGDS->dfDPI;
+ 
+@@ -518,4 +522,19 @@
+ 
+ #ifdef USE_POPPLER
++#ifdef POPPLER_0_20_OR_LATER
++static void PDFDatasetErrorFunction(void* userData, ErrorCategory eErrCatagory, int nPos, char *pszMsg)
++{
++    CPLString osError;
++
++    if (nPos >= 0)
++        osError.Printf("Pos = %d, ", nPos);
++    osError += pszMsg;
++
++    if (strcmp(osError.c_str(), "Incorrect password") == 0)
++        return;
++
++    CPLError(CE_Failure, CPLE_AppDefined, "%s", osError.c_str());
++}
++#else
+ static void PDFDatasetErrorFunction(int nPos, char *pszMsg, va_list args)
+ {
+@@ -531,4 +550,5 @@
+     CPLError(CE_Failure, CPLE_AppDefined, "%s", osError.c_str());
+ }
++#endif
+ #endif
+ 
+@@ -570,7 +590,11 @@
+     GooString* poUserPwd = NULL;
+ 
+     /* Set custom error handler for poppler errors */
++#ifdef POPPLER_0_20_OR_LATER
++    setErrorCallback(PDFDatasetErrorFunction, NULL);
++#else
+     setErrorFunction(PDFDatasetErrorFunction);
++#endif
+ 
+     PDFDoc* poDoc = NULL;
+     ObjectAutoFree oObj;
+
+Index: /branches/1.9/gdal/frmts/pdf/makefile.vc
+===================================================================
+--- /branches/1.9/gdal/frmts/pdf/makefile.vc	(revision 22493)
++++ /branches/1.9/gdal/frmts/pdf/makefile.vc	(revision 24437)
+@@ -7,5 +7,5 @@
+ 
+ !IFDEF POPPLER_ENABLED
+-EXTRAFLAGS = $(POPPLER_CFLAGS) $(POPPLER_HAS_OPTCONTENT_FLAGS) $(POPPLER_BASE_STREAM_HAS_TWO_ARGS_FLAGS) -DUSE_POPPLER
++EXTRAFLAGS = $(POPPLER_CFLAGS) $(POPPLER_HAS_OPTCONTENT_FLAGS) $(POPPLER_BASE_STREAM_HAS_TWO_ARGS_FLAGS) $(POPPLER_0_20_OR_LATER_FLAGS) -DUSE_POPPLER
+ 
+ !IFDEF POPPLER_HAS_OPTCONTENT
+@@ -15,4 +15,8 @@
+ !IFDEF POPPLER_BASE_STREAM_HAS_TWO_ARGS
+ POPPLER_BASE_STREAM_HAS_TWO_ARGS_FLAGS = -DPOPPLER_BASE_STREAM_HAS_TWO_ARGS
++!ENDIF
++
++!IFDEF POPPLER_0_20_OR_LATER
++POPPLER_0_20_OR_LATER_FLAGS = -DPOPPLER_0_20_OR_LATER
+ !ENDIF
+ 
+Index: /branches/1.9/gdal/frmts/pdf/GNUmakefile
+===================================================================
+--- /branches/1.9/gdal/frmts/pdf/GNUmakefile	(revision 22491)
++++ /branches/1.9/gdal/frmts/pdf/GNUmakefile	(revision 24437)
+@@ -16,4 +16,9 @@
+ endif
+ 
++ifeq ($(POPPLER_0_20_OR_LATER),yes)
++CPPFLAGS +=  -DPOPPLER_0_20_OR_LATER
++endif
++
++
+ CPPFLAGS	:=	$(GDAL_INCLUDE) $(CPPFLAGS) $(POPPLER_INC) $(PODOFO_INC)
+ 
+Index: /branches/1.9/gdal/GDALmake.opt.in
+===================================================================
+--- /branches/1.9/gdal/GDALmake.opt.in	(revision 24419)
++++ /branches/1.9/gdal/GDALmake.opt.in	(revision 24437)
+@@ -386,4 +386,5 @@
+ POPPLER_HAS_OPTCONTENT = @POPPLER_HAS_OPTCONTENT@
+ POPPLER_BASE_STREAM_HAS_TWO_ARGS = @POPPLER_BASE_STREAM_HAS_TWO_ARGS@
++POPPLER_0_20_OR_LATER = @POPPLER_0_20_OR_LATER@
+ POPPLER_INC = @POPPLER_INC@
+ 
diff --git a/gdal-1.9.1-dods-3.11.3.patch b/gdal-1.9.1-dods-3.11.3.patch
new file mode 100644
index 0000000..5cdc90d
--- /dev/null
+++ b/gdal-1.9.1-dods-3.11.3.patch
@@ -0,0 +1,14 @@
+diff -Nur gdal-1.9.1-fedora/configure gdal-1.9.1-fedora-dods3.11.3/configure
+--- gdal-1.9.1-fedora/configure	2012-05-17 05:30:56.000000000 +0200
++++ gdal-1.9.1-fedora-dods3.11.3/configure	2012-05-20 10:47:10.032831845 +0200
+@@ -24320,8 +24320,8 @@
+     as_fn_error $? "--with-dods-root requires path to dods root as argument" "$LINENO" 5
+ else
+     DODS_LIB=$with_dods_root/lib
+-    DODS_INC="-I$with_dods_root/include -I$with_dods_root/include/libdap -I$with_dods_root/include/dap"
+     DODS_BIN=$with_dods_root/bin
++    DODS_INC="-I$with_dods_root/include -I$with_dods_root/include/libdap -I$with_dods_root/include/dap `$DODS_BIN/xml2-config --cflags`"
+ 
+ rm -f islibdappost310.*
+ echo '#include "Connect.h"' > islibdappost310.cpp
+Binary files gdal-1.9.1-fedora/.configure.swp and gdal-1.9.1-fedora-dods3.11.3/.configure.swp differ
diff --git a/gdal-1.9.1-java-swig.patch b/gdal-1.9.1-java-swig.patch
new file mode 100644
index 0000000..36b1d09
--- /dev/null
+++ b/gdal-1.9.1-java-swig.patch
@@ -0,0 +1,29 @@
+Index: /branches/1.9/gdal/swig/include/XMLNode.i
+===================================================================
+--- /branches/1.9/gdal/swig/include/XMLNode.i	(revision 19751)
++++ /branches/1.9/gdal/swig/include/XMLNode.i	(revision 24440)
+@@ -38,16 +38,16 @@
+ } CPLXMLNodeType;
+ 
+-%rename (XMLNode) _CPLXMLNode;
+-%rename (Type) _CPLXMLNode::eType;
+-%rename (Value) _CPLXMLNode::pszValue;
+-%rename (Next) _CPLXMLNode::psNext;
+-%rename (Child) _CPLXMLNode::psChild;
+-typedef struct _CPLXMLNode
++%rename (XMLNode) CPLXMLNode;
++%rename (Type) CPLXMLNode::eType;
++%rename (Value) CPLXMLNode::pszValue;
++%rename (Next) CPLXMLNode::psNext;
++%rename (Child) CPLXMLNode::psChild;
++typedef struct CPLXMLNode
+ {
+ %immutable;
+     CPLXMLNodeType      eType;       
+     char                *pszValue;   
+-    struct _CPLXMLNode *psNext;     
+-    struct _CPLXMLNode *psChild;
++    struct CPLXMLNode *psNext;
++    struct CPLXMLNode *psChild;
+ %mutable;  
+ } CPLXMLNode;
diff --git a/gdal.spec b/gdal.spec
index db8fd3e..fd2df85 100644
--- a/gdal.spec
+++ b/gdal.spec
@@ -30,7 +30,7 @@
 
 Name:      gdal
 Version:   1.9.0
-Release:   3%{?dist}
+Release:   5%{?dist}
 Summary:   GIS file format library
 Group:     System Environment/Libraries
 License:   MIT
@@ -45,6 +45,15 @@ Source2:   %{name}.pom
 # Patch to use system g2clib
 Patch1:    %{name}-g2clib.patch
 
+# Support poppler 0.20
+# http://trac.osgeo.org/gdal/ticket/4668
+Patch2:    %{name}-1.9.0-poppler020.patch
+
+# http://trac.osgeo.org/gdal/changeset/24440#file0
+Patch3:    %{name}-1.9.1-java-swig.patch
+
+Patch4:    %{name}-1.9.1-dods-3.11.3.patch
+
 # Fedora uses Alternatives for Java
 Patch8:    %{name}-1.9.0-java.patch
 
@@ -96,7 +105,7 @@ BuildRequires: libdap-devel
 BuildRequires: librx-devel
 BuildRequires: mysql-devel
 BuildRequires: numpy
-BuildRequires: ogdi-devel
+#BuildRequires: ogdi-devel
 BuildRequires: perl(ExtUtils::MakeMaker)
 BuildRequires: pkgconfig
 BuildRequires: poppler-devel
@@ -272,6 +281,9 @@ rm -rf frmts/gtiff/libgeotiff \
 rm -r frmts/grib/degrib18/g2clib-1.0.4
 
 %patch1 -p1 -b .g2clib~
+%patch2 -p4 -b .poppler~
+%patch3 -p4 -b .java-swig~
+%patch4 -p1 -b .dods~
 %patch8 -p1 -b .java~
 %patch9 -p1 -b .man~
 
@@ -399,7 +411,7 @@ export CPPFLAGS="$CPPFLAGS -I%{_includedir}/libgeotiff"
         --with-mysql              \
         --with-netcdf             \
         --with-odbc               \
-        --with-ogdi               \
+        --without-ogdi               \
         --without-msg             \
         --without-openjpeg        \
         --with-pcraster           \
@@ -773,7 +785,10 @@ rm -rf %{buildroot}
 #Or as before, using ldconfig
 
 %changelog
-* Thu May 10 2012 Volker Fröhlich <volker27 at gmx.at> - 1.9.0-3
+* Sun May 20 2012 Volker Fröhlich <volker27 at gmx.at> - 1.9.0-5
+- Patches for libpoppler 0.20, libdap 3.11.3 and swig 2.0.6
+
+* Thu May 10 2012 Volker Fröhlich <volker27 at gmx.at> - 1.9.0-4
 - Correct provides-filtering as of https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering#Usage
 - Support webp
 - Remove bogus libjpeg-turbo conditional
@@ -781,6 +796,7 @@ rm -rf %{buildroot}
 - Install Ruby bindings to vendorarchdir on F17 and later
 - Conditionals for Ruby specific elements for versions prior F17 and for EPEL
 - Correct quotes for CFLAGS and Ruby
+- Disable ogdi, until BZ#816282 is resolved
 
 * Wed Apr 25 2012 Orion Poplawski <orion at cora.nwra.com> - 1.9.0-2
 - Rebuild for cfitsio 3.300


More information about the scm-commits mailing list