1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

Fix the build on 4.X.

This commit is contained in:
Joe Marcus Clarke 2005-05-07 04:42:52 +00:00
parent 1fef869d75
commit e0789cda59
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=134749
2 changed files with 55 additions and 7 deletions

View File

@ -36,14 +36,8 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
INFO= gcompris
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
BROKEN= "Does not compile on FreeBSD 4.x"
.endif
post-patch:
@${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} ${REINPLACE_CMD} -e \
's|-DGNOME_DISABLE_DEPRECATED||g'
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -0,0 +1,54 @@
--- src/gcompris/anim.c.orig Sat May 7 00:02:54 2005
+++ src/gcompris/anim.c Sat May 7 00:04:16 2005
@@ -33,6 +33,14 @@ static gboolean anim_tick(void*);
GcomprisAnimation *gcompris_load_animation(char *filename)
{
FILE *f;
+ char tmp[100];
+ GSList *files = NULL;
+ GcomprisAnimation *anim = NULL;
+ /* open the animations and assign them */
+ GError *error = NULL;
+ GSList *cur;
+ char *name;
+ int i;
if(filename[0] == '/') /* we were probably called by load_animation_asset */
{
f = fopen(filename, "r");
@@ -50,9 +58,6 @@ GcomprisAnimation *gcompris_load_animati
return NULL;
}
- char tmp[100];
- GSList *files = NULL;
- GcomprisAnimation *anim = NULL;
/* read filenames, one per line, from the animation spec-file */
while(fscanf(f, "%99s", tmp) == 1)
@@ -65,11 +70,6 @@ GcomprisAnimation *gcompris_load_animati
anim->numstates = g_slist_length(files);
anim->anim = g_malloc(sizeof(GdkPixbuf*) * anim->numstates);
- /* open the animations and assign them */
- GError *error = NULL;
- GSList *cur;
- char *name;
- int i;
for(cur=files, i=0; cur; cur = g_slist_next(cur), i++)
{
name = (char*) cur->data;
@@ -169,13 +169,13 @@ void gcompris_set_anim_state(GcomprisAni
static gboolean anim_tick(void *ignore)
{
+ GSList *cur;
if(active == NULL)
{
printf("deactivating anim_tick\n");
return FALSE;
}
- GSList *cur;
for(cur=active; cur; cur = g_slist_next(cur))
{
GcomprisAnimCanvasItem *a = (GcomprisAnimCanvasItem*)cur->data;