[Maintainer Update] devel/gauche-sdl fixed compiler error
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) PR: ports/91228 Submitted by: Erik Greenwald <erik@smluc.org>
This commit is contained in:
parent
7f29ea0aec
commit
49123e829b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=152617
4 changed files with 135 additions and 7 deletions
|
@ -19,8 +19,6 @@ BUILD_DEPENDS= gosh:${PORTSDIR}/lang/gauche \
|
|||
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 @@ pre-configure:
|
|||
-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>
|
||||
|
|
|
@ -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/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_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
|
||||
|
|
20
devel/gauche-sdl/files/patch-src::image::sdl-image-lib.stub
Normal file
20
devel/gauche-sdl/files/patch-src::image::sdl-image-lib.stub
Normal file
|
@ -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);
|
||||
|
60
devel/gauche-sdl/files/patch-src::sdl-lib.stub
Normal file
60
devel/gauche-sdl/files/patch-src::sdl-lib.stub
Normal file
|
@ -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);
|
||||
|
Loading…
Reference in a new issue