From owner-freebsd-ports@FreeBSD.ORG Thu Feb 1 20:42:05 2007 Return-Path: X-Original-To: ports@freebsd.org 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 986FA16A403 for ; Thu, 1 Feb 2007 20:42:05 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 8CD0B13C4B6 for ; Thu, 1 Feb 2007 20:42:05 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 6FD231A4D87; Thu, 1 Feb 2007 12:42:05 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 5E84A52191; Thu, 1 Feb 2007 15:41:53 -0500 (EST) Date: Thu, 1 Feb 2007 15:41:53 -0500 From: Kris Kennaway To: Luigi Rizzo Message-ID: <20070201204153.GA74138@xor.obsecurity.org> References: <20070201111727.B83474@xorpc.icir.org> <20070201192051.GA72926@xor.obsecurity.org> <20070201113720.D83474@xorpc.icir.org> <20070201194417.GA73296@xor.obsecurity.org> <20070201123026.C84181@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070201123026.C84181@xorpc.icir.org> User-Agent: Mutt/1.4.2.2i Cc: ports@freebsd.org, Kris Kennaway Subject: Re: /usr/local/share/mk ? 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, 01 Feb 2007 20:42:05 -0000 On Thu, Feb 01, 2007 at 12:30:26PM -0800, Luigi Rizzo wrote: > and to answer to your second point... > On Thu, Feb 01, 2007 at 02:44:17PM -0500, Kris Kennaway wrote: > > On Thu, Feb 01, 2007 at 11:37:20AM -0800, Luigi Rizzo wrote: > ... > > > In term of port's backward compatibilty, the extra .PATH or -I > > > could be supplied by the files in /usr/ports/Mk which people > > > are expected to update anyways, right ? > > > > That Makefile.kld would be a fragment of a port makefile, right? Your > > bsd.linux_kmod.mk could go in /usr/ports/Mk although it seems to make > > more sense as part of /usr/src. > > the layout i see is this: > > in ports/multimedia/linux-ov-kld: one of the linux-ported drivers > > files/Makefile.kld > files/patch-hopefully-empty > > Makefile > ... fetch linux source > ... apply local patches > ... copy Makefile.kld into ${WRKSRC} > do-build: > ${MAKE} -I ${PREFIX}/share/mk -f Makefile.kld depend all > > Again, if we could spare the -I ${PREFIX}/share/mk because it is already > supplied once for all in the environment set in /usr/ports/Mk, > that's less chance of making mistakes or hardwiring choices. > > As for ports/devel/linux-bsd-kmod: it would install the bsd.linux_kmod.mk > into ${PREFIX}/share/mk > and then either add .PATH: /usr/local/share/mk to /etc/make.conf, > or print a message asking the sysadmin to do so OK, so you can do it the way I suggested instead without needing to make those system changes just for the benefit of this single application. This is assuming that you plan to add many such drivers; when there are only one or two consumers we don't put the common makefile into /usr/ports/Mk but in some port directory which is included via .include "${PORTSDIR}/foo". Kris P.S. "*-kmod" is the existing standard for kernel module ports, so yours should be "linux-*-kmod".