From owner-freebsd-ports@FreeBSD.ORG Tue Nov 30 21:35:14 2010 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2203C106564A; Tue, 30 Nov 2010 21:35:14 +0000 (UTC) (envelope-from ganael.laplanche@martymac.org) Received: from data.galacsys.net (webmail.galacsys.net [217.24.81.215]) by mx1.freebsd.org (Postfix) with ESMTP id D9A048FC13; Tue, 30 Nov 2010 21:35:13 +0000 (UTC) Received: from martymac.org (webmail.galacsys.net [217.24.81.215]) by data.galacsys.net (Postfix) with ESMTP id 401761714F7; Tue, 30 Nov 2010 22:16:17 +0100 (CET) From: "Ganael LAPLANCHE" To: Ade Lovett ,Mark Linimon X-Openwebmail-Date: Tue, 30 Nov 2010 23:16:17 +0200 Message-Id: <20101130211524.M4648@martymac.org> In-Reply-To: <60D0FDFC-83B5-479D-97ED-922A6D31EF87@FreeBSD.org> References: <20101130041323.GA17404@lonesome.com> <4CF51A1F.7030803@gmail.com> <20101130191906.GA28560@lonesome.com> <60D0FDFC-83B5-479D-97ED-922A6D31EF87@FreeBSD.org> X-Mailer: Open WebMail 2.01 20030425 X-OriginatingIP: 88.163.147.236 (ganael.laplanche@martymac.org) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Date: Tue, 30 Nov 2010 22:16:17 +0100 (CET) Cc: FreeBSD Ports Subject: Re: CFR: patch to cleanup usage of SRC_BASE in various ports 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, 30 Nov 2010 21:35:14 -0000 On Tue, 30 Nov 2010 14:09:35 -0600, Ade Lovett wrote Hi Ade, hi Mark ! > > Patch incorporating these suggestions, along with some other edge > > cases I found, uploaded: > > > > http://people.freebsd.org/~linimon/patches/diff.out.srcbase > > http://people.FreeBSD.org/~ade/bpm.src_base.diff > > Trivial addition to Mk/bsd.port.mk to prevent duplication of > SRC_BASE?= ... in individual port Makefiles. Good patches, thanks ! But couldn't we extend this idea ? Most of the time, ${SRC_BASE} is used to check whether some file (mostly ${SRC_BASE}/sys/Makefile) exists or not, to return, most of the time, the same error : "you need to extract kernel source tree before building this package" It would be interesting to provide something like : USE_BASE= yes Which would do the following : => defines ${SRC_BASE} => checks for ${SRC_BASE}/sys/Makefile => provides a standard error msg if not found or, if set to something other than yes : USE_BASE= some/file/within/src_base => defines ${SRC_BASE} => check for ${SRC_BASE}/some/file/within/src_base => provides a standard error msg if not found Thus, we would avoid having the same tests again and again, and be able to provide more "standard" messages... What do you think ? -- Ganael LAPLANCHE http://www.martymac.org | http://contribs.martymac.org FreeBSD: martymac , http://www.FreeBSD.org