Skip site navigation (1)Skip section navigation (2)
Date:      Mon,  2 Jan 2006 10:47:45 -0600 (CST)
From:      Erik Greenwald <erik@smluc.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        erik@math.missouristate.edu
Subject:   ports/91228: [Maintainer Update] devel/gauche-sdl fixed compiler error
Message-ID:  <20060102164745.00E521CE44@phoenix.smluc.org>
Resent-Message-ID: <200601021650.k02Go3Oj060039@freefall.freebsd.org>

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

>Number:         91228
>Category:       ports
>Synopsis:       [Maintainer Update]  devel/gauche-sdl  fixed compiler error
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 02 16:50:02 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Erik Greenwald
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD fenris 6.0-STABLE FreeBSD 6.0-STABLE #2: Fri Nov 4 19:18:58 EST 2005 root@fenris:/usr/obj/usr/src/sys/FENRIS i386

>Description:

devel/gauche-sdl was broken after a lang/gauche update due to
changes in how strings are internally represented. This updates
string access in the stub files, allowing it to compile again. (the
gfx subdir is still not fixed, so it's being forcefully bypassed).

(author will be notified as soon as I get a pr # to give him)

Thanks

>How-To-Repeat:
>Fix:

--- devel_gauche-sdl.patch begins here ---
Index: devel/gauche-sdl/Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/gauche-sdl/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- devel/gauche-sdl/Makefile	21 Nov 2005 01:20:32 -0000	1.9
+++ devel/gauche-sdl/Makefile	2 Jan 2006 16:37:44 -0000
@@ -19,8 +19,6 @@
 RUN_DEPENDS=	gosh:${PORTSDIR}/lang/gauche \
 		${X11BASE}/lib/X11/rgb.txt:${X_CLIENTS_PORT}
 
-BROKEN=		Does not compile
-
 PLIST_SUB=	GAUCHE_VERSION="`gauche-config -V`"\
 		TARGET="${CONFIGURE_TARGET}"
 WRKSRC=		${WRKDIR}/${PORTFAKENAME}
@@ -40,5 +38,7 @@
 			-e "s|SDL/SDL|SDL|g"\
 			-e "s|%%SDL_CFLAGS%%|`${SDL_CONFIG} --cflags`|"\
 			${WRKSRC}/configure
+		${REINPLACE_CMD} -e "s|^CFLAGS.*|& `${SDL_CONFIG} --cflags`|" \
+			${WRKSRC}/src/gfx/Makefile.in
 
 .include <bsd.port.mk>
Index: devel/gauche-sdl/files/patch-configure
===================================================================
RCS file: /home/ncvs/ports/devel/gauche-sdl/files/patch-configure,v
retrieving revision 1.1
diff -u -r1.1 patch-configure
--- devel/gauche-sdl/files/patch-configure	2 Mar 2004 16:56:35 -0000	1.1
+++ devel/gauche-sdl/files/patch-configure	2 Jan 2006 16:37:44 -0000
@@ -1,14 +1,62 @@
---- configure.orig	Sun Feb 15 16:47:50 2004
-+++ configure	Sun Feb 15 16:49:38 2004
-@@ -777,6 +777,8 @@
+--- configure.orig	Tue Jan 21 23:22:40 2003
++++ configure	Mon Jan  2 04:06:03 2006
+@@ -737,7 +737,7 @@
+ fi
+ echo "$ac_t""$CPP" 1>&6
+ 
+-for ac_hdr in SDL/SDL.h
++for ac_hdr in SDL.h
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+@@ -777,8 +777,10 @@
  fi
  done
  
 +MYLAMEOLDCPPFLAGS="${CPPFLAGS}"
-+CPPFLAGS="${CPPFLAGS} %%SDL_CFLAGS%%"
++CPPFLAGS="${CPPFLAGS} -I/usr/local/include/SDL11 -I/usr/local/include -D_REENTRANT"
+ 
+-for ac_hdr in SDL/SDL_framerate.h
++for ac_hdr in SDL_framerate.h
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+@@ -812,7 +814,7 @@
+   cat >> confdefs.h <<EOF
+ #define $ac_tr_hdr 1
+ EOF
+- HAVE_SDL_GFX=1
++# HAVE_SDL_GFX=1
+ else
+   echo "$ac_t""no" 1>&6
+ fi
+@@ -820,7 +822,7 @@
+ 
+ 
+ 
+-for ac_hdr in SDL/SDL_image.h
++for ac_hdr in SDL_image.h
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+@@ -862,7 +864,7 @@
+ 
+ 
+ 
+-for ac_hdr in SDL/SDL_mixer.h
++for ac_hdr in SDL_mixer.h
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+@@ -904,7 +906,7 @@
+ 
+ 
  
- for ac_hdr in SDL/SDL_framerate.h
+-for ac_hdr in SDL/SDL_ttf.h
++for ac_hdr in SDL_ttf.h
  do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 @@ -944,7 +946,7 @@
  fi
  done
Index: devel/gauche-sdl/files/patch-src::image::sdl-image-lib.stub
===================================================================
RCS file: devel/gauche-sdl/files/patch-src::image::sdl-image-lib.stub
diff -N devel/gauche-sdl/files/patch-src::image::sdl-image-lib.stub
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ devel/gauche-sdl/files/patch-src::image::sdl-image-lib.stub	2 Jan 2006 16:37:44 -0000
@@ -0,0 +1,20 @@
+--- src/image/sdl-image-lib.stub.orig	Mon Jan  2 04:11:06 2006
++++ src/image/sdl-image-lib.stub	Mon Jan  2 04:11:38 2006
+@@ -61,7 +61,7 @@
+ (define-cproc img-load (file::<string>)
+   "ScmSdlSurface *s = SCM_NEW(ScmSdlSurface);
+    SCM_SET_CLASS(s, SCM_CLASS_SDL_SURFACE);
+-   s->surface = IMG_Load((const char *)(SCM_STRING(file)->start));
++   s->surface = IMG_Load((const char *)(SCM_STRING_START(file)));
+ 
+    if (s->surface == NULL) SCM_RETURN(SCM_UNDEFINED);
+ 
+@@ -82,7 +82,7 @@
+   "ScmSdlSurface *s = SCM_NEW(ScmSdlSurface);
+    SCM_SET_CLASS(s, SCM_CLASS_SDL_SURFACE);
+    s->surface = IMG_LoadTyped_RW(src, 0,
+-                                 (char *)(SCM_STRING(type)->start));
++                                 (char *)(SCM_STRING_START(type)));
+ 
+    if (s->surface == NULL) SCM_RETURN(SCM_UNDEFINED);
+ 
Index: devel/gauche-sdl/files/patch-src::sdl-lib.stub
===================================================================
RCS file: devel/gauche-sdl/files/patch-src::sdl-lib.stub
diff -N devel/gauche-sdl/files/patch-src::sdl-lib.stub
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ devel/gauche-sdl/files/patch-src::sdl-lib.stub	2 Jan 2006 16:37:44 -0000
@@ -0,0 +1,60 @@
+--- src/sdl-lib.stub.orig	Mon Feb 24 21:20:18 2003
++++ src/sdl-lib.stub	Sat Dec 31 13:22:35 2005
+@@ -868,7 +868,7 @@
+ (define-cproc sdl-load-bmp (file::<string>)
+   "ScmSdlSurface *s = SCM_NEW(ScmSdlSurface);
+    SCM_SET_CLASS(s, SCM_CLASS_SDL_SURFACE);
+-   s->surface = SDL_LoadBMP((const char *)(SCM_STRING(file)->start));
++   s->surface = SDL_LoadBMP((const char *)(SCM_STRING_START(file)));
+ 
+    if (s->surface == NULL) SCM_RETURN(SCM_UNDEFINED);
+ 
+@@ -876,7 +876,7 @@
+    SCM_RETURN(SCM_OBJ(s));")
+ 
+ (define-cproc sdl-save-bmp (surface::<sdl-surface> file::<string>)
+-  "int result = SDL_SaveBMP(surface, (const char *)(SCM_STRING(file)->start));
++  "int result = SDL_SaveBMP(surface, (const char *)(SCM_STRING_START(file)));
+    SCM_RETURN(SCM_MAKE_INT(result));")
+ 
+ (define-cproc sdl-set-color-key (surface::<sdl-surface> flag::<uint> key::<uint>)
+@@ -950,7 +950,7 @@
+   (return <int> "SDL_ShowCursor"))
+ 
+ (define-cproc sdl-gl-load-library (path::<string>)
+-  "int result = SDL_GL_LoadLibrary((const char *)(SCM_STRING(path)->start));
++  "int result = SDL_GL_LoadLibrary((const char *)(SCM_STRING_START(path)));
+    SCM_RETURN(SCM_MAKE_INT(result));")
+ 
+ ;; MISSING:
+@@ -1055,8 +1055,8 @@
+ ;;
+ 
+ (define-cproc sdl-wm-set-caption (title::<string> icon::<string>)
+-  "SDL_WM_SetCaption((const char *)(SCM_STRING(title)->start),
+-                     (const char *)(SCM_STRING(icon)->start));
++  "SDL_WM_SetCaption((const char *)(SCM_STRING_START(title)),
++                     (const char *)(SCM_STRING_START(icon)));
+    SCM_RETURN(SCM_UNDEFINED);")
+ 
+ (define-cproc sdl-wm-get-caption ()
+@@ -1269,7 +1269,7 @@
+    SCM_SET_CLASS(w, SCM_CLASS_SDL_WAV);
+    spec = &(SCM_SDL_WAV_SPEC(w));
+ 
+-   spec = SDL_LoadWAV((const char *)(SCM_STRING(file)->start), spec, &buffer,
++   spec = SDL_LoadWAV((const char *)(SCM_STRING_START(file)), spec, &buffer,
+                       &len);
+ 
+    SCM_SDL_WAV_BUFFER(w) = Scm_MakeU8VectorFromArrayShared(len, buffer);
+@@ -1384,8 +1384,8 @@
+ (define-cproc sdl-rw-from-file (file::<string> mode::<string>)
+   "ScmSdlRWops *rw = SCM_NEW(ScmSdlRWops);
+    SCM_SET_CLASS(rw, SCM_CLASS_SDL_RWOPS);
+-   rw->rwops = SDL_RWFromFile((const char *)(SCM_STRING(file)->start),
+-                              (const char *)(SCM_STRING(mode)->start));
++   rw->rwops = SDL_RWFromFile((const char *)(SCM_STRING_START(file)),
++                              (const char *)(SCM_STRING_START(mode)));
+ 
+    if (rw->rwops == NULL) SCM_RETURN(SCM_UNDEFINED);
+ 
--- devel_gauche-sdl.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



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