Skip site navigation (1)Skip section navigation (2)
Date:      30 Sep 2000 04:27:13 -0700
From:      asami@FreeBSD.ORG (Satoshi - Ports Wraith - Asami)
To:        "Jeffrey J. Mountin" <>
Cc:        ports@FreeBSD.ORG, mharo@FreeBSD.ORG, will@FreeBSD.ORG
Subject:   Re: RFC: Ports layout reorganization (Re: ports tree idea:     Combine DESCR and COMMENT)
Message-ID:  <>
In-Reply-To: "Jeffrey J. Mountin"'s message of "Fri, 29 Sep 2000 22:58:30 -0500"
References:  <"Jeffrey J. Mountin"'s message of "Fri, 29 Sep 2000 15:02:50 -0500"> <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
 * From: "Jeffrey J. Mountin" <>

 * >You're talking about me? ;)
 * Hmmm...

I was just kidding. :)  Here is the patch for review.  I intend to
commit this tomorrow as the code to deal with the new layout is not
yet activated by default, but it adds a check that safeguards against
people mixing an old with a new port.

I am planning to do the actual work sometime next weekend, so it will
only help people who updated in that one-week period, but
it's still better than nothing.

I haven't added the COMMENT stuff yet.  It is not as simple as the
directory movement so I want to go one step at a time.

By the way, can someone convert portlint and addport too?  (Michael,
are you there?)  Perl isn't my strongest subject....

 * ... like one without the patch- prefix in security/sslproxy and may be 
 * others, which don't follow the guidelines.

Hmm.  I have no idea how that would work, since only deals
with files named "patch-*".  You *can* actually put a file in
${PATCHDIR} that is not named "patch-*" and conditionally specify them
as EXTRA_PATCHES, but sslproxy is not doing that either.

Index: Mk/
RCS file: /usr/cvs/ports/Mk/,v
retrieving revision 1.352
diff -u -r1.352
--- Mk/	2000/09/22 07:21:24	1.352
+++ Mk/	2000/09/30 11:22:15
@@ -584,6 +602,28 @@
 PACKAGES?=		${PORTSDIR}/packages
+.if defined(NEWLAYOUT)
+.if (!defined(PATCHDIR) && exists(${MASTERDIR}/patches)) || \
+	(!defined(PKGDIR) && exists(${MASTERDIR}/pkg)) || \
+	(!defined(MD5_FILE) && exists(${MASTERDIR}/files/md5))
+	@${ECHO} "Error: your port uses an old layout.  Please update it to match this"
+	@${FALSE}
+.if exists(${MASTERDIR}/pkg-comment) || exists(${MASTERDIR}/pkg-descr) || \
+	exists(${MASTERDIR}/pkg-plist) || exists(${MASTERDIR}/distinfo)
+	@${ECHO} "Error: your port uses the new layout.  Please update to match the port."
+	@${FALSE}
+# delete from here when NEWLAYOUT is default
 .if exists(${MASTERDIR}/patches.${ARCH}-${OPSYS})
 .elif exists(${MASTERDIR}/patches.${OPSYS})
@@ -623,6 +663,7 @@
+# delete to here when NEWLAYOUT is default
 .if defined(USE_IMAKE)
@@ -922,7 +969,12 @@
 MD5?=			md5
+.if defined(NEWLAYOUT)
+MD5_FILE?=		${MASTERDIR}/distinfo
+# delete from here when NEWLAYOUT is default
 MD5_FILE?=		${FILESDIR}/md5
+# delete to here when NEWLAYOUT is default
 MAKEFILE?=		Makefile
@@ -1024,20 +1076,32 @@
 .undef NO_PACKAGE
+.if defined(NEWLAYOUT)
+COMMENT?=		${PKGDIR}/pkg-comment
+DESCR?=			${PKGDIR}/pkg-descr
+PLIST?=			${PKGDIR}/pkg-plist
+PKGINSTALL?=	${PKGDIR}/pkg-install
+PKGDEINSTALL?=	${PKGDIR}/pkg-deinstall
+PKGREQ?=		${PKGDIR}/pkg-req
+PKGMESSAGE?=	${PKGDIR}/pkg-message
+# delete from here when NEWLAYOUT is default
+# delete to here when NEWLAYOUT is default
 PKG_CMD?=		/usr/sbin/pkg_create
 PKG_DELETE?=	/usr/sbin/pkg_delete
 PKG_INFO?=		/usr/sbin/pkg_info
 .if !defined(PKG_ARGS)
 PKG_ARGS=		-v -c ${COMMENT} -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`${MAKE} package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | sort -u`" ${EXTRA_PKG_ARGS}
 .if exists(${PKGINSTALL})
@@ -2824,8 +2911,9 @@
 	@${CAT} ${TEMPLATES}/README.port | \
 		${SED} -e 's%%PORT%%'`${ECHO} ${.CURDIR} | ${SED} -e 's.*/\([^/]*/[^/]*\)$$\1'`'g' \
 			-e 's%%PKG%%${PKGNAME}g' \
-			-e '/%%COMMENT%%/r${PKGDIR}/COMMENT' \
+			-e '/%%COMMENT%%/r${COMMENT}' \
 			-e '/%%COMMENT%%/d' \
+			-e 's%%DESCR%%'"`${ECHO} ${DESCR} | ${SED} -e 's${.CURDIR}/'`"'' \
 			-e 's%%BUILD_DEPENDS%%'"`cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} pretty-print-build-depends-list`"'' \
 			-e 's%%RUN_DEPENDS%%'"`cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} pretty-print-run-depends-list`"'' \
 			-e 's%%TOP%%'"`${ECHO} ${CATEGORIES} | ${SED} -e 'sa .*aa' -e 'sa[^/]*'`"'/..' \
Index: Templates/README.port
RCS file: /usr/cvs/ports/Templates/README.port,v
retrieving revision 1.2
diff -u -r1.2 README.port
--- Templates/README.port	2000/01/21 11:08:23	1.2
+++ Templates/README.port	2000/09/30 11:21:00
@@ -11,7 +11,7 @@
-<p>Please read the file "<a href="pkg/DESCR">pkg/DESCR</a>" for a
+<p>Please read the "<a href="%%DESCR%%">description file</a>" for a
 longer description.
 <p>Go to the <a href="%%TOP%%/README.html">top of the ports tree</a> for

As you can see, by defining NEWLAYOUT you get the new behavior.  When
I finish converting all files, it will become the default.  At that
time, I will also delete the lines marked by "# delete from" and
"#delete to".

If some hunks look excessively long, that's because I edited the patch
by hand to remove other stuff that I'm currently testing.  (I hope I
didn't screw up the edit!)

The %%DESCR%% substitution in README.port actually doesn't work when
MASTERDIR is set relative to ${PORTSDIR} and ${PORTSDIR} is a symlink
to something else, but you are not supposed to use ${PORTSDIR} in a
MASTERDIR definition so we should be safe.  (The old README.port
wouldn't have worked at all for ports with MASTERDIR or its own idea
of DESCR anyway.)


To Unsubscribe: send mail to
with "unsubscribe freebsd-ports" in the body of the message

Want to link to this message? Use this URL: <>