From owner-freebsd-ports@FreeBSD.ORG Tue Apr 10 02:27:20 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4050106566C for ; Tue, 10 Apr 2012 02:27:20 +0000 (UTC) (envelope-from stephen@missouri.edu) Received: from wilberforce.math.missouri.edu (wilberforce.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id 6D4BA8FC16 for ; Tue, 10 Apr 2012 02:27:20 +0000 (UTC) Received: from [127.0.0.1] (wilberforce.math.missouri.edu [128.206.184.213]) by wilberforce.math.missouri.edu (8.14.5/8.14.5) with ESMTP id q3A221oe038074 for ; Mon, 9 Apr 2012 21:02:01 -0500 (CDT) (envelope-from stephen@missouri.edu) Message-ID: <4F839499.8050103@missouri.edu> Date: Mon, 09 Apr 2012 21:02:01 -0500 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: freebsd-ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: autodetecting dependencies 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: Tue, 10 Apr 2012 02:27:20 -0000 So suppose we are building port A. It turns out that the configure in port A autodetects whether package B is present or not. It will build either way. But if built with package B, it will not operate without it. So suppose I build port A on machine X which has package B installed. Then I create a package from A, and copy the package to machine Y. Machine Y does not have package B installed, and so when package A is installed, it doesn't work on machine Y. What are the accepted ways of handling this? 1. Don't worry about it. tinderbox builds will never build port A in the presence of package B. 2. Have the Makefile of port A detect whether package B is installed, and if it is then add B as a dependency of A. 3. Cripple the configure in port A so that it doesn't autodetect for package B. (Sometimes this can be done using a suitable CONFIGURE_ARGS, but not in my particular situation.) I prefer the answer (1). But I am interested in other people's opinions. One problem with (2) or (3) is that the creator of the port might never find out which packages could be autodetected by port A's configure without performing an exhaustive search of the source code of A. Thanks, Stephen