From owner-freebsd-ports@FreeBSD.ORG Thu Jul 20 18:46:33 2006 Return-Path: X-Original-To: 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 DD80216A4DD for ; Thu, 20 Jul 2006 18:46:33 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1113543D5A for ; Thu, 20 Jul 2006 18:46:31 +0000 (GMT) (envelope-from swhetzel@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so976446uge for ; Thu, 20 Jul 2006 11:46:30 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Pke9XcztWEeq4uPMQHQ7v56GNohe50MdzKR6VmhjhqYPh/nU+QE4A8lCfxR3eRfkbpPWprw1V/KCkupaI2FFE3EEJr30aeLOIybnXlnNC47AkxWftCuanlHSk6gThnO/F/WUoTnZ53VybYsPfe6kxCsuAftziIsm7EPsKJ6iJFU= Received: by 10.78.165.16 with SMTP id n16mr768080hue; Thu, 20 Jul 2006 11:46:30 -0700 (PDT) Received: by 10.78.83.17 with HTTP; Thu, 20 Jul 2006 11:46:29 -0700 (PDT) Message-ID: <790a9fff0607201146w377e92f4x798797feff6c8b21@mail.gmail.com> Date: Thu, 20 Jul 2006 13:46:30 -0500 From: "Scot Hetzel" To: "John E Hein" In-Reply-To: <17598.52872.765184.211253@gromit.timing.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <17598.52872.765184.211253@gromit.timing.com> Cc: ports@freebsd.org Subject: Re: conflicting dependency 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: Thu, 20 Jul 2006 18:46:33 -0000 On 7/19/06, John E Hein wrote: > Let's say there are two ports A & B. > They both provide libfoo.so.1 (and so register CONFLICTS with each other). > > Now port C wants to use libfoo (and doesn't care if it gets it > from A or B). > > What does port C list in it's LIB_DEPENDS? > > What if it lists A and someone installs B... does A get registered as > the dependency when C is installed even though A is not installed? > In the port Cs Makefile, you add: .if exists(${PREFIX}/bin/file found only in Port B) PORTA_STAT= OFF PORTB_STAT= ON .else PORTA_STAT= ON PORTB_STAT= OFF .endif OPTIONS = PORTA "Depends on libfoo from port A" ${PORTA_STAT} \ PORTB "Depends on libfoo from port B" ${PORTB_STAT} .if defined(WITH_PORTA) || !defined(WITHOUT_PORTA) LIB_DEPENDS+= foo.1:${PORTSDIR}/dependancy on Port A .elif defined(WITH_PORTB) LIB_DEPENDS+= foo.1:${PORTSDIR}/dependancy on Port B .else IGNORE= Must choose either port A or B .endif This allows the admin to install either port A or B, and port C will automatically detect which port is installed, as well as allowing the admin to choose which to install. Scot -- DISCLAIMER: No electrons were mamed while sending this message. Only slightly bruised.