Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Feb 2012 19:28:33 -0800
From:      Doug Barton <dougb@FreeBSD.org>
To:        FreeBSD ports list <freebsd-ports@FreeBSD.org>
Subject:   What use is WWWDIR_REL?
Message-ID:  <4F31EBE1.8040000@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------050304010107060900010705
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

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+=     DOCSDIR="${DOCSDIR_REL}" \
                EXAMPLESDIR="${EXAMPLESDIR_REL}" \
                DATADIR="${DATADIR_REL}" \
                WWWDIR="${WWWDIR_REL}" \	*******!!!!????!!!****
                ETCDIR="${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.

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.


Doug

-- 

	It's always a long day; 86400 doesn't fit into a short.

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/


--------------050304010107060900010705
Content-Type: text/plain;
 name="wwwdir_rel.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="wwwdir_rel.diff"

Index: bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.705
diff -u -r1.705 bsd.port.mk
--- bsd.port.mk	2 Feb 2012 07:21:14 -0000	1.705
+++ bsd.port.mk	8 Feb 2012 03:23:00 -0000
@@ -1006,7 +1006,6 @@
 #
 # WWWDIR		- Name of the directory to install the packages www data in.
 #				  Default: ${PREFIX}/www/${PORTNAME}
-# WWWDIR_REL	- The WWWDIR relative to ${PREFIX}
 #
 # USERS			- List of users to create at install time. Each login must
 # 				  have a corresponding entry in ${UID_FILES}.
@@ -3086,13 +3085,12 @@
 DOCSDIR_REL?=	${DOCSDIR:S,^${PREFIX}/,,}
 EXAMPLESDIR_REL?=	${EXAMPLESDIR:S,^${PREFIX}/,,}
 DATADIR_REL?=	${DATADIR:S,^${PREFIX}/,,}
-WWWDIR_REL?=	${WWWDIR:S,^${PREFIX}/,,}
 ETCDIR_REL?=	${ETCDIR:S,^${PREFIX}/,,}
 
 PLIST_SUB+=	DOCSDIR="${DOCSDIR_REL}" \
 		EXAMPLESDIR="${EXAMPLESDIR_REL}" \
 		DATADIR="${DATADIR_REL}" \
-		WWWDIR="${WWWDIR_REL}" \
+		WWWDIR="${WWWDIR:S,^${PREFIX}/,,}"
 		ETCDIR="${ETCDIR_REL}"
 
 DESKTOPDIR?=		${PREFIX}/share/applications

--------------050304010107060900010705--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F31EBE1.8040000>