From nobody@FreeBSD.org  Fri Mar 29 05:25:29 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id AB95B820
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 29 Mar 2013 05:25:29 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 9CEBCC32
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 29 Mar 2013 05:25:29 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r2T5PSPc042859
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 29 Mar 2013 05:25:28 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r2T5PS8d042858;
	Fri, 29 Mar 2013 05:25:28 GMT
	(envelope-from nobody)
Message-Id: <201303290525.r2T5PS8d042858@red.freebsd.org>
Date: Fri, 29 Mar 2013 05:25:28 GMT
From: AN <andy@neu.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: dia-0.97.2,1 fails to start
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         177462
>Category:       ports
>Synopsis:       graphics/dia: dia-0.97.2,1 fails to start
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnome
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 29 05:30:04 UTC 2013
>Closed-Date:    Wed Apr 17 11:28:55 UTC 2013
>Last-Modified:  Wed Apr 17 11:30:00 UTC 2013
>Originator:     AN
>Release:        10-current
>Organization:
>Environment:
FreeBSD FBSD10 10.0-CURRENT FreeBSD 10.0-CURRENT #56 r248862: Thu Mar 28 23:23:25 EDT 2013     root@FBSD10:/usr/obj/usr/src/sys/MYKERNEL  amd64
>Description:
dia fails to start from the Gnome menu or the command line.  Splash screen appears for about 1 second then disappears.  No info or error on command line or in log file.  Also reported by another user.
>How-To-Repeat:
type dia on command line
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gnome 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Mar 29 22:33:14 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: Golyashov Sergey <svvord@ulona.org>
To: bug-followup@freebsd.org, andy@neu.net
Cc:  
Subject: Re: ports/177462: graphics/dia: dia-0.97.2,1 fails to start
Date: Tue, 09 Apr 2013 17:55:45 +1100

 Backtrace from [work dia]/objects/custom/shape_typeinfo.c:shape_typeinfo_load -> g_fopen -> fopen
 
 /usr/src/lib/libc/stdio/fopen.c:
 <<<===
 (gdb) n
 99      }
 (gdb) l
 94               * fseek and ftell.)
 95               */
 96              if (oflags & O_APPEND)
 97                      (void)_sseek(fp, (fpos_t)0, SEEK_END);
 98              return (fp);
 99      }
 (gdb) print fp
 $17 = (FILE *) 0x807eb0740
 (gdb) n
 shape_typeinfo_load (info=0x80a3ead00) at shape_typeinfo.c:200
 200       if (!f)
 (gdb) print f
 $18 = (FILE *) 0x7eb0740
 ===>>>
 
 fopen return (FILE *) 0x807eb0740 but g_fopen return (FILE *) 0x7eb0740
 
 So after call fread:
 
 Program received signal SIGSEGV, Segmentation fault.
 __fread (buf=0x7fffffffce20, size=512, count=1, fp=0x7eb0740) at /usr/src/lib/libc/stdio/fread.c:95
 95              ORIENT(fp, -1);
 
 This patch solves problem for me:
 
 --- objects/custom/shape_typeinfo.c.orig	2013-04-09 01:48:15.838095782 +1100
 +++ objects/custom/shape_typeinfo.c	2013-04-09 16:21:37.840874850 +1100
 @@ -196,7 +195,7 @@
      saxHandler.warning = _warning;
      once = TRUE;
    }
 -  f = g_fopen (info->filename, "rb");
 +  f = fopen (info->filename, "rb");
    if (!f)
      return FALSE;
    while ((n = fread (buffer, 1, BLOCKSIZE, f)) > 0) {
 

From: AN <andy@neu.net>
To: Golyashov Sergey <svvord@ulona.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/177462: graphics/dia: dia-0.97.2,1 fails to start
Date: Tue, 9 Apr 2013 10:20:05 -0400 (EDT)

 Hi Golyashov:
 
 Thank you for your reply.  I am not a developer, would you please give me 
 exact instructions for how to apply patch.  Can i copy it to the files 
 directory in /usr/ports/grahics/dia?  What should i name the file?
 
 Thanks in advance.
 
 On Tue, 9 Apr 2013, Golyashov Sergey wrote:
 
 >
 > Backtrace from [work dia]/objects/custom/shape_typeinfo.c:shape_typeinfo_load -> g_fopen -> fopen
 >
 > /usr/src/lib/libc/stdio/fopen.c:
 > <<<===
 > (gdb) n
 > 99      }
 > (gdb) l
 > 94               * fseek and ftell.)
 > 95               */
 > 96              if (oflags & O_APPEND)
 > 97                      (void)_sseek(fp, (fpos_t)0, SEEK_END);
 > 98              return (fp);
 > 99      }
 > (gdb) print fp
 > $17 = (FILE *) 0x807eb0740
 > (gdb) n
 > shape_typeinfo_load (info=0x80a3ead00) at shape_typeinfo.c:200
 > 200       if (!f)
 > (gdb) print f
 > $18 = (FILE *) 0x7eb0740
 > ===>>>
 >
 > fopen return (FILE *) 0x807eb0740 but g_fopen return (FILE *) 0x7eb0740
 >
 > So after call fread:
 >
 > Program received signal SIGSEGV, Segmentation fault.
 > __fread (buf=0x7fffffffce20, size=512, count=1, fp=0x7eb0740) at /usr/src/lib/libc/stdio/fread.c:95
 > 95              ORIENT(fp, -1);
 >
 > This patch solves problem for me:
 >
 > --- objects/custom/shape_typeinfo.c.orig	2013-04-09 01:48:15.838095782 +1100
 > +++ objects/custom/shape_typeinfo.c	2013-04-09 16:21:37.840874850 +1100
 > @@ -196,7 +195,7 @@
 >     saxHandler.warning = _warning;
 >     once = TRUE;
 >   }
 > -  f = g_fopen (info->filename, "rb");
 > +  f = fopen (info->filename, "rb");
 >   if (!f)
 >     return FALSE;
 >   while ((n = fread (buffer, 1, BLOCKSIZE, f)) > 0) {
 >

From: Golyashov Sergey <svvord@ulona.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/177462: graphics/dia: dia-0.97.2,1 fails to start
Date: Wed, 10 Apr 2013 11:51:01 +1100

 This is a multi-part message in MIME format.
 
 --nextPart1820332.NJNNWAKDiQ
 Content-Transfer-Encoding: 7Bit
 Content-Type: text/plain; charset="utf-8"
 
 
 "glib.h" not include "glib/gstdio.h". But "glib/gstdio.h" declares a function g_fopen. Without this declare g_fopen returns integer.
 
 My test compile:
 
 test.c:12:4: warning: incompatible integer to pointer conversion assigning to 'FILE *' (aka 'struct __sFILE *') from 'int' [-Wint-conversion]
         f = g_fopen("test.txt", "rb");
           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
 2 warnings generated.
 
 
 Final patch for port attached to this message.
 
 Regards.
 Sergey Golyashov
 --nextPart1820332.NJNNWAKDiQ
 Content-Disposition: attachment; filename="dia.diff"
 Content-Transfer-Encoding: 7Bit
 Content-Type: text/x-patch; charset="utf-8"; name="dia.diff"
 
 --- Makefile.orig	2013-04-10 11:03:22.536612689 +1100
 +++ Makefile	2013-04-10 11:03:35.365611423 +1100
 @@ -60,7 +60,6 @@
  	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
  		${WRKSRC}/lib/intl.c
  	@${REINPLACE_CMD} -e 's|glib/.*\.h>|glib.h>|g' \
 -		${WRKSRC}/objects/custom/shape_typeinfo.c \
  		${WRKSRC}/tests/test-objects.c \
  		${WRKSRC}/tests/test-boundingbox.c
  .if defined(NOPORTDOCS)
 --- files/patch-shape_typeinfo.c	2013-04-10 11:35:15.720611354 +1100
 +++ files/patch-shape_typeinfo.c	2013-04-10 11:35:15.720719000 +1100
 @@ -0,0 +1,10 @@
 +--- objects/custom/shape_typeinfo.c.orig	2013-04-10 11:22:56.598611165 +1100
 ++++ objects/custom/shape_typeinfo.c	2013-04-10 11:23:18.888611303 +1100
 +@@ -27,6 +27,6 @@
 + #include "custom_util.h"
 + #include <string.h>
 + #include <stdarg.h>
 +-#include <glib/gstrfuncs.h>
 ++#include <glib.h>
 + #include <glib/gstdio.h>
 + #include <libxml/parser.h>
 
 --nextPart1820332.NJNNWAKDiQ--
 
State-Changed-From-To: open->closed 
State-Changed-By: kwm 
State-Changed-When: Wed Apr 17 11:26:58 UTC 2013 
State-Changed-Why:  
Patch based on the patch by Golvashov Sergey was committed to ports. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/177462: commit references a PR
Date: Wed, 17 Apr 2013 11:26:06 +0000 (UTC)

 Author: kwm
 Date: Wed Apr 17 11:25:52 2013
 New Revision: 315957
 URL: http://svnweb.freebsd.org/changeset/ports/315957
 
 Log:
   convert NOPORTDOCS to PORT_OPTIONS:MDOCS
   Switch to desktop-file-utils uses.
   Remove shlib version.
   Fix glib.h header patch so the correct prototype is used, otherwise function
    returns the wrong time [1]
   Move pre-configure section to post-patch.
   
   PR:		ports/177462 [1]
   PR:		ports/177564 [1]
   Submitted by:	AN <andy@neu.net>
   		Luiz Eduardo Roncato Cordeiro <cordeiro@cert.br>
   Based on:	patch from Golyashov Sergey <svvord@ulona.org> in ports/177462
   Feature safe:	yes
 
 Modified:
   head/graphics/dia/Makefile
   head/graphics/dia/pkg-plist
 
 Modified: head/graphics/dia/Makefile
 ==============================================================================
 --- head/graphics/dia/Makefile	Wed Apr 17 10:02:28 2013	(r315956)
 +++ head/graphics/dia/Makefile	Wed Apr 17 11:25:52 2013	(r315957)
 @@ -4,22 +4,22 @@
  
  PORTNAME=	dia
  DISTVERSION=	0.97.2
 +PORTREVISION=	1
  PORTEPOCH=	1
  CATEGORIES=	graphics gnome
  MASTER_SITES=	GNOME
  DIST_SUBDIR=	gnome2
  
 -MAINTAINER?=	gnome@FreeBSD.org
 +MAINTAINER=	gnome@FreeBSD.org
  COMMENT=	Diagram creation program, similar to Visio
  
  LIB_DEPENDS=	popt:${PORTSDIR}/devel/popt \
  		png15:${PORTSDIR}/graphics/png
  
 -USES=		pathfix
 +USES=		pathfix desktop-file-utils
  USE_XZ=		yes
  USE_GMAKE=	yes
 -USE_GNOME=	gtk20 gnomeprefix libxslt libartlgpl2 intlhack \
 -		desktopfileutils
 +USE_GNOME=	gtk20 gnomeprefix libxslt libartlgpl2 intlhack
  INSTALLS_ICONS=	yes
  USE_GETTEXT=	yes
  GNU_CONFIGURE=	yes
 @@ -28,8 +28,9 @@ CONFIGURE_ENV=	LIBS="-L${LOCALBASE}/lib 
  CPPFLAGS+=	-I${LOCALBASE}/include
  CONFIGURE_ARGS=	--disable-gnome
  
 +.include <bsd.port.options.mk>
  
 -.if !defined(NOPORTDOCS)
 +.if ${PORT_OPTIONS:MDOCS}
  BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl
  MAN1=		dia.1
  MANLANG=	"" fr
 @@ -47,7 +48,7 @@ MANLANG=	"" fr
  .include <bsd.port.pre.mk>
  
  .if ${ARCH} == "i386"
 -LIB_DEPENDS+=		EMF.1:${PORTSDIR}/graphics/libemf
 +LIB_DEPENDS+=		EMF:${PORTSDIR}/graphics/libemf
  CONFIGURE_ARGS+=	--enable-libemf
  PLIST_SUB+=		WMF=""
  .else
 @@ -58,11 +59,12 @@ PLIST_SUB+=		WMF="@comment "
  post-patch:
  	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
  		${WRKSRC}/lib/intl.c
 -	@${REINPLACE_CMD} -e 's|glib/.*\.h>|glib.h>|g' \
 +	@${REINPLACE_CMD} -e 's|glib/gstrfuncs.h>|glib.h>|g' \
 +		-e 's|glib/gtestutils.h|glib.h|g' \
  		${WRKSRC}/objects/custom/shape_typeinfo.c \
  		${WRKSRC}/tests/test-objects.c \
  		${WRKSRC}/tests/test-boundingbox.c
 -.if defined(NOPORTDOCS)
 +.if ! ${PORT_OPTIONS:MDOCS}
  	@${REINPLACE_CMD} -e '/SUBDIRS/s|data doc tests|data tests|g' \
  		${WRKSRC}/Makefile.in
  .endif
 @@ -70,13 +72,8 @@ post-patch:
  		${XARGS} ${REINPLACE_CMD} -e \
  		's,\(^GTK_LIBS.*\),\1 ${PTHREAD_LIBS}, ; \
  		 s,\(^GTK_CFLAGS = \),\1 ${PTHREAD_CFLAGS} ,'
 -
 -pre-configure:
  	@${REINPLACE_CMD} -e 's|http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl|${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl| ; \
  		s|echo aout|echo elf|g ; s|/usr/include/libEMF|${LOCALBASE}/include/libEMF|g' \
  		${WRKSRC}/configure
  
 -post-install:
 -	@-update-desktop-database
 -
  .include <bsd.port.post.mk>
 
 Modified: head/graphics/dia/pkg-plist
 ==============================================================================
 --- head/graphics/dia/pkg-plist	Wed Apr 17 10:02:28 2013	(r315956)
 +++ head/graphics/dia/pkg-plist	Wed Apr 17 11:25:52 2013	(r315957)
 @@ -1849,5 +1849,3 @@ share/mime-info/dia.mime
  @dirrmtry man/fr/man1
  @dirrmtry man/fr
  @dirrm lib/dia
 -@exec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true
 -@unexec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
