From mad@madpilot.net  Wed Dec 17 16:41:43 2008
Return-Path: <mad@madpilot.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 833591065676
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 17 Dec 2008 16:41:43 +0000 (UTC)
	(envelope-from mad@madpilot.net)
Received: from megatron.madpilot.net (megatron.madpilot.net [88.149.173.206])
	by mx1.freebsd.org (Postfix) with ESMTP id 2AF4F8FC21
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 17 Dec 2008 16:41:43 +0000 (UTC)
	(envelope-from mad@madpilot.net)
Received: by megatron.madpilot.net (Postfix, from userid 1000)
	id ED888130C5B; Wed, 17 Dec 2008 17:41:41 +0100 (CET)
Message-Id: <20081217164141.ED888130C5B@megatron.madpilot.net>
Date: Wed, 17 Dec 2008 17:41:41 +0100 (CET)
From: Guido Falsi <mad@madpilot.net>
Reply-To: Guido Falsi <mad@madpilot.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: databases/rrdtool: ideas to remove dejavu and X11 dependency
X-Send-Pr-Version: 3.113
X-GNATS-Notify: bg1tpt@gmail.com

>Number:         129716
>Category:       ports
>Synopsis:       databases/rrdtool: ideas to remove dejavu and X11 dependency
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wxs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 17 16:50:00 UTC 2008
>Closed-Date:    Wed Jan 07 14:50:05 UTC 2009
>Last-Modified:  Wed Jan  7 14:50:06 UTC 2009
>Originator:     Guido Falsi
>Release:        FreeBSD 7.1-PRERELEASE i386
>Organization:
none
>Environment:
System: FreeBSD megatron.madpilot.net 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #12: Sun Nov 23 12:57:35 CET 2008 root@megatron.madpilot.net:/usr/obj/usr/src/sys/MEGATRON i386

>Description:

After the last modification the rrdtool port requires x11-fonts/dejavu,
which depends on libX11 and other xorg pieces.

This puts all these files on headless servers where usually rrdtool
lives, and does not make too much sense to me.

The submitter of PR 128537, which added the dependency agrees on this.

After a short thread on ports@freebsd.org I was suggested to send
a PR to track history of ideas to solve this problem.

After some analysis and experineting on a clean machine(with no
ports installed) I noticed that reverting the changes from PR 128537
the port already installed bitstream vera from the following
dependency chain:

databases/rrdtool -> x11-toolkits/pango -> ${X_FONTS_TTF_PORT} == x11-fonts/xorg-fonts-truetype -> x11-fonts/bitstream-vera

(X_FONTS_TTF_PORT is defined in bsd.port.mk)

rrdtool falls back nicely on bitstream-vera if dejavu is not present.

Since bitstream-vera has fewer dependancies it should be preferred
as a default, with dejavu proposed as an otion.

Attached patch does this in a quick way. If the patch is too dirty
to be applied as is I'll be happy to make it cleaner and conform
to other suggestions.

Thank you.

>How-To-Repeat:

cd /usr/ports/databases/rrdtool && make install

many dependencies are installed including dejavu and libX11.

>Fix:

diff -ruN rrdtool.old/Makefile rrdtool/Makefile
--- rrdtool.old/Makefile	2008-12-17 09:53:57.333665632 +0100
+++ rrdtool/Makefile	2008-12-17 15:19:05.873075149 +0100
@@ -19,7 +19,6 @@
 		png.5:${PORTSDIR}/graphics/png \
 		xml2.5:${PORTSDIR}/textproc/libxml2 \
 		pangocairo-1\.0.0:${PORTSDIR}/x11-toolkits/pango
-RUN_DEPENDS=	${LOCALBASE}/lib/X11/fonts/dejavu:${PORTSDIR}/x11-fonts/dejavu
 
 CONFLICTS=	rrdtool-1.0*
 
@@ -37,9 +36,11 @@
 
 OPTIONS=	PYTHON_MODULE	"Build PYTHON bindings" off \
 		RUBY_MODULE	"Build RUBY bindings" off \
-		PERL_MODULE	"Build PERL module" on
+		PERL_MODULE	"Build PERL module" on \
+		DEJAVU		"Use DejaVu fonts (requires X11)" off
 
 .include <bsd.port.pre.mk>
+
 .if defined(WITH_PYTHON_MODULE)
 USE_PYTHON=	yes
 .include "${PORTSDIR}/Mk/bsd.python.mk"
@@ -69,6 +70,10 @@
 PLIST_SUB+=	WITH_PERL="@comment "
 .endif
 
+.if exists(${LOCALBASE}/lib/X11/fonts/dejavu) || defined(WITH_DEJAVU)
+RUN_DEPENDS=	${LOCALBASE}/lib/X11/fonts/dejavu:${PORTSDIR}/x11-fonts/dejavu
+.endif
+
 CPPFLAGS+=	-I${LOCALBASE}/include -I${LOCALBASE}/include/freetype2
 LDFLAGS+=	-L${LOCALBASE}/lib
 CFLAGS:=	${CFLAGS:N-ffast-math}
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Wed Dec 17 16:50:21 UTC 2008 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: bg1tpt@gmail.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/129716: databases/rrdtool: ideas to remove dejavu and X11 dependency
Date: Wed, 17 Dec 2008 16:50:18 UT

 Maintainer of databases/rrdtool,
 
 Please note that PR ports/129716 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/129716
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
Responsible-Changed-From-To: freebsd-ports-bugs->wxs 
Responsible-Changed-By: wxs 
Responsible-Changed-When: Mon Dec 29 14:12:35 UTC 2008 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=129716 
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Sun Jan 4 09:06:08 UTC 2009 
State-Changed-Why:  
Maintainer approved. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=129716 
State-Changed-From-To: open->closed 
State-Changed-By: wxs 
State-Changed-When: Wed Jan 7 14:50:03 UTC 2009 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/129716: commit references a PR
Date: Wed,  7 Jan 2009 14:49:59 +0000 (UTC)

 wxs         2009-01-07 14:49:49 UTC
 
   FreeBSD ports repository
 
   Modified files:
     databases/rrdtool    Makefile 
   Log:
   - Make dejavu font an optional dependency
   
   PR:             ports/129716
   Submitted by:   Guido Falsi <mad@madpilot.net>
   Approved by:    bg1tpt@gmail.com (maintainer)
   
   Revision  Changes    Path
   1.82      +7 -2      ports/databases/rrdtool/Makefile
 _______________________________________________
 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:
