Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Apr 2000 00:37:17 -0700 (PDT)
From:      asami@FreeBSD.ORG (Satoshi - Ports Wraith - Asami)
To:        ports@FreeBSD.ORG
Cc:        committers@FreeBSD.ORG
Subject:   Re: final call: VERSION variable
Message-ID:  <200004030737.AAA52294@silvia.hip.berkeley.edu>
In-Reply-To: <86wvmjw0wd.wl@archon.local.idaemons.org> (knu@idaemons.org)
References:  <vqcbt3w2c2t.fsf@silvia.hip.berkeley.edu> <Pine.BSF.4.21.0003302139500.78667-100000@freefall.freebsd.org> <86wvmjw0wd.wl@archon.local.idaemons.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Here is the bsd.port.mk patch to convert from DISTNAME[/PKGNAME] to
PORTNAME/PORTVERSION[/DISTNAME].

I will commit this soon.  It will work for both the new and old
formats, and will require the new format if REQUIRE_PKGNAME is
defined.

I will freeze the port tree next weekend (around April 8) and mharo
and cpiazza will convert the entire tree in one pass.  If you are
holding on to a patch that updates a port, you may want to commit it
now so you won't be caught with a conflict.  (Same goes for PRs of
course -- please commit as many of them as possible before next
weekend.)

After all ports are converted, the REQUIRE_PKGNAME part will be
changed to be mandatory and no old-style ports will be accepted.

Satoshi
-------
Index: bsd.port.mk
===================================================================
RCS file: /usr/cvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.332
diff -u -r1.332 bsd.port.mk
--- bsd.port.mk	2000/04/02 08:32:26	1.332
+++ bsd.port.mk	2000/04/03 05:34:53
@@ -41,10 +41,13 @@
 #
 # These variables are used to identify your port.
 #
-# DISTNAME		- Name of port or distribution.
-# PKGNAME		- Name of the package file to create if the DISTNAME 
-#				  isn't really relevant for the port/package
-#				  (default: ${DISTNAME}).
+# PORTNAME		- Name of software.
+# PORTVERSION	- Version of software.
+# PKGNAME		- Always defined as ${PORTNAME}-${PORTVERSION}.  Do not
+#				  define this in your Makefile.
+# DISTNAME		- Name of port or distribution used in generating
+#				  WRKSRC and DISTFILES below (default:
+#				  ${PORTNAME}-${PORTVERSION}).
 # CATEGORIES	- A list of descriptive categories into which this port falls.
 #
 # These variable describe how to fetch files required for building the port.
@@ -1098,10 +1101,26 @@
 .endif
 .endif
 
-# Derived names so that they're easily overridable.
-DISTFILES?=		${DISTNAME}${EXTRACT_SUFX}
+.if defined(REQUIRE_PORTNAME) && !defined(PORTNAME)
+.BEGIN:
+	@${ECHO} "${PKGNAME}: You need to define PORTNAME and PORTVERSION instead of PKGNAME."
+	@${ECHO} "(This port is too old for your bsd.port.mk.)"
+	@${FALSE}
+.endif
+.if defined(PORTNAME)
+.if defined(PKGNAME) || !defined(PORTVERSION)
+.BEGIN:
+	@${ECHO} "${PKGNAME}: You need to define PORTNAME and PORTVERSION instead of PKGNAME."
+	@${FALSE}
+.endif
+PKGNAME=	${PORTNAME}-${PORTVERSION}
+DISTNAME?=	${PKGNAME}
+.else
+# old style
 PKGNAME?=		${DISTNAME}
+.endif
 
+DISTFILES?=		${DISTNAME}${EXTRACT_SUFX}
 ALLFILES?=	${DISTFILES} ${PATCHFILES}
 
 .if defined(IGNOREFILES)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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