From gahr@gahr.ch  Mon Dec 17 21:41:06 2007
Return-Path: <gahr@gahr.ch>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5F4DF16A419
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Dec 2007 21:41:06 +0000 (UTC)
	(envelope-from gahr@gahr.ch)
Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73])
	by mx1.freebsd.org (Postfix) with ESMTP id F11A513C467
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Dec 2007 21:41:05 +0000 (UTC)
	(envelope-from gahr@gahr.ch)
Received: from 80-218-191-236.dclient.hispeed.ch ([80.218.191.236] helo=gahrtop.localhost)
	by cpanel03.rubas-s03.net with esmtpa (Exim 4.68)
	(envelope-from <gahr@gahr.ch>)
	id 1J4Nhx-00025V-5X
	for FreeBSD-gnats-submit@freebsd.org; Mon, 17 Dec 2007 22:41:05 +0100
Received: from gahrtop.localhost (localhost [127.0.0.1])
	by gahrtop.localhost (Postfix) with ESMTP id 496A473070
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Dec 2007 22:39:36 +0100 (CET)
Message-Id: <1197927576.76442@gahrtop.localhost>
Date: Mon, 17 Dec 2007 22:39:36 +0100
From: "Pietro Cerutti" <gahr@gahr.ch>
To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@freebsd.org>
Subject: [patch] french/gfaim unbreak fix build with GCC 4.2 + adopt maintainship
X-Send-Pr-Version: gtk-send-pr 0.4.8 
X-GNATS-Notify:

>Number:         118794
>Category:       ports
>Synopsis:       [patch] french/gfaim unbreak fix build with GCC 4.2 + adopt maintainship
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 17 21:50:01 UTC 2007
>Closed-Date:    Tue Dec 18 18:41:52 UTC 2007
>Last-Modified:  Tue Dec 18 18:50:03 UTC 2007
>Originator:     Pietro Cerutti
>Release:        FreeBSD 8.0-CURRENT i386
>Organization:
>Environment:


System: FreeBSD 8.0-CURRENT #17: Thu Dec 13 11:23:40 CET 2007
    root@gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034



>Description:


The following patch:

- adds a mastersite (official)
- fixes build with GCC 4.2 (cast used as lvalue problem)
- fixes a problem due to sizeof(int) != sizeof(int *) on certain platform
- sets maintainship to me

Tested on:

- 8.0-CURRENT i386
- 7.0-BETA3 sparc64


>How-To-Repeat:





>Fix:


--- _gfaim.diff begins here ---
--- Makefile.orig	2007-12-17 22:03:53.000000000 +0100
+++ Makefile	2007-12-17 22:13:54.000000000 +0100
@@ -9,10 +9,11 @@
 PORTVERSION=	0.30
 PORTREVISION=	3
 CATEGORIES=	french
-MASTER_SITES=	http://sheepkiller.nerim.net/ports/${PORTNAME}/ \
+MASTER_SITES=	http://freeperso.free.fr/ \
+		http://sheepkiller.nerim.net/ports/${PORTNAME}/ \
 		http://www.cultdeadsheep.org/FreeBSD/ports/download/distfiles/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	gahr@gahr.ch
 COMMENT=	Gfaim est un logiciel de recherche de recettes de cuisine
 
 USE_X_PREFIX=	yes
@@ -29,10 +30,4 @@
 MAKE_ENV+=	NOPORTDOCS=yes
 .endif
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 700042
-BROKEN=		Broken with gcc 4.2
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
--- /dev/null	2007-12-17 22:37:23.000000000 +0100
+++ files/patch-gfaim.c	2007-12-17 22:37:43.000000000 +0100
@@ -0,0 +1,46 @@
+--- gfaim.c.orig	2000-11-21 20:58:42.000000000 +0100
++++ gfaim.c	2007-12-17 22:37:41.000000000 +0100
+@@ -1142,7 +1142,7 @@
+       champs=g_strsplit(buf,":",0);
+ 
+ /*le numero de la recette*/
+-      plist[i].numero=atoi(champs[0]);
++      plist[i].numero= atoi(champs[0]);
+ 
+ /*le nom de la recette*/
+       strcpy(buffer,champs[1]);
+@@ -1188,7 +1188,7 @@
+     
+ /*recherche de rlibelle dans buf*/
+     
+-     (int *) loc = strcasestr(buf,rlibelle);
++     loc = strcasestr(buf,rlibelle);
+     
+ /* si c'est zero je passe*/
+        if (loc != NULL) 
+@@ -1203,7 +1203,7 @@
+ 
+               gtk_clist_append( (GtkCList *) data,texte[0]);
+ /*accroche numero au titre de la recette comme index*/	      
+-	      gtk_clist_set_row_data(GTK_CLIST(liste),ligne,(int *) plist[k].numero);
++	      gtk_clist_set_row_data(GTK_CLIST(liste),ligne, &plist[k].numero);
+ 	      ligne++;
+               g_free(label);
+ 
+@@ -1242,12 +1242,12 @@
+ {
+     gchar *text = NULL;
+ 
+-   int position;
++   int *position;
+         
+ /* renseigne les variables de la position de la recette */
+-    (int *) position=gtk_clist_get_row_data(GTK_CLIST(liste),row);
+-    vdebut=plist[position].rdebut;
+-    vfin=plist[position].rfin;
++    position=gtk_clist_get_row_data(GTK_CLIST(liste),row);
++    vdebut=plist[*position].rdebut;
++    vfin=plist[*position].rfin;
+ 
+ /*affiche la recette*/
+     charge_recette(vdebut,vfin);
--- _gfaim.diff ends here ---



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Dec 17 21:50:09 UTC 2007 
Responsible-Changed-Why:  
miwi@ wants his PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118794 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Tue Dec 18 18:41:51 UTC 2007 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118794 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/118794: commit references a PR
Date: Tue, 18 Dec 2007 18:41:55 +0000 (UTC)

 miwi        2007-12-18 18:41:43 UTC
 
   FreeBSD ports repository
 
   Modified files:
     french/gfaim         Makefile 
   Added files:
     french/gfaim/files   patch-gfaim.c 
   Log:
   - Update MASTER_SITES
   - Fix build with gcc 4.2
   - Pass maintainership to submitter
   
   PR:             118794
   Submitted by:   Pietro Cerutti <gahr@gahr.ch>
   
   Revision  Changes    Path
   1.16      +5 -10     ports/french/gfaim/Makefile
   1.1       +46 -0     ports/french/gfaim/files/patch-gfaim.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
