From owner-freebsd-ports@FreeBSD.ORG Thu Feb 9 04:19:02 2012 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 06874106566C for ; Thu, 9 Feb 2012 04:19:02 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from mail-lpp01m020-f182.google.com (mail-lpp01m020-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 784968FC08 for ; Thu, 9 Feb 2012 04:19:00 +0000 (UTC) Received: by lbbgj3 with SMTP id gj3so916331lbb.13 for ; Wed, 08 Feb 2012 20:18:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=tocsiNxypIBhUdF9jHpIWuBV83bpUcw/Qcn9Q3VxiSs=; b=eDgc+5xJqmWGkDg6gbTMkVzlcQc8sQb4XSsOCgllRXXMkfpI0SLsbkpw/fO2W9Kugn PZ87tcbbrARXRCMDp52YnWRmhd96HwXQPwvZOXPOWAorfghNhUOVWn4e0rh1Riv5JsxI KgPxMUWMhXvLY8HUnTlU68ipxzQiR6IbLBuVg= MIME-Version: 1.0 Received: by 10.152.136.20 with SMTP id pw20mr79882lab.32.1328761139655; Wed, 08 Feb 2012 20:18:59 -0800 (PST) Received: by 10.152.1.202 with HTTP; Wed, 8 Feb 2012 20:18:59 -0800 (PST) In-Reply-To: <4F31EBE1.8040000@FreeBSD.org> References: <4F31EBE1.8040000@FreeBSD.org> Date: Wed, 8 Feb 2012 22:18:59 -0600 Message-ID: From: Scot Hetzel To: Doug Barton , marcus@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD ports list Subject: Re: What use is WWWDIR_REL? 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, 09 Feb 2012 04:19:02 -0000 On Tue, Feb 7, 2012 at 9:28 PM, Doug Barton wrote: > Following up to my previous post about "Why isn't WWWDIR_REL in the > default PLIST_SUB I broke open bsd.port.mk and found this: > > PLIST_SUB+=3D =A0 =A0 DOCSDIR=3D"${DOCSDIR_REL}" \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0EXAMPLESDIR=3D"${EXAMPLESDIR_REL}" \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0DATADIR=3D"${DATADIR_REL}" \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0WWWDIR=3D"${WWWDIR_REL}" \ =A0 =A0 =A0 =A0= *******!!!!????!!!**** > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ETCDIR=3D"${ETCDIR_REL}" > > So this leads me to many questions, the first and most obvious of which > is, what the heck good is WWWDIR_REL in the first place? I searched the > ports tree and found 1,063 uses of it (outside of bpm itself). 1,035 of > them are literals in a pkg-plist, which at this point looks completely > useless. Of the 28 others 13 of them are PLIST_SUB related, which > apparently can also be removed. Most of the other 15 look like mistakes, > and all of them look like they can be fixed with little difficulty. > Those 1035 ports that are using WWWDIR_REL in their pkg-plist are wrong and should be changed to use WWWDIR. Since PLIST_SUB will automatically replace %%WWWDIR%% with ${WWWDIR_REL} in the pkg-plist. > So I'd like to propose the attached, not to be included until the > existing uses of WWWDIR_REL are updated of course. Can anyone tell me > why this would be a bad idea? I think being able to just use %%WWWDIR%% > in the plist would be a lot less confusing. > I believe the original purpose of the *_REL variables in bsd.port.mk was to make maintaining bsd.port.mk easier. These variables were introduced in bsd.port.mk version 1.557. http://www.freebsd.org/cgi/query-pr.cgi?pr=3D110781 <- adds the *_REL variables to bsd.port.mk http://www.freebsd.org/cgi/query-pr.cgi?pr=3D105529 <- adds WWWDIR to bsd.p= ort.mk Portlint most likely should be updated to do the following: - look for the use of these *_REL variables in the pkg-plist and flag them as an error, and suggest to use the non *_REL variable instead. - Check the ports Makefile for the use of the *_REL variables in PLIST_SUB and flag those uses as an error. Scot