From owner-freebsd-ports@FreeBSD.ORG Sat Aug 6 16:38:24 2005 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E8D616A41F for ; Sat, 6 Aug 2005 16:38:24 +0000 (GMT) (envelope-from skv@protey.ru) Received: from mail.3wgraphics.com (mail.3wgraphics.com [194.87.91.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 957E643D45 for ; Sat, 6 Aug 2005 16:38:23 +0000 (GMT) (envelope-from skv@protey.ru) Received: from [192.168.0.1] (helo=[192.168.0.1]) by mail.3wgraphics.com with esmtp id 1E1Rgf-000MWh-9v; Sat, 06 Aug 2005 20:38:17 +0400 Message-ID: <42F4E779.9030605@protey.ru> Date: Sat, 06 Aug 2005 20:38:17 +0400 From: Sergey Skvortsov Organization: 3W Graphics User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050217 MIME-Version: 1.0 To: vd@datamax.bg References: <20050805070513.GA60681@sinanica.bg.datamax> <42F310D2.7020200@magnesium.net> <20050805073617.GB60681@sinanica.bg.datamax> In-Reply-To: <20050805073617.GB60681@sinanica.bg.datamax> X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: Adam Weinberger , freebsd-ports@freebsd.org Subject: Re: The right way to depend on a package's extra feature 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: Sat, 06 Aug 2005 16:38:24 -0000 Vasil Dimov wrote: > > Yes, but I am looking for solution that: > * does not change the port we depend on (in your case metakit) > * does not devolve the flow-control to the user saying "I cannot manage > with this situation, you have to do manually this and this". Just (c) patch /usr/ports/Mk/* to support: RUN_DEPENDS=/path/to/check/file:${PORTSDIR}/category/portname:target%WITH_FEATURE_1%FEATURE_2=mydb or even: RUN_DEPENDS=/path/to/check/file:${PORTSDIR}/category/portname%WITH_FEATURE_1%FEATURE_2=mydb (IMO delimiter symbol '%' is aesthetic enough) In such case dependency should be patched/builded/installed as: cd category/portname && make WITH_FEATURE_1=yes FEATURE_2=mydb target Of course, it is not a very trivial patchset. And currently this approach does not support packages. OPTIONS are not installed with packages - so there is no possibility/sence to parse them. I think a file like /var/db/pkg/portname/+FEATURES would be introduced, where OPTIONS is subset of FEATURES. Exact sematics of FEATURES is fuzzy on the first glance, but we can draw up a formal specification :) -- Sergey Skvortsov mailto: skv@protey.ru