[packages/gdal] - up to 1.10.1 but still needs mysql build fix

arekm arekm at pld-linux.org
Sun Nov 3 17:26:27 CET 2013


commit 84501866f7bb48661f9360ef4f7139af44677404
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Nov 3 17:26:24 2013 +0100

    - up to 1.10.1 but still needs mysql build fix

 gdal-hdf4-eos.patch  |  11 ---
 gdal-openjpeg2.patch | 257 ---------------------------------------------------
 gdal-poppler.patch   | 121 ------------------------
 gdal.spec            |  14 +--
 4 files changed, 4 insertions(+), 399 deletions(-)
---
diff --git a/gdal.spec b/gdal.spec
index a9ff2c8..b08f7de 100644
--- a/gdal.spec
+++ b/gdal.spec
@@ -42,20 +42,17 @@
 Summary:	Geospatial Data Abstraction Library
 Summary(pl.UTF-8):	Biblioteka abstrakcji danych dotyczących powierzchni Ziemi
 Name:		gdal
-Version:	1.9.2
-Release:	15
+Version:	1.10.1
+Release:	0.1
 License:	BSD-like
 Group:		Libraries
-Source0:	ftp://ftp.remotesensing.org/gdal/%{name}-%{version}.tar.gz
-# Source0-md5:	3f39db89f4710269b3a8bf94178e07aa
+Source0:	http://download.osgeo.org/gdal/%{version}/%{name}-%{version}.tar.xz
+# Source0-md5:	f354c614aea76e5630e4edbf06e5c292
 Patch0:		%{name}-perl.patch
 Patch1:		%{name}-python_install.patch
 Patch2:		%{name}-php.patch
 Patch3:		%{name}-fpic.patch
 Patch4:		%{name}-format-security.patch
-Patch5:		%{name}-openjpeg2.patch
-Patch6:		%{name}-hdf4-eos.patch
-Patch7:		%{name}-poppler.patch
 URL:		http://www.gdal.org/
 %{?with_opencl:BuildRequires:	OpenCL-devel >= 1.0}
 %{?with_armadillo:BuildRequires:	armadillo-devel}
@@ -262,9 +259,6 @@ osr.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
 
 # need to regenerate (old ones don't support perl 5.10)
 %{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
diff --git a/gdal-hdf4-eos.patch b/gdal-hdf4-eos.patch
deleted file mode 100644
index b72effd..0000000
--- a/gdal-hdf4-eos.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- gdal-1.9.2/frmts/hdf4/GNUmakefile.orig	2012-10-09 02:58:26.000000000 +0200
-+++ gdal-1.9.2/frmts/hdf4/GNUmakefile	2013-01-06 21:13:02.687487717 +0100
-@@ -12,7 +12,7 @@
- HDFEOS_OPTS :=	-Ihdf-eos $(HDFEOS_OPTS)
- endif
- 
--CPPFLAGS	:=	-I../pds $(GDAL_INCLUDE) $(HDF4_INCLUDE) $(HDFEOS_OPTS) $(CPPFLAGS)
-+CPPFLAGS	:=	-I../pds $(GDAL_INCLUDE) $(HDFEOS_OPTS) $(HDF4_INCLUDE) $(CPPFLAGS)
- 
- default:	$(OBJ:.o=.$(OBJ_EXT)) $(SUBLIBS)
- 
diff --git a/gdal-openjpeg2.patch b/gdal-openjpeg2.patch
deleted file mode 100644
index 222d1f1..0000000
--- a/gdal-openjpeg2.patch
+++ /dev/null
@@ -1,257 +0,0 @@
---- gdal-1.9.2/configure.in.orig	2013-01-06 15:03:02.347950440 +0100
-+++ gdal-1.9.2/configure.in	2013-01-06 15:06:03.784613325 +0100
-@@ -1644,20 +1644,20 @@
- 
- elif test "$with_openjpeg" = "yes" -o "$with_openjpeg" = "" ; then
- 
--  AC_CHECK_LIB(openjpeg,opj_decode_tile_data,HAVE_OPENJPEG=yes,HAVE_OPENJPEG=no,)
--  AC_CHECK_HEADERS(openjpeg.h)
-+  AC_CHECK_LIB(openjp2,opj_decode_tile_data,HAVE_OPENJPEG=yes,HAVE_OPENJPEG=no,)
-+  AC_CHECK_HEADERS(openjpeg-2.0/openjpeg.h)
- 
--  if test "$ac_cv_header_openjpeg_h" = "no"; then
-+  if test "$ac_cv_header_openjpeg_2_0_openjpeg_h" = "no"; then
-     HAVE_OPENJPEG=no
-   fi
- 
-   if test "$HAVE_OPENJPEG" = "yes" ; then
--    LIBS="-lopenjpeg $LIBS"
-+    LIBS="-lopenjp2 $LIBS"
-   fi
- else
- 
-   HAVE_OPENJPEG=yes
--  LIBS="-L$with_openjpeg -L$with_openjpeg/lib -lopenjpeg $LIBS"
-+  LIBS="-L$with_openjpeg -L$with_openjpeg/lib -lopenjp2 $LIBS"
-   if test -r $with_openjpeg/include/openjpeg-2.0/openjpeg.h ; then
-     EXTRA_INCLUDES="-I$with_openjpeg/include/openjpeg-2.0 $EXTRA_INCLUDES"
-   elif test -r $with_openjpeg/include/openjpeg.h ; then
-@@ -1668,7 +1668,7 @@
-     AC_MSG_ERROR([openjpeg.h not found in $with_openjpeg/include or $with_openjpeg/include/openjpeg-2.0])
-   fi
- 
--  AC_CHECK_LIB(openjpeg,opj_decode_tile_data,HAVE_OPENJPEG=yes,HAVE_OPENJPEG=no,)
-+  AC_CHECK_LIB(openjp2,opj_decode_tile_data,HAVE_OPENJPEG=yes,HAVE_OPENJPEG=no,)
- 
-   if test "$HAVE_OPENJPEG" = "yes" ; then
-     AC_MSG_NOTICE([using OpenJPEG library from $with_openjpeg.])
---- gdal-1.9.2/frmts/openjpeg/openjpegdataset.cpp.orig	2012-10-09 02:58:27.000000000 +0200
-+++ gdal-1.9.2/frmts/openjpeg/openjpegdataset.cpp	2013-01-07 20:31:31.410092737 +0100
-@@ -37,7 +37,7 @@
- /* and when calling openjpeg API from the driver, we have to replace bool by int also */
- #define bool int
- #define GDAL_OPENJPEG_BOOL int
--#include <openjpeg.h>
-+#include <openjpeg-2.0/openjpeg.h>
- #undef bool /* undef now, so that later includes are happy */
- 
- #include "gdal_pam.h"
-@@ -77,7 +77,7 @@
- /*                      JP2OpenJPEGDataset_Read()                       */
- /************************************************************************/
- 
--static OPJ_UINT32 JP2OpenJPEGDataset_Read(void* pBuffer, OPJ_UINT32 nBytes,
-+static OPJ_SIZE_T JP2OpenJPEGDataset_Read(void* pBuffer, OPJ_SIZE_T nBytes,
-                                        void *pUserData)
- {
-     int nRet = VSIFReadL(pBuffer, 1, nBytes, (VSILFILE*)pUserData);
-@@ -93,7 +93,7 @@
- /*                      JP2OpenJPEGDataset_Write()                      */
- /************************************************************************/
- 
--static OPJ_UINT32 JP2OpenJPEGDataset_Write(void* pBuffer, OPJ_UINT32 nBytes,
-+static OPJ_SIZE_T JP2OpenJPEGDataset_Write(void* pBuffer, OPJ_SIZE_T nBytes,
-                                        void *pUserData)
- {
-     int nRet = VSIFWriteL(pBuffer, 1, nBytes, (VSILFILE*)pUserData);
-@@ -107,7 +107,7 @@
- /*                       JP2OpenJPEGDataset_Seek()                      */
- /************************************************************************/
- 
--static GDAL_OPENJPEG_BOOL JP2OpenJPEGDataset_Seek(OPJ_SIZE_T nBytes, void * pUserData)
-+static GDAL_OPENJPEG_BOOL JP2OpenJPEGDataset_Seek(OPJ_OFF_T nBytes, void * pUserData)
- {
- #ifdef DEBUG
-     CPLDebug("OPENJPEG", "JP2OpenJPEGDataset_Seek(%d)", nBytes);
-@@ -119,7 +119,7 @@
- /*                     JP2OpenJPEGDataset_Skip()                        */
- /************************************************************************/
- 
--static OPJ_SIZE_T JP2OpenJPEGDataset_Skip(OPJ_SIZE_T nBytes, void * pUserData)
-+static OPJ_OFF_T JP2OpenJPEGDataset_Skip(OPJ_OFF_T nBytes, void * pUserData)
- {
-     vsi_l_offset nOffset = VSIFTellL((VSILFILE*)pUserData);
-     nOffset += nBytes;
-@@ -332,10 +332,7 @@
-     opj_stream_set_user_data(pStream, poGDS->fp);
- 
-     opj_image_t * psImage = NULL;
--    OPJ_INT32  nX0,nY0;
--    OPJ_UINT32 nTileW,nTileH,nTilesX,nTilesY;
--    if(!opj_read_header(pCodec, &psImage, &nX0, &nY0, &nTileW, &nTileH,
--                        &nTilesX, &nTilesY, pStream))
-+    if(!opj_read_header(pStream, pCodec, &psImage))
-     {
-         CPLError(CE_Failure, CPLE_AppDefined, "opj_read_header() failed");
-         opj_destroy_codec(pCodec);
-@@ -343,7 +340,7 @@
-         return CE_Failure;
-     }
- 
--    if (!opj_set_decode_area(pCodec,
-+    if (!opj_set_decode_area(pCodec, psImage,
-                             nBlockXOff * nBlockXSize,
-                             nBlockYOff * nBlockYSize,
-                             nBlockXOff * nBlockXSize + nWidthToRead,
-@@ -378,9 +375,9 @@
- 
-     do
-     {
--        if (!opj_read_tile_header(pCodec, &nTileIndex, &nRequiredSize,
-+        if (!opj_read_tile_header(pCodec, pStream, &nTileIndex, &nRequiredSize,
-                                   &nTileX0, &nTileY0, &nTileX1, &nTileY1,
--                                  &nCompCount, &bDataToUncompress, pStream))
-+                                  &nCompCount, &bDataToUncompress))
-         {
-             CPLError(CE_Failure, CPLE_AppDefined, "opj_read_tile_header() failed");
-             CPLFree(pTempBuffer);
-@@ -494,7 +491,7 @@
- {
-     JP2OpenJPEGDataset *poGDS = (JP2OpenJPEGDataset *) poDS;
- 
--    if (poGDS->eColorSpace == CLRSPC_GRAY)
-+    if (poGDS->eColorSpace == OPJ_CLRSPC_GRAY)
-         return GCI_GrayIndex;
-     else if (poGDS->nBands == 3 || poGDS->nBands == 4)
-     {
-@@ -541,8 +538,8 @@
-     adfGeoTransform[4] = 0.0;
-     adfGeoTransform[5] = 1.0;
-     bLoadingOtherBands = FALSE;
--    eCodecFormat = CODEC_UNKNOWN;
--    eColorSpace = CLRSPC_UNKNOWN;
-+    eCodecFormat = OPJ_CODEC_UNKNOWN;
-+    eColorSpace = OPJ_CLRSPC_UNKNOWN;
-     bIs420 = FALSE;
-     pFullBuffer = NULL;
- }
-@@ -676,9 +673,9 @@
-     static const unsigned char jpc_header[] = {0xff,0x4f};
-     if (memcmp( poOpenInfo->pabyHeader, jpc_header, 
-                     sizeof(jpc_header) ) == 0)
--        eCodecFormat = CODEC_J2K;
-+        eCodecFormat = OPJ_CODEC_J2K;
-     else
--        eCodecFormat = CODEC_JP2;
-+        eCodecFormat = OPJ_CODEC_JP2;
- 
-     opj_codec_t* pCodec = opj_create_decompress(eCodecFormat);
- 
-@@ -703,10 +700,8 @@
-     opj_stream_set_user_data(pStream, fp);
- 
-     opj_image_t * psImage = NULL;
--    OPJ_INT32  nX0,nY0;
--    OPJ_UINT32 nTileW,nTileH,nTilesX,nTilesY;
--    if(!opj_read_header(pCodec, &psImage, &nX0, &nY0, &nTileW, &nTileH,
--                        &nTilesX, &nTilesY, pStream))
-+    OPJ_UINT32 nTileW,nTileH;
-+    if(!opj_read_header(pStream, pCodec, &psImage))
-     {
-         CPLError(CE_Failure, CPLE_AppDefined, "opj_read_header() failed");
-         opj_destroy_codec(pCodec);
-@@ -725,10 +720,21 @@
-         return NULL;
-     }
- 
-+    opj_codestream_info_v2_t *csinfo = opj_get_cstr_info(pCodec);
-+    if (csinfo == NULL)
-+    {
-+        opj_destroy_codec(pCodec);
-+        opj_stream_destroy(pStream);
-+        opj_image_destroy(psImage);
-+        VSIFCloseL(fp);
-+        return NULL;
-+    }
-+    nTileW = csinfo->tdx;
-+    nTileH = csinfo->tdy;
-+    opj_destroy_cstr_info(&csinfo);
-+
- #ifdef DEBUG
-     int i;
--    CPLDebug("OPENJPEG", "nX0 = %d", nX0);
--    CPLDebug("OPENJPEG", "nY0 = %d", nY0);
-     CPLDebug("OPENJPEG", "nTileW = %d", nTileW);
-     CPLDebug("OPENJPEG", "nTileH = %d", nTileH);
-     CPLDebug("OPENJPEG", "psImage->x0 = %d", psImage->x0);
-@@ -780,7 +786,7 @@
-             eDataType = GDT_UInt16;
-     }
- 
--    int bIs420  =  (psImage->color_space != CLRSPC_SRGB &&
-+    int bIs420  =  (psImage->color_space != OPJ_CLRSPC_SRGB &&
-                     eDataType == GDT_Byte &&
-                     psImage->numcomps == 3 &&
-                     psImage->comps[1].w == psImage->comps[0].w / 2 &&
-@@ -932,14 +938,14 @@
- /* -------------------------------------------------------------------- */
- /*      Analyze creation options.                                       */
- /* -------------------------------------------------------------------- */
--    OPJ_CODEC_FORMAT eCodecFormat = CODEC_J2K;
-+    OPJ_CODEC_FORMAT eCodecFormat = OPJ_CODEC_J2K;
-     const char* pszCodec = CSLFetchNameValueDef(papszOptions, "CODEC", NULL);
-     if (pszCodec)
-     {
-         if (EQUAL(pszCodec, "JP2"))
--            eCodecFormat = CODEC_JP2;
-+            eCodecFormat = OPJ_CODEC_JP2;
-         else if (EQUAL(pszCodec, "J2K"))
--            eCodecFormat = CODEC_J2K;
-+            eCodecFormat = OPJ_CODEC_J2K;
-         else
-         {
-             CPLError(CE_Warning, CPLE_NotSupported,
-@@ -952,7 +958,7 @@
-         if (strlen(pszFilename) > 4 &&
-             EQUAL(pszFilename + strlen(pszFilename) - 4, ".JP2"))
-         {
--            eCodecFormat = CODEC_JP2;
-+            eCodecFormat = OPJ_CODEC_JP2;
-         }
-     }
- 
-@@ -971,19 +977,19 @@
-     if (nYSize < nBlockYSize)
-         nBlockYSize = nYSize;
- 
--    OPJ_PROG_ORDER eProgOrder = LRCP;
-+    OPJ_PROG_ORDER eProgOrder = OPJ_LRCP;
-     const char* pszPROGORDER =
-             CSLFetchNameValueDef(papszOptions, "PROGRESSION", "LRCP");
-     if (EQUAL(pszPROGORDER, "LRCP"))
--        eProgOrder = LRCP;
-+        eProgOrder = OPJ_LRCP;
-     else if (EQUAL(pszPROGORDER, "RLCP"))
--        eProgOrder = RLCP;
-+        eProgOrder = OPJ_RLCP;
-     else if (EQUAL(pszPROGORDER, "RPCL"))
--        eProgOrder = RPCL;
-+        eProgOrder = OPJ_RPCL;
-     else if (EQUAL(pszPROGORDER, "PCRL"))
--        eProgOrder = PCRL;
-+        eProgOrder = OPJ_PCRL;
-     else if (EQUAL(pszPROGORDER, "CPRL"))
--        eProgOrder = CPRL;
-+        eProgOrder = OPJ_CPRL;
-     else
-     {
-         CPLError(CE_Warning, CPLE_NotSupported,
-@@ -1097,7 +1103,7 @@
-     opj_set_warning_handler(pCodec, JP2OpenJPEGDataset_WarningCallback,NULL);
-     opj_set_error_handler(pCodec, JP2OpenJPEGDataset_ErrorCallback,NULL);
- 
--    OPJ_COLOR_SPACE eColorSpace = (bResample) ? CLRSPC_SYCC : (nBands == 3) ? CLRSPC_SRGB : CLRSPC_GRAY;
-+    OPJ_COLOR_SPACE eColorSpace = (bResample) ? OPJ_CLRSPC_SYCC : (nBands == 3) ? OPJ_CLRSPC_SRGB : OPJ_CLRSPC_GRAY;
-     opj_image_t* psImage = opj_image_tile_create(nBands,pasBandParams,
-                                                  eColorSpace);
-     CPLFree(pasBandParams);
diff --git a/gdal-poppler.patch b/gdal-poppler.patch
deleted file mode 100644
index 58e2522..0000000
--- a/gdal-poppler.patch
+++ /dev/null
@@ -1,121 +0,0 @@
---- gdal-1.9.2/frmts/pdf/pdfio.h.orig	2013-09-27 19:25:21.549930220 +0200
-+++ gdal-1.9.2/frmts/pdf/pdfio.h	2013-09-27 19:50:28.013200337 +0200
-@@ -55,10 +55,11 @@
-                          Guint lengthA, Object *dictA);
-         virtual ~VSIPDFFileStream();
- 
--        virtual Stream *   makeSubStream(Guint startA, GBool limitedA,
--                                         Guint lengthA, Object *dictA);
--        virtual int        getPos();
--        virtual Guint      getStart();
-+        virtual BaseStream *copy();
-+        virtual Stream *   makeSubStream(Goffset startA, GBool limitedA,
-+                                         Goffset lengthA, Object *dictA);
-+        virtual Goffset    getPos();
-+        virtual Goffset    getStart();
-         virtual StreamKind getKind();
-         virtual GooString *getFileName();
- 
-@@ -69,8 +70,8 @@
-         virtual void       reset();
-         virtual void       unfilteredReset ();
-         virtual void       close();
--        virtual void       setPos(Guint pos, int dir = 0);
--        virtual void       moveStart(int delta);
-+        virtual void       setPos(Goffset pos, int dir = 0);
-+        virtual void       moveStart(Goffset delta);
- 
-     private:
-         VSIPDFFileStream  *poParent;
---- gdal-1.9.2/configure.in.orig	2013-09-27 19:03:37.856651598 +0200
-+++ gdal-1.9.2/configure.in	2013-09-27 19:24:36.179932130 +0200
-@@ -3000,10 +3000,10 @@
-         echo 'public:' >> testpoppler.cpp
-         echo '  TestStream() : BaseStream(0,0) {}' >> testpoppler.cpp
-         echo '  ~TestStream() {}' >> testpoppler.cpp
--        echo '  virtual Stream *makeSubStream(Guint start, GBool limited, Guint length, Object *dict) { return 0; }' >> testpoppler.cpp
--        echo '  virtual void setPos(Guint pos, int dir = 0) { }' >> testpoppler.cpp
--        echo '  virtual Guint getStart() { return 0; }' >> testpoppler.cpp
--        echo '  virtual void moveStart(int delta) { }' >> testpoppler.cpp
-+        echo '  virtual Stream *makeSubStream(Goffset start, GBool limited, Goffset length, Object *dict) { return 0; }' >> testpoppler.cpp
-+        echo '  virtual void setPos(Goffset pos, int dir = 0) { }' >> testpoppler.cpp
-+        echo '  virtual Goffset getStart() { return 0; }' >> testpoppler.cpp
-+        echo '  virtual void moveStart(Goffset delta) { }' >> testpoppler.cpp
-         echo '};' >> testpoppler.cpp
-         echo 'int main(int argc, char** argv) { return 0; }' >> testpoppler.cpp
-         if test -z "`${CXX} testpoppler.cpp -c ${POPPLER_INC} 2>&1`" ; then
---- gdal-1.9.2/frmts/pdf/pdfdataset.cpp.orig	2012-10-09 02:58:26.000000000 +0200
-+++ gdal-1.9.2/frmts/pdf/pdfdataset.cpp	2013-09-27 19:40:31.413225370 +0200
-@@ -522,12 +522,12 @@
- 
- #ifdef USE_POPPLER
- #ifdef POPPLER_0_20_OR_LATER
--static void PDFDatasetErrorFunction(void* userData, ErrorCategory eErrCatagory, int nPos, char *pszMsg)
-+static void PDFDatasetErrorFunction(void* userData, ErrorCategory eErrCatagory, Goffset nPos, char *pszMsg)
- {
-     CPLString osError;
- 
-     if (nPos >= 0)
--        osError.Printf("Pos = %d, ", nPos);
-+        osError.Printf("Pos = %lld, ", (long long)nPos);
-     osError += pszMsg;
- 
-     if (strcmp(osError.c_str(), "Incorrect password") == 0)
---- gdal-1.9.2/frmts/pdf/pdfio.cpp.orig	2012-10-09 02:58:26.000000000 +0200
-+++ gdal-1.9.2/frmts/pdf/pdfio.cpp	2013-09-27 20:31:25.879764002 +0200
-@@ -102,12 +102,17 @@
-     }
- }
- 
-+BaseStream *VSIPDFFileStream::copy()
-+{
-+    return new VSIPDFFileStream(*this);
-+}
-+
- /************************************************************************/
- /*                             makeSubStream()                          */
- /************************************************************************/
- 
--Stream *VSIPDFFileStream::makeSubStream(Guint startA, GBool limitedA,
--                                        Guint lengthA, Object *dictA)
-+Stream *VSIPDFFileStream::makeSubStream(Goffset startA, GBool limitedA,
-+                                        Goffset lengthA, Object *dictA)
- {
-     return new VSIPDFFileStream(this,
-                                 startA, limitedA,
-@@ -118,7 +123,7 @@
- /*                                 getPos()                             */
- /************************************************************************/
- 
--int VSIPDFFileStream::getPos()
-+Goffset VSIPDFFileStream::getPos()
- {
-     return nCurrentPos;
- }
-@@ -127,7 +132,7 @@
- /*                                getStart()                            */
- /************************************************************************/
- 
--Guint VSIPDFFileStream::getStart()
-+Goffset VSIPDFFileStream::getStart()
- {
-     return nStart;
- }
-@@ -273,7 +278,7 @@
- /*                               setPos()                               */
- /************************************************************************/
- 
--void VSIPDFFileStream::setPos(Guint pos, int dir)
-+void VSIPDFFileStream::setPos(Goffset pos, int dir)
- {
-     if (dir >= 0)
-     {
-@@ -301,7 +306,7 @@
- /*                            moveStart()                               */
- /************************************************************************/
- 
--void VSIPDFFileStream::moveStart(int delta)
-+void VSIPDFFileStream::moveStart(Goffset delta)
- {
-     nStart += delta;
-     VSIFSeekL(f, nCurrentPos = nStart, SEEK_SET);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gdal.git/commitdiff/84501866f7bb48661f9360ef4f7139af44677404



More information about the pld-cvs-commit mailing list