Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Aug 2010 19:21:12 -0500
From:      CyberLeo Kitsana <cyberleo@cyberleo.net>
To:        FreeBSD Ports <freebsd-ports@freebsd.org>
Cc:        CyberLeo <cyberleo@cyberleo.net>
Subject:   Overriding port knobs in child ports
Message-ID:  <4C706D78.70200@cyberleo.net>

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

In the interests of keeping my embedded installations small, I wish to
avoid installing certain run-time dependencies for unused features.

For instance, the port www/squid is set USE_PERL5, which registers perl5
as a bdep and rdep; however, the only components of squid that actually
make use of perl5 are two authentication helper scripts that I do not
use. Since nothing else on the machine uses perl5, there's no point in
actually having it installed and using up space on the flashcard.

So I figure I can change www/squid from USE_PERL5 to USE_PERL5_BUILD,
while inheriting all other settings and options; but I don't want to
tamper with the original port and introduce problems updating the tree
later on. To accommodate this, I created a child port,
www/squid-perlless, and placed the following in the Makefile:

----8<----
MASTERDIR=	${.CURDIR}/../../www/squid

.include "${MASTERDIR}/Makefile"

PORTNAME=	squid-perlless
.undef USE_PERL5
USE_PERL5_BUILD=yes
----8<----

Installing this port creates a package named 'squid-perlless', but it
still has perl5 registered as an rdep, regardless of where I put the
.include.

I even tried including bsd.port*.mk after the master makefile, but that
just spewed a bunch of 'redefined' messages, and changed nothing.

Am I missing something here, or am I approaching the problem from the
wrong angle? It seems that this is a relatively necessary bit of
functionality for child ports, but I have not discovered anything in the
porters handbook that provides any hints for changing port knobs in a
child port.

Thanks!

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
<CyberLeo@CyberLeo.Net>

Furry Peace! - http://wwww.fur.com/peace/



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