From root@helo.liwing.de  Tue Apr 20 05:07:32 2004
Return-Path: <root@helo.liwing.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 3007B16A4CE; Tue, 20 Apr 2004 05:07:32 -0700 (PDT)
Received: from helo.liwing.de (helo.liwing.de [213.70.188.163])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 566B243D48; Tue, 20 Apr 2004 05:07:31 -0700 (PDT)
	(envelope-from root@helo.liwing.de)
Received: from helo.liwing.de (localhost.liwing.de [127.0.0.1])
	by helo.liwing.de (8.12.9p2/8.12.9) with ESMTP id i3KC7TUn044463;
	Tue, 20 Apr 2004 12:07:29 GMT
	(envelope-from root@helo.liwing.de)
Received: (from root@localhost)
	by helo.liwing.de (8.12.9p2/8.12.9/Submit) id i3KC7S7P044462;
	Tue, 20 Apr 2004 12:07:28 GMT
	(envelope-from root)
Message-Id: <200404201207.i3KC7S7P044462@helo.liwing.de>
Date: Tue, 20 Apr 2004 12:07:28 GMT
From: Jens Rehsack <rehsack@liwing.de>
Reply-To: Jens Rehsack <rehsack@liwing.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Jens Rehsack <rehsack@liwing.de>, kris@freebsd.org,
	Kato Tsuguru <tkato@pronomail.com>, ports@freebsd.org
Subject: Fixing broken pkg-plist and make it build fine with python-bindings
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         65815
>Category:       ports
>Synopsis:       Fixing broken pkg-plist and make it build fine with python-bindings
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 20 05:10:16 PDT 2004
>Closed-Date:    Fri May 07 15:35:34 PDT 2004
>Last-Modified:  Fri May 07 15:35:34 PDT 2004
>Originator:     Jens Rehsack <rehsack@liwing.de>
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
LiWing IT-Services
>Environment:
System: FreeBSD statler 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sun Apr 4 11:05:15 GMT 2004 root@statler:/usr/obj/usr/src/sys/STATLER i386


	
>Description:
	It seems that in last days/weeks diacanvas2 didn't build fine when
	it has no DISPLAY available. Because of the commiter of my introduced
	port removed the WITH(OUT)_PYTHON, python is required every time
	and maybe that's better.
	But py-gtk testing routine seems to require an X connection, so
	I've borrowed the great stuff from the editors/openoffice port
	to have an virtual X Server if none is available.
>How-To-Repeat:
	
>Fix:

	

--- patch-python-bindings begins here ---
Index: graphics/diacanvas2/Makefile
===================================================================
diff -u graphics/diacanvas2/Makefile.orig graphics/diacanvas2/Makefile
--- graphics/diacanvas2/Makefile.orig	Mon Apr 19 04:22:25 2004
+++ graphics/diacanvas2/Makefile	Tue Apr 20 11:38:37 2004
@@ -18,8 +18,6 @@
 BUILD_DEPENDS=	${PYTHON_SITELIBDIR}/gtk-2.0/gnome/__init__.py:${PORTSDIR}/x11-toolkits/py-gnome2
 RUN_DEPENDS=	${PYTHON_SITELIBDIR}/gtk-2.0/gnome/__init__.py:${PORTSDIR}/x11-toolkits/py-gnome2
 
-BROKEN=		"Broken pkg-plist"
-
 USE_GNOME=	gnomehack libgnomeprint libgnomeprintui libartlgpl2 \
 		libgnomecanvas
 USE_PYTHON=	2.2+
@@ -30,9 +28,33 @@
 		LDFLAGS="-L${LOCALBASE}/lib"
 INSTALLS_SHLIB=	yes
 
+.if !defined(DISPLAY)
+BUILD_DEPENDS+= Xvfb:${PORTSDIR}/x11-servers/XFree86-4-VirtualFramebufferServer
+CONFIGURE_ENV+=	DISPLAY=localhost:1001
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e \
 		's|unit_tests doc|unit_tests|g' ${WRKSRC}/Makefile.in
+
+pre-configure:
+.if exists(${WRKDIR}/.Xvfb.pid)
+	@-${CAT} ${WRKDIR}/.Xvfb.pid | ${XARGS} kill
+	@${RM} -f ${WRKDIR}/.Xvfb.pid
+.endif
+.if !defined(DISPLAY)
+	#
+	# This is a UGLY hack to not have to specify a X-Display.
+	#
+	${X11BASE}/bin/Xvfb :1001 -screen 0 800x600x24 > /dev/null 2>&1 & ${ECHO} $$! > ${WRKDIR}/.Xvfb.pid
+	@sleep 5
+.endif
+
+post-configure:
+.if !defined(DISPLAY)
+	@-${CAT} ${WRKDIR}/.Xvfb.pid | ${XARGS} kill
+	@${RM} -f ${WRKDIR}/.Xvfb.pid
+.endif
 
 post-install:
 .if !defined(NOPORTDOCS)
Index: graphics/diacanvas2/pkg-plist
===================================================================
diff -u graphics/diacanvas2/pkg-plist.orig graphics/diacanvas2/pkg-plist
--- graphics/diacanvas2/pkg-plist.orig	Fri Apr  9 13:48:47 2004
+++ graphics/diacanvas2/pkg-plist	Tue Apr 20 11:55:12 2004
@@ -89,6 +89,6 @@
 share/pygtk/2.0/defs/diageometry.defs
 share/pygtk/2.0/defs/diashape.defs
 share/pygtk/2.0/defs/diaview.defs
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@dirrm %%PORTDOCS%%%%DOCSDIR%%
 @dirrm %%PYTHON_SITELIBDIR%%/diacanvas
 @dirrm include/diacanvas
--- patch-python-bindings ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: thierry 
State-Changed-When: Fri May 7 15:34:40 PDT 2004 
State-Changed-Why:  

Committed, thanks! 

(Remark: pkg-plist not touched.) 


http://www.freebsd.org/cgi/query-pr.cgi?pr=65815 
>Unformatted:
