summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <nerdboy@gentoo.org>2008-05-20 00:37:34 +0000
committerSteve Arnold <nerdboy@gentoo.org>2008-05-20 00:37:34 +0000
commita9e02ade32479ae19a9f3da58e0339e2196fc17a (patch)
tree638b3a8a3615267a71a376ebe78c83617d31bbd1 /sci-libs/gdal/files
parentInitial ebuild. (diff)
downloadhistorical-a9e02ade32479ae19a9f3da58e0339e2196fc17a.tar.gz
historical-a9e02ade32479ae19a9f3da58e0339e2196fc17a.tar.bz2
historical-a9e02ade32479ae19a9f3da58e0339e2196fc17a.zip
Added new version and updated for gcc 4.3 with contributed patches
Package-Manager: portage-2.1.5_rc6
Diffstat (limited to 'sci-libs/gdal/files')
-rw-r--r--sci-libs/gdal/files/gdal-1.5.1-max-min.patch114
-rw-r--r--sci-libs/gdal/files/gdal-1.5.1-python-install.patch14
2 files changed, 128 insertions, 0 deletions
diff --git a/sci-libs/gdal/files/gdal-1.5.1-max-min.patch b/sci-libs/gdal/files/gdal-1.5.1-max-min.patch
new file mode 100644
index 000000000000..e2775b301802
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-1.5.1-max-min.patch
@@ -0,0 +1,114 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## max.dpatch by Francesco Paolo Lovergine <frankie@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad gdal-1.5.1~/ogr/ogrsf_frmts/geojson/jsonc/arraylist.c gdal-1.5.1/ogr/ogrsf_frmts/geojson/jsonc/arraylist.c
+--- gdal-1.5.1~/ogr/ogrsf_frmts/geojson/jsonc/arraylist.c 2007-11-07 05:00:48.000000000 +0100
++++ gdal-1.5.1/ogr/ogrsf_frmts/geojson/jsonc/arraylist.c 2008-04-07 13:26:42.000000000 +0200
+@@ -23,6 +23,8 @@
+ #include "bits.h"
+ #include "arraylist.h"
+
++#include <cpl_port.h> /* MIN and MAX macros */
++
+ struct array_list*
+ array_list_new(array_list_free_fn *free_fn)
+ {
+@@ -62,7 +64,7 @@
+ int new_size;
+
+ if(max < this->size) return 0;
+- new_size = max(this->size << 1, max);
++ new_size = MAX(this->size << 1, max);
+ if(!(t = realloc(this->array, new_size*sizeof(void*)))) return -1;
+ this->array = t;
+ (void)memset(this->array + this->size, 0, (new_size-this->size)*sizeof(void*));
+diff -urNad gdal-1.5.1~/ogr/ogrsf_frmts/geojson/jsonc/bits.h gdal-1.5.1/ogr/ogrsf_frmts/geojson/jsonc/bits.h
+--- gdal-1.5.1~/ogr/ogrsf_frmts/geojson/jsonc/bits.h 2007-11-07 05:00:48.000000000 +0100
++++ gdal-1.5.1/ogr/ogrsf_frmts/geojson/jsonc/bits.h 2008-04-07 13:25:45.000000000 +0200
+@@ -12,14 +12,6 @@
+ #ifndef _bits_h_
+ #define _bits_h_
+
+-#ifndef min
+-#define min(a,b) ((a) < (b) ? (a) : (b))
+-#endif
+-
+-#ifndef max
+-#define max(a,b) ((a) > (b) ? (a) : (b))
+-#endif
+-
+ #define hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9)
+ #define error_ptr(error) ((void*)error)
+ #define is_error(ptr) ((unsigned long)ptr > (unsigned long)-4000L)
+diff -urNad gdal-1.5.1~/ogr/ogrsf_frmts/geojson/jsonc/json_tokener.c gdal-1.5.1/ogr/ogrsf_frmts/geojson/jsonc/json_tokener.c
+--- gdal-1.5.1~/ogr/ogrsf_frmts/geojson/jsonc/json_tokener.c 2007-11-07 12:51:17.000000000 +0100
++++ gdal-1.5.1/ogr/ogrsf_frmts/geojson/jsonc/json_tokener.c 2008-04-07 13:30:21.000000000 +0200
+@@ -23,6 +23,7 @@
+ #include "json_object.h"
+ #include "json_tokener.h"
+
++#include <cpl_port.h> /* MIN and MAX macros */
+
+ #if !HAVE_STRNCASECMP && defined(_MSC_VER)
+ /* MSC has the version as _strnicmp */
+@@ -106,7 +107,7 @@
+ {
+ if(str) {
+ size_t len = strlen(str);
+- size_t nn = min(len,n);
++ size_t nn = MIN(len,n);
+ char* s = (char*)malloc(sizeof(char) * (nn + 1));
+
+ if(s) {
+@@ -230,7 +231,7 @@
+ case json_tokener_state_null:
+ printbuf_memappend(tok->pb, &c, 1);
+ if(strncasecmp(json_null_str, tok->pb->buf,
+- min(tok->st_pos+1, strlen(json_null_str))) == 0) {
++ MIN(tok->st_pos+1, strlen(json_null_str))) == 0) {
+ if(tok->st_pos == strlen(json_null_str)) {
+ current = NULL;
+ saved_state = json_tokener_state_finish;
+@@ -351,7 +352,7 @@
+ case json_tokener_state_boolean:
+ printbuf_memappend(tok->pb, &c, 1);
+ if(strncasecmp(json_true_str, tok->pb->buf,
+- min(tok->st_pos+1, strlen(json_true_str))) == 0) {
++ MIN(tok->st_pos+1, strlen(json_true_str))) == 0) {
+ if(tok->st_pos == strlen(json_true_str)) {
+ current = json_object_new_boolean(1);
+ saved_state = json_tokener_state_finish;
+@@ -359,7 +360,7 @@
+ goto redo_char;
+ }
+ } else if(strncasecmp(json_false_str, tok->pb->buf,
+- min(tok->st_pos+1, strlen(json_false_str))) == 0) {
++ MIN(tok->st_pos+1, strlen(json_false_str))) == 0) {
+ if(tok->st_pos == strlen(json_false_str)) {
+ current = json_object_new_boolean(0);
+ saved_state = json_tokener_state_finish;
+diff -urNad gdal-1.5.1~/ogr/ogrsf_frmts/geojson/jsonc/printbuf.c gdal-1.5.1/ogr/ogrsf_frmts/geojson/jsonc/printbuf.c
+--- gdal-1.5.1~/ogr/ogrsf_frmts/geojson/jsonc/printbuf.c 2007-12-02 19:32:25.000000000 +0100
++++ gdal-1.5.1/ogr/ogrsf_frmts/geojson/jsonc/printbuf.c 2008-04-07 13:27:06.000000000 +0200
+@@ -28,6 +28,8 @@
+
+ #include "cpl_string.h"
+
++#include <cpl_port.h> /* MIN and MAX macros */
++
+ struct printbuf* printbuf_new()
+ {
+ struct printbuf *p;
+@@ -47,7 +49,7 @@
+ {
+ char *t;
+ if(p->size - p->bpos <= size) {
+- int new_size = max(p->size * 2, p->bpos + size + 8);
++ int new_size = MAX(p->size * 2, p->bpos + size + 8);
+ #ifdef PRINTBUF_DEBUG
+ mc_debug("printbuf_memappend: realloc "
+ "bpos=%d wrsize=%d old_size=%d new_size=%d\n",
diff --git a/sci-libs/gdal/files/gdal-1.5.1-python-install.patch b/sci-libs/gdal/files/gdal-1.5.1-python-install.patch
new file mode 100644
index 000000000000..fd1b7e488cdc
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-1.5.1-python-install.patch
@@ -0,0 +1,14 @@
+--- swig/python/GNUmakefile.orig 2008-02-02 17:00:52.000000000 -0800
++++ swig/python/GNUmakefile 2008-02-02 17:02:03.000000000 -0800
+@@ -51,9 +51,9 @@
+ install:
+
+ ifeq ($(PY_HAVE_SETUPTOOLS),1)
+- $(PYTHON) setup.py install
++ $(PYTHON) setup.py install --root=$(DESTDIR)
+ else
+- $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
++ $(PYTHON) setup.py install --root=$(DESTDIR) --prefix=$(prefix)
+ endif
+
+ for f in $(SCRIPTS) ; do $(INSTALL) ./scripts/$$f $(DESTDIR)$(INST_BIN) ; done