summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/gdal/files')
-rw-r--r--sci-libs/gdal/files/gdal-1.10.0-ruby-makefile.patch47
-rw-r--r--sci-libs/gdal/files/gdal-1.11.1-poppler-0.31.0-support.patch119
-rw-r--r--sci-libs/gdal/files/gdal-1.11.1-swig-3.0.3.patch161
-rw-r--r--sci-libs/gdal/files/gdal-1.5.0-install_name.patch45
-rw-r--r--sci-libs/gdal/files/gdal-1.5.0-soname.patch13
-rw-r--r--sci-libs/gdal/files/gdal-1.8.1-zlib_header_fix.patch13
-rw-r--r--sci-libs/gdal/files/gdal-1.9.1-ruby-makefile.patch43
7 files changed, 441 insertions, 0 deletions
diff --git a/sci-libs/gdal/files/gdal-1.10.0-ruby-makefile.patch b/sci-libs/gdal/files/gdal-1.10.0-ruby-makefile.patch
new file mode 100644
index 000000000000..cc89200c526d
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-1.10.0-ruby-makefile.patch
@@ -0,0 +1,47 @@
+diff -Naurw gdal-1.10.0.orig/swig/ruby/RubyMakefile.mk gdal-1.10.0/swig/ruby/RubyMakefile.mk
+--- gdal-1.10.0.orig/swig/ruby/RubyMakefile.mk 2013-04-24 18:55:26.000000000 +0000
++++ gdal-1.10.0/swig/ruby/RubyMakefile.mk 2013-06-25 23:58:06.464518830 +0000
+@@ -37,13 +37,13 @@
+
+ ifeq ("$(shell uname -s)", "Darwin")
+ RUBY_MODULES=$(RUBY_MODULES_MAC)
+-LDFLAGS += -Xcompiler -bundle -L$(RUBY_LIB_DIR)
+-RUBY_LIB := -l$(RUBY_SO_NAME)
+ else
+ RUBY_MODULES=$(RUBY_MODULES_LIN)
+-LDFLAGS += -Xcompiler -shared -L$(RUBY_LIB_DIR)
+-RUBY_LIB := -l$(RUBY_SO_NAME)
+ endif
++LDFLAGS += -fPIC -DPIC -shared -L$(RUBY_LIB_DIR)
++CFLAGS += -fPIC -DPIC
++CXXFLAGS += -fPIC -DPIC
++RUBY_LIB := -l$(RUBY_SO_NAME)
+
+ build: $(RUBY_MODULES)
+
+@@ -56,10 +56,10 @@
+ veryclean: clean
+ rm -f *_wrap.cpp
+
+-$(INSTALL_DIR):
++$(DESTDIR)$(INSTALL_DIR):
+ mkdir -p $(DESTDIR)$(INSTALL_DIR)
+
+-install: $(INSTALL_DIR)
++install: $(DESTDIR)$(INSTALL_DIR) $(RUBY_MODULES)
+ for i in $(RUBY_MODULES) ; do $(INSTALL) $$i $(DESTDIR)$(INSTALL_DIR) ; done
+
+ $(RUBY_MODULES_MAC): %.bundle: %_wrap.o
+@@ -69,10 +69,10 @@
+ $(LD) $(LDFLAGS) $(LIBS) $(GDAL_SLIB_LINK) $(RUBY_LIB) $< -o $@
+
+ %.o: %.cpp
+- $(CXX) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $<
++ $(CXX) $(CXXFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $<
+
+ %.o: %.cxx
+- $(CXX) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $<
++ $(CXX) $(CXXFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $<
+
+ %.o: %.c
+ $(CC) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $<
diff --git a/sci-libs/gdal/files/gdal-1.11.1-poppler-0.31.0-support.patch b/sci-libs/gdal/files/gdal-1.11.1-poppler-0.31.0-support.patch
new file mode 100644
index 000000000000..7700c2463873
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-1.11.1-poppler-0.31.0-support.patch
@@ -0,0 +1,119 @@
+diff -urpN gdal-1.11.1.orig/frmts/pdf/pdfdataset.cpp gdal-1.11.1/frmts/pdf/pdfdataset.cpp
+--- gdal-1.11.1.orig/frmts/pdf/pdfdataset.cpp 2014-09-24 06:47:43.000000000 -0700
++++ gdal-1.11.1/frmts/pdf/pdfdataset.cpp 2015-02-19 13:55:58.714589328 -0800
+@@ -108,12 +108,9 @@ class GDALPDFOutputDev : public SplashOu
+
+ public:
+ GDALPDFOutputDev(SplashColorMode colorModeA, int bitmapRowPadA,
+- GBool reverseVideoA, SplashColorPtr paperColorA,
+- GBool bitmapTopDownA = gTrue,
+- GBool allowAntialiasA = gTrue) :
++ GBool reverseVideoA, SplashColorPtr paperColorA) :
+ SplashOutputDev(colorModeA, bitmapRowPadA,
+- reverseVideoA, paperColorA,
+- bitmapTopDownA, allowAntialiasA),
++ reverseVideoA, paperColorA),
+ bEnableVector(TRUE),
+ bEnableText(TRUE),
+ bEnableBitmap(TRUE) {}
+diff -urpN gdal-1.11.1.orig/frmts/pdf/pdfio.cpp gdal-1.11.1/frmts/pdf/pdfio.cpp
+--- gdal-1.11.1.orig/frmts/pdf/pdfio.cpp 2014-09-24 06:47:43.000000000 -0700
++++ gdal-1.11.1/frmts/pdf/pdfio.cpp 2015-02-19 13:55:58.715589318 -0800
+@@ -39,13 +39,25 @@
+
+ CPL_CVSID("$Id$");
+
++
++#ifdef POPPLER_BASE_STREAM_HAS_TWO_ARGS
++/* Poppler 0.31.0 is the first one that needs to know the file size */
++static vsi_l_offset VSIPDFFileStreamGetSize(VSILFILE* f)
++{
++ VSIFSeekL(f, 0, SEEK_END);
++ vsi_l_offset nSize = VSIFTellL(f);
++ VSIFSeekL(f, 0, SEEK_SET);
++ return nSize;
++}
++#endif
++
+ /************************************************************************/
+ /* VSIPDFFileStream() */
+ /************************************************************************/
+
+ VSIPDFFileStream::VSIPDFFileStream(VSILFILE* f, const char* pszFilename, Object *dictA):
+ #ifdef POPPLER_BASE_STREAM_HAS_TWO_ARGS
+- BaseStream(dictA, 0)
++ BaseStream(dictA, (setPos_offset_type)VSIPDFFileStreamGetSize(f))
+ #else
+ BaseStream(dictA)
+ #endif
+@@ -195,7 +207,7 @@ int VSIPDFFileStream::FillBuffer()
+ /* getChar() */
+ /************************************************************************/
+
+-/* The unoptimized version performs a bit well since we must go through */
++/* The unoptimized version performs a bit less since we must go through */
+ /* the whole virtual I/O chain for each character reading. We save a few */
+ /* percent with this extra internal caching */
+
+@@ -326,4 +338,47 @@ void VSIPDFFileStream::moveStart(moveSta
+ nPosInBuffer = nBufferLength = -1;
+ }
+
++/************************************************************************/
++/* hasGetChars() */
++/************************************************************************/
++
++GBool VSIPDFFileStream::hasGetChars()
++{
++ return true;
++}
++
++/************************************************************************/
++/* getChars() */
++/************************************************************************/
++
++int VSIPDFFileStream::getChars(int nChars, Guchar *buffer)
++{
++ int nRead = 0;
++ while (nRead < nChars)
++ {
++ int nToRead = nChars - nRead;
++ if (nPosInBuffer == nBufferLength)
++ {
++ if (!bLimited && nToRead > BUFFER_SIZE)
++ {
++ int nJustRead = (int) VSIFReadL(buffer + nRead, 1, nToRead, f);
++ nPosInBuffer = nBufferLength = -1;
++ nCurrentPos += nJustRead;
++ nRead += nJustRead;
++ break;
++ }
++ else if (!FillBuffer() || nPosInBuffer >= nBufferLength)
++ break;
++ }
++ if( nToRead > nBufferLength - nPosInBuffer )
++ nToRead = nBufferLength - nPosInBuffer;
++
++ memcpy( buffer + nRead, abyBuffer + nPosInBuffer, nToRead );
++ nPosInBuffer += nToRead;
++ nCurrentPos += nToRead;
++ nRead += nToRead;
++ }
++ return nRead;
++}
++
+ #endif
+diff -urpN gdal-1.11.1.orig/frmts/pdf/pdfio.h gdal-1.11.1/frmts/pdf/pdfio.h
+--- gdal-1.11.1.orig/frmts/pdf/pdfio.h 2014-09-24 06:47:43.000000000 -0700
++++ gdal-1.11.1/frmts/pdf/pdfio.h 2015-02-19 13:55:58.715589318 -0800
+@@ -93,6 +93,10 @@ class VSIPDFFileStream: public BaseStrea
+ virtual void close();
+
+ private:
++ /* Added in poppler 0.15.0 */
++ virtual GBool hasGetChars();
++ virtual int getChars(int nChars, Guchar *buffer);
++
+ VSIPDFFileStream *poParent;
+ GooString *poFilename;
+ VSILFILE *f;
diff --git a/sci-libs/gdal/files/gdal-1.11.1-swig-3.0.3.patch b/sci-libs/gdal/files/gdal-1.11.1-swig-3.0.3.patch
new file mode 100644
index 000000000000..c6b8240b8ebf
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-1.11.1-swig-3.0.3.patch
@@ -0,0 +1,161 @@
+svn diff -c 28298 https://svn.osgeo.org/gdal/branches/1.11
+r28298 | rouault | 2015-01-06 10:03:37 +0100 (Di, 06 Jan 2015) | 1 line
+Python bindings: fix processing error of ogr_python.i with SWIG 3 (#5795)
+http://trac.osgeo.org/gdal/ticket/5795#comment:3
+https://bugs.gentoo.org/534168
+
+Index: gdal/swig/python/osgeo/ogr.py
+===================================================================
+--- gdal/swig/python/osgeo/ogr.py (revision 28297)
++++ gdal/swig/python/osgeo/ogr.py (revision 28298)
+@@ -2025,12 +2025,12 @@
+ """Returns the number of features in the layer"""
+ return self.GetFeatureCount()
+
+-
+-
++ # To avoid __len__ being called when testing boolean value
++ # which can have side effects (#4758)
+ def __nonzero__(self):
+ return True
+
+-
++ # For Python 3 compat
+ __bool__ = __nonzero__
+
+ def __getitem__(self, value):
+@@ -2041,9 +2041,9 @@
+ import sys
+ output = []
+ if value.stop == sys.maxint:
+-
+-
+-
++ #for an unending slice, sys.maxint is used
++ #We need to stop before that or GDAL will write an
++ ##error to stdout
+ stop = len(self) - 1
+ else:
+ stop = value.stop
+@@ -2944,8 +2944,8 @@
+ def __copy__(self):
+ return self.Clone()
+
+-
+-
++ # This makes it possible to fetch fields in the form "feature.area".
++ # This has some risk of name collisions.
+ def __getattr__(self, key):
+ """Returns the values of fields by the given name"""
+ if key == 'this':
+@@ -2961,8 +2961,8 @@
+ else:
+ return self.GetField(idx)
+
+-
+-
++ # This makes it possible to set fields in the form "feature.area".
++ # This has some risk of name collisions.
+ def __setattr__(self, key, value):
+ """Set the values of fields by the given name"""
+ if key == 'this' or key == 'thisown':
+@@ -2978,7 +2978,7 @@
+ else:
+ self.__dict__[key] = value
+
+-
++ # This makes it possible to fetch fields in the form "feature['area']".
+ def __getitem__(self, key):
+ """Returns the values of fields by the given name / field_index"""
+ if isinstance(key, str):
+@@ -2993,7 +2993,7 @@
+ else:
+ return self.GetField(fld_index)
+
+-
++ # This makes it possible to set fields in the form "feature['area'] = 123".
+ def __setitem__(self, key, value):
+ """Returns the value of a field by field name / index"""
+ if isinstance(key, str):
+@@ -3026,9 +3026,9 @@
+ return self.GetFieldAsIntegerList(fld_index)
+ if fld_type == OFTRealList:
+ return self.GetFieldAsDoubleList(fld_index)
+-
+-
+-
++ ## if fld_type == OFTDateTime or fld_type == OFTDate or fld_type == OFTTime:
++ # return self.GetFieldAsDate(fld_index)
++ # default to returning as a string. Should we add more types?
+ return self.GetFieldAsString(fld_index)
+
+ def SetField2(self, fld_index, value):
+Index: gdal/swig/include/python/ogr_python.i
+===================================================================
+--- gdal/swig/include/python/ogr_python.i (revision 28297)
++++ gdal/swig/include/python/ogr_python.i (revision 28298)
+@@ -111,7 +111,7 @@
+ }
+
+ %extend OGRLayerShadow {
+- %pythoncode {
++ %pythoncode %{
+ def Reference(self):
+ "For backwards compatibility only."
+ pass
+@@ -183,12 +183,12 @@
+ return output
+ schema = property(schema)
+
+- }
++ %}
+
+ }
+
+ %extend OGRFeatureShadow {
+- %pythoncode {
++ %pythoncode %{
+ def Reference(self):
+ pass
+
+@@ -383,12 +383,12 @@
+ return output
+
+
+-}
++%}
+
+ }
+
+ %extend OGRGeometryShadow {
+-%pythoncode {
++%pythoncode %{
+ def Destroy(self):
+ self.__swig_destroy__(self)
+ self.__del__()
+@@ -416,8 +416,8 @@
+ return subgeom
+ else:
+ raise StopIteration
++%}
+ }
+-}
+
+
+ %extend OGRFieldDefnShadow {
+@@ -449,13 +449,13 @@
+ }
+
+ %extend OGRFieldDefnShadow {
+-%pythoncode {
++%pythoncode %{
+ def Destroy(self):
+ "Once called, self has effectively been destroyed. Do not access. For backwards compatiblity only"
+ _ogr.delete_FieldDefn( self )
+ self.thisown = 0
++%}
+ }
+-}
+
+ %import typemaps_python.i
+
diff --git a/sci-libs/gdal/files/gdal-1.5.0-install_name.patch b/sci-libs/gdal/files/gdal-1.5.0-install_name.patch
new file mode 100644
index 000000000000..e17575267d6e
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-1.5.0-install_name.patch
@@ -0,0 +1,45 @@
+--- GDALmake.opt.in.orig 2008-02-02 18:25:48.000000000 -0800
++++ GDALmake.opt.in 2008-02-02 18:54:53.000000000 -0800
+@@ -97,6 +97,10 @@
+ GDAL_SLIB = $(GDAL_ROOT)/libgdal.$(SO_EXT)
+ GDAL_SLIB_LINK = -L$(GDAL_ROOT) -lgdal
+
++# for building without libtool
++GDAL_SLIB_SO_VER = $(GDAL_VERSION_MAJOR).$(LIBGDAL_CURRENT).$(LIBGDAL_REVISION)
++GDAL_SLIB_SONAME = -install_name $(INST_LIB)/libgdal.$(GDAL_VERSION_MAJOR).$(SO_EXT)
++
+ # Mac OS X Framework definition
+ MACOSX_FRAMEWORK = @MACOSX_FRAMEWORK@
+
+--- GNUmakefile.orig 2010-03-09 14:03:08 +0100
++++ GNUmakefile 2010-03-09 14:05:29 +0100
+@@ -218,7 +218,7 @@
+
+ ifeq ($(HAVE_LD_SHARED),yes)
+
+-GDAL_SLIB_B = $(notdir $(GDAL_SLIB))
++GDAL_SLIB_B = libgdal
+
+ install-lib:
+
+@@ -226,14 +226,14 @@
+ ifeq ($(MACOSX_FRAMEWORK),yes)
+ $(INSTALL_LIB) $(GDAL_SLIB) $(DESTDIR)$(INST_LIB)/GDAL
+ else
+- rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B)
+- rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR)
+- rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VER)
+- $(INSTALL_LIB) $(GDAL_SLIB) $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VER)
++ rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).dylib
++ rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR).dylib
++ rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VER).dylib
++ $(INSTALL_LIB) $(GDAL_SLIB) $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VER).dylib
+ (cd $(DESTDIR)$(INST_LIB) ; \
+- ln -s $(GDAL_SLIB_B).$(GDAL_VER) $(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR))
++ ln -s $(GDAL_SLIB_B).$(GDAL_VER).dylib $(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR).dylib)
+ (cd $(DESTDIR)$(INST_LIB) ; \
+- ln -s $(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR) $(GDAL_SLIB_B))
++ ln -s $(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR).dylib $(GDAL_SLIB_B).dylib)
+ endif
+
+ else
diff --git a/sci-libs/gdal/files/gdal-1.5.0-soname.patch b/sci-libs/gdal/files/gdal-1.5.0-soname.patch
new file mode 100644
index 000000000000..f784536316c2
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-1.5.0-soname.patch
@@ -0,0 +1,13 @@
+--- GDALmake.opt.in.orig 2008-02-02 18:25:48.000000000 -0800
++++ GDALmake.opt.in 2008-02-02 18:54:53.000000000 -0800
+@@ -97,6 +97,10 @@
+ GDAL_SLIB = $(GDAL_ROOT)/libgdal.$(SO_EXT)
+ GDAL_SLIB_LINK = -L$(GDAL_ROOT) -lgdal
+
++# for building without libtool
++GDAL_SLIB_SO_VER = $(GDAL_VERSION_MAJOR).$(LIBGDAL_CURRENT).$(LIBGDAL_REVISION)
++GDAL_SLIB_SONAME = -Wl,-soname,libgdal.$(SO_EXT).$(GDAL_VERSION_MAJOR)
++
+ # Mac OS X Framework definition
+ MACOSX_FRAMEWORK = @MACOSX_FRAMEWORK@
+
diff --git a/sci-libs/gdal/files/gdal-1.8.1-zlib_header_fix.patch b/sci-libs/gdal/files/gdal-1.8.1-zlib_header_fix.patch
new file mode 100644
index 000000000000..04777c8cdbb1
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-1.8.1-zlib_header_fix.patch
@@ -0,0 +1,13 @@
+--- port/cpl_minizip_ioapi.h.orig 2011-09-25 13:38:22.000000000 -0700
++++ port/cpl_minizip_ioapi.h 2011-09-25 13:39:22.000000000 -0700
+@@ -41,6 +41,10 @@
+ #endif
+ #endif
+
++#ifndef OF
++#define OF(x) x
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
diff --git a/sci-libs/gdal/files/gdal-1.9.1-ruby-makefile.patch b/sci-libs/gdal/files/gdal-1.9.1-ruby-makefile.patch
new file mode 100644
index 000000000000..b98f68403526
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-1.9.1-ruby-makefile.patch
@@ -0,0 +1,43 @@
+diff -urN gdal-1.9.1.old//swig/ruby/RubyMakefile.mk gdal-1.9.1/swig/ruby/RubyMakefile.mk
+--- gdal-1.9.1.old//swig/ruby/RubyMakefile.mk 2012-05-25 19:54:12.073974979 +0200
++++ gdal-1.9.1/swig/ruby/RubyMakefile.mk 2012-05-25 19:56:56.014977833 +0200
+@@ -37,13 +37,13 @@
+
+ ifeq ("$(shell uname -s)", "Darwin")
+ RUBY_MODULES=$(RUBY_MODULES_MAC)
+-LDFLAGS += -Xcompiler -bundle -L$(RUBY_LIB_DIR)
+-RUBY_LIB := -l$(RUBY_SO_NAME)
+ else
+ RUBY_MODULES=$(RUBY_MODULES_LIN)
+-LDFLAGS += -Xcompiler -shared -L$(RUBY_LIB_DIR)
+-RUBY_LIB := -l$(RUBY_SO_NAME)
+ endif
++LDFLAGS += -fPIC -DPIC -shared -L$(RUBY_LIB_DIR)
++CFLAGS += -fPIC -DPIC
++CXXFLAGS += -fPIC -DPIC
++RUBY_LIB := -l$(RUBY_SO_NAME)
+
+ build: $(RUBY_MODULES)
+
+@@ -59,7 +59,7 @@
+ $(INSTALL_DIR):
+ mkdir -p $(DESTDIR)$(INSTALL_DIR)
+
+-install: $(INSTALL_DIR)
++install: $(INSTALL_DIR) $(RUBY_MODULES)
+ for i in $(RUBY_MODULES) ; do $(INSTALL) $$i $(DESTDIR)$(INSTALL_DIR) ; done
+
+ $(RUBY_MODULES_MAC): %.bundle: %_wrap.o
+@@ -69,10 +69,10 @@
+ $(LD) $(LDFLAGS) $(LIBS) $(GDAL_SLIB_LINK) $(RUBY_LIB) $< -o $@
+
+ %.o: %.cpp
+- $(CXX) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $<
++ $(CXX) $(CXXFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $<
+
+ %.o: %.cxx
+- $(CXX) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $<
++ $(CXX) $(CXXFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $<
+
+ %.o: %.c
+ $(CC) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $<