From owner-freebsd-ports@FreeBSD.ORG Mon Jan 25 17:18:16 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 512291065692 for ; Mon, 25 Jan 2010 17:18:16 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:198:206::1]) by mx1.freebsd.org (Postfix) with ESMTP id E09B88FC18 for ; Mon, 25 Jan 2010 17:18:15 +0000 (UTC) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.3/8.14.3) with ESMTP id o0PHIDlm010215 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 25 Jan 2010 18:18:13 +0100 (CET) (envelope-from uqs@spoerlein.net) Received: (from uqs@localhost) by acme.spoerlein.net (8.14.3/8.14.3/Submit) id o0PHICTH010214; Mon, 25 Jan 2010 18:18:12 +0100 (CET) (envelope-from uqs@spoerlein.net) Date: Mon, 25 Jan 2010 18:18:12 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Larry Rosenman Message-ID: <20100125171812.GA92615@acme.spoerlein.net> Mail-Followup-To: Larry Rosenman , freebsd-ports@freebsd.org References: <00d801ca9ddf$05054620$0f0fd260$@org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00d801ca9ddf$05054620$0f0fd260$@org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-ports@freebsd.org Subject: Re: Porting question 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: Mon, 25 Jan 2010 17:18:16 -0000 On Mon, 25.01.2010 at 10:54:01 -0600, Larry Rosenman wrote: > I've asked portmgr before, but still haven't found a decent way to do what I > want, so let me post this publicly. > > I want to make the sysutils/lsof port fail early with a decent message if > the kernel sources aren't loaded on the system. > > The most common question/problem report I get is when the lsof configure > script fails due to a lack of the system sources. > > Ideas on how to do this cleanly in the port Makefile? from sysutils/fusefs-kmod: .include .if !exists(${SRC_BASE}/sys/Makefile) IGNORE= requires the Kernel source to be installed. Set SRC_BASE if it is not in /usr/src .endif .if !exists(${SRC_BASE}/sbin/mount) IGNORE= requires the userland sources to be installed. Set SRC_BASE if it is not in /usr/src .endif Me, I would not test for the Makefile, but one of the actually required headers. Regards, Uli