Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Dec 2008 17:41:41 +0100 (CET)
From:      Guido Falsi <mad@madpilot.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/129716: databases/rrdtool: ideas to remove dejavu and X11 dependency
Message-ID:  <20081217164141.ED888130C5B@megatron.madpilot.net>
Resent-Message-ID: <200812171650.mBHGo1wp051936@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         129716
>Category:       ports
>Synopsis:       databases/rrdtool: ideas to remove dejavu and X11 dependency
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 17 16:50:00 UTC 2008
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081217164141.ED888130C5B>