Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Oct 2004 02:01:19 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/72321: Update port: graphics/gliv
Message-ID:  <20041005020119.3f5c91a3.tkato432@yahoo.com>
Resent-Message-ID: <200410041710.i94HAWXW077290@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         72321
>Category:       ports
>Synopsis:       Update port: graphics/gliv
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 04 17:10:32 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 4.10-RELEASE-p3 i386
>Organization:
>Environment:
>Description:
- Fix build on 4-stable with system compiler

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/graphics/gliv/Makefile graphics/gliv/Makefile
--- /usr/ports/graphics/gliv/Makefile	Fri Oct  1 02:06:44 2004
+++ graphics/gliv/Makefile	Fri Oct  1 02:11:52 2004
@@ -16,7 +16,6 @@
 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 -urN /usr/ports/graphics/gliv/files/patch-src::collection.c graphics/gliv/files/patch-src::collection.c
--- /usr/ports/graphics/gliv/files/patch-src::collection.c	Sun Aug  8 04:14:35 2004
+++ graphics/gliv/files/patch-src::collection.c	Thu Sep 30 20:46:28 2004
@@ -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");
+ }
+ 
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041005020119.3f5c91a3.tkato432>