From owner-freebsd-ports@FreeBSD.ORG Sun Aug 22 03:03:29 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D51C1065742 for ; Sun, 22 Aug 2010 03:03:28 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id DF1848FC12 for ; Sun, 22 Aug 2010 03:03:27 +0000 (UTC) Received: by ewy26 with SMTP id 26so3217468ewy.13 for ; Sat, 21 Aug 2010 20:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=b2cXzUafMxORJrbk/aGpVk2L9LzjvE6jR16aQRp25do=; b=jEceD4hVG66oy2tC82XlZmOzG6RlFx1LluQ9URfeCjBO6MiS+r5HqTl3b4gTHaZQHx Md5PGyk0EaZghw49P7kKTvGqjKjWWho3w3l52rYMZhEMYrSeCDkem1WCXBNdsxCMihve jiJ0dvxKc6yPFA5mILC/Kkb7Bmn2hl+USoEc8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=gr0Pj1HcPpzjILCUXiCrx5s/o600d3MwQ0cgUMTPvI/8B7rCAdlx2+mVpjlFUO8FJ3 lYg5NDVMaBDPkNB065ICHDmIYCz1Xf4xKQaJsTVQ33bWpMirugbha3Q9CI70mWckQmXu aUYcxw6VkPnzd14X5ox7jrLYK14rziDffre/U= Received: by 10.213.20.10 with SMTP id d10mr3017050ebb.92.1282446206756; Sat, 21 Aug 2010 20:03:26 -0700 (PDT) Received: from localhost ([85.17.254.135]) by mx.google.com with ESMTPS id z55sm8047396eeh.21.2010.08.21.20.03.24 (version=SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 20:03:26 -0700 (PDT) From: Anonymous To: CyberLeo Kitsana References: <4C706D78.70200@cyberleo.net> Date: Sun, 22 Aug 2010 06:58:27 +0400 In-Reply-To: <4C706D78.70200@cyberleo.net> (CyberLeo Kitsana's message of "Sat, 21 Aug 2010 19:21:12 -0500") Message-ID: <86occv2w18.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: FreeBSD Ports Subject: Re: Overriding port knobs in child ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 03:03:29 -0000 CyberLeo Kitsana writes: [...] > ----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. My guess, you're erasing USE_PERL5 too late, master port already inlcuded bsd.perl.mk via bsd.port.mk and set build/run deps. While you can trick Mk/ files into thinking they're already loaded, e.g. Perl_Pre_Include= Perl_Post_Include= BUILD_DEPENDS+=perl:${PORTSDIR}/lang/perl5.12 PKGNAMESUFFIX=-perlless .include "${MASTERDIR}/Makefile" there is another way - bsd.local.mk. You can put a few lines there and it'll only be a matter of a few ifdefs in make.conf, e.g. .if ${.CURDIR:M*/squid} USE_LOCAL_MK= STRIP_PERL5_RUN= .endif %% Index: Mk/bsd.local.mk =================================================================== RCS file: /a/.cvsup/ports/Mk/bsd.local.mk,v retrieving revision 1.2 diff -u -p -r1.2 bsd.local.mk --- Mk/bsd.local.mk 10 Dec 2006 18:15:33 -0000 1.2 +++ Mk/bsd.local.mk 22 Aug 2010 02:57:53 -0000 @@ -12,6 +12,23 @@ Local_Pre_Include= bsd.local.mk +.if defined(STRIP_PERL5) + PKGNAMESUFFIX += -no-perl +. undef USE_PERL5 +. undef USE_PERL5_BUILD +. undef USE_PERL5_RUN +.elif defined(STRIP_PERL5_BUILD) + PKGNAMESUFFIX += -no-perl-bdep + USE_PERL5_RUN := ${USE_PERL5} +. undef USE_PERL5 +. undef USE_PERL5_BUILD +.elif defined(STRIP_PERL5_RUN) + PKGNAMESUFFIX += -no-perl-rdep + USE_PERL5_BUILD := ${USE_PERL5} +. undef USE_PERL5 +. undef USE_PERL5_RUN +.endif + # # Here is where any code that needs to run at bsd.port.pre.mk inclusion # time should live. %%