aboutsummaryrefslogtreecommitdiff
path: root/graphics/gliv
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2004-10-12 12:05:44 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2004-10-12 12:05:44 +0000
commit148951396824ed94ab0ef74b1a9333a21bfcfcab (patch)
tree7dab8c39f5c5af7f3c3a3042b570bb7fe5b54190 /graphics/gliv
parentf45e4648af5e8fa664319ab5e784a78e48990d11 (diff)
downloadports-148951396824ed94ab0ef74b1a9333a21bfcfcab.tar.gz
ports-148951396824ed94ab0ef74b1a9333a21bfcfcab.zip
Notes
Diffstat (limited to 'graphics/gliv')
-rw-r--r--graphics/gliv/Makefile1
-rw-r--r--graphics/gliv/files/patch-src::collection.c87
2 files changed, 86 insertions, 2 deletions
diff --git a/graphics/gliv/Makefile b/graphics/gliv/Makefile
index 0d7f1236cb6e..3024c9d92ac4 100644
--- a/graphics/gliv/Makefile
+++ b/graphics/gliv/Makefile
@@ -16,7 +16,6 @@ COMMENT= An image viewer that uses Gdk-Pixbuf and OpenGL
LIB_DEPENDS= gtkglext-x11-1.0.2:${PORTSDIR}/x11-toolkits/gtkglext
USE_BZIP2= yes
-USE_GCC= 3.4
USE_X_PREFIX= yes
USE_GL= yes
USE_GETOPT_LONG= yes
diff --git a/graphics/gliv/files/patch-src::collection.c b/graphics/gliv/files/patch-src::collection.c
index b9e0e10ada7d..1f046e57c2ce 100644
--- a/graphics/gliv/files/patch-src::collection.c
+++ b/graphics/gliv/files/patch-src::collection.c
@@ -1,5 +1,5 @@
--- src/collection.c.orig Thu Jul 29 06:40:56 2004
-+++ src/collection.c Thu Aug 5 01:05:38 2004
++++ src/collection.c Thu Sep 30 20:46:04 2004
@@ -77,6 +77,7 @@
* are '\0' terminated strings representing decimal numbers.
*/
@@ -8,3 +8,88 @@
#include <sys/mman.h> /* mmap(), PROT_READ, MAP_PRIVATE, ... */
#include <stdio.h> /* FILE, fopen(), fread(), fwrite(), ... */
#include <string.h> /* strlen(), strrchr() */
+@@ -638,8 +639,8 @@
+ guchar *base;
+ guchar *ptr;
+ guchar *end;
+- };
+- };
++ } s;
++ } u;
+ };
+
+ static void free_buffer(struct coll_src *source, guchar * buffer)
+@@ -655,16 +656,16 @@
+
+ if (source->is_file) {
+ data = g_new(guchar, length);
+- if (fread(data, 1, length, source->file) != length) {
++ if (fread(data, 1, length, source->u.file) != length) {
+ g_free(data);
+ return NULL;
+ }
+ } else {
+- if (source->ptr + length > source->end)
++ if (source->u.s.ptr + length > source->u.s.end)
+ return NULL;
+
+- data = source->ptr;
+- source->ptr += length;
++ data = source->u.s.ptr;
++ source->u.s.ptr += length;
+ }
+
+ if (is_string && data[length - 1] != '\0') {
+@@ -678,12 +679,12 @@
+ static gint read_char(struct coll_src *source)
+ {
+ if (source->is_file)
+- return fgetc(source->file);
++ return fgetc(source->u.file);
+
+- if (source->ptr >= source->end)
++ if (source->u.s.ptr >= source->u.s.end)
+ return EOF;
+
+- return *(source->ptr++);
++ return *(source->u.s.ptr++);
+ }
+
+ static GdkPixbufDestroyNotify destroy_func(struct coll_src *source)
+@@ -855,22 +856,22 @@
+ goto no_mmap;
+ }
+
+- source->base = mmap(NULL, length, PROT_READ, MAP_PRIVATE, fileno(file), 0);
+- if (source->base == MAP_FAILED) {
++ source->u.s.base = mmap(NULL, length, PROT_READ, MAP_PRIVATE, fileno(file), 0);
++ if (source->u.s.base == MAP_FAILED) {
+ perror("mmap");
+ goto no_mmap;
+ }
+
+ source->is_file = FALSE;
+- source->ptr = source->base;
+- source->end = source->base + length;
++ source->u.s.ptr = source->u.s.base;
++ source->u.s.end = source->u.s.base + length;
+ goto ok;
+
+ no_mmap:
+ fseeko(file, 0, SEEK_SET);
+
+ source->is_file = TRUE;
+- source->file = file;
++ source->u.file = file;
+
+ ok:
+ return source;
+@@ -879,7 +880,7 @@
+ static void destroy_source(struct coll_src *source, gboolean ok)
+ {
+ if (ok == FALSE && source->is_file == FALSE)
+- if (munmap(source->base, source->end - source->base) < 0)
++ if (munmap(source->u.s.base, source->u.s.end - source->u.s.base) < 0)
+ perror("munmap");
+ }
+