Date: Mon, 5 Feb 2007 02:41:57 GMT From: Mark Linimon <linimon@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/108782: patch to remove obsolete cruft in bsd.port.mk Message-ID: <200702050241.l152fvL1085678@freefall.freebsd.org> Resent-Message-ID: <200702050250.l152oCWw085749@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 108782 >Category: ports >Synopsis: patch to remove obsolete cruft in bsd.port.mk >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Feb 05 02:50:11 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Mark Linimon >Release: FreeBSD 6.0-STABLE i386 >Organization: FreeBSD >Environment: System: FreeBSD freefall.freebsd.org 6.0-STABLE FreeBSD 6.0-STABLE #0: Sat Dec 10 03:18:20 UTC 2005 kensmith@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386 >Description: There is some cruft in bsd.port.mk, now that support for 4.X has been dropped. Some of it has been obsolete for years. >How-To-Repeat: >Fix: Index: bsd.port.mk =================================================================== RCS file: /home/FreeBSD/pcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.548 diff -u -r1.548 bsd.port.mk --- bsd.port.mk 4 Feb 2007 20:23:37 -0000 1.548 +++ bsd.port.mk 5 Feb 2007 01:56:07 -0000 @@ -1297,15 +1297,6 @@ _PREMKINCLUDED= yes -# check for old, crufty, makefile types, part 1: -.if !defined(PORTNAME) || !( defined(PORTVERSION) || defined (DISTVERSION) ) || defined(PKGNAME) -check-makefile:: - @${ECHO_CMD} "Makefile error: you need to define PORTNAME and PORTVERSION instead of PKGNAME." - @${ECHO_CMD} "(This port is too old for your bsd.port.mk, please update it to match" - @${ECHO_CMD} " your bsd.port.mk.)" - @${FALSE} -.endif - .if defined(PORTVERSION) .if ${PORTVERSION:M*[-_,]*}x != x IGNORE= PORTVERSION ${PORTVERSION} may not contain '-' '_' or ',' @@ -1325,14 +1316,8 @@ _SUF2= ,${PORTEPOCH} .endif -# check for old, crufty, makefile types, part 2. The "else" case -# should have been handled in part 1, above. -.if !defined(PKGVERSION) PKGVERSION= ${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2} -.endif -.if !defined(PKGNAME) PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION} -.endif DISTNAME?= ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX} # These need to be absolute since we don't know how deep in the ports @@ -1373,12 +1358,6 @@ PACKAGES?= ${PORTSDIR}/packages TEMPLATES?= ${PORTSDIR}/Templates -.if (!defined(PKGDIR) && exists(${MASTERDIR}/pkg/DESCR)) || \ - (!defined(MD5_FILE) && exists(${MASTERDIR}/files/md5)) -check-makefile:: - @${ECHO_CMD} "Makefile error: your port uses an old layout. Please update it to match this bsd.port.mk. If you have updated your ports collection via cvsup and are still getting this error, see Q12 and Q13 in the cvsup FAQ on http://www.polstra.com for further information." - @${FALSE} -.endif PATCHDIR?= ${MASTERDIR}/files FILESDIR?= ${MASTERDIR}/files SCRIPTDIR?= ${MASTERDIR}/scripts @@ -2142,8 +2121,7 @@ .if exists(/usr/bin/fetch) FETCH_CMD?= /usr/bin/fetch -ApRr FETCH_REGET?= 1 -.if ${OSVERSION} >= 480000 && !defined(DISABLE_SIZE) -# Avoid -S for 4.7 and earlier since it causes fetch errors +.if !defined(DISABLE_SIZE) FETCH_BEFORE_ARGS+= $${CKSIZE:+-S $$CKSIZE} .endif .else @@ -2155,11 +2133,7 @@ .if exists(/usr/games/random) RANDOM_CMD?= /usr/games/random RANDOM_ARGS?= "-w -f -" -.if ( ${OSVERSION} > 480000 && ${OSVERSION} < 500000 ) || ${OSVERSION} > 500100 _RANDOMIZE_SITES= " |${RANDOM_CMD} ${RANDOM_ARGS}" -.else -_RANDOMIZE_SITES= '' -.endif .endif .endif @@ -2287,24 +2261,6 @@ PORTDIRNAME?= ${_PORTDIRNAME} PKGORIGIN?= ${PKGCATEGORY}/${PORTDIRNAME} - -.if (${OSVERSION} < 491101 && ${PKGORIGIN} != "sysutils/pkg_install") || exists(${LOCALBASE}/sbin/pkg_info) -.if ${OSVERSION} < 491101 && ${PKGORIGIN} != "sysutils/pkg_install" -EXTRACT_DEPENDS+= ${LOCALBASE}/sbin/pkg_info:${PORTSDIR}/sysutils/pkg_install -.endif -.if !defined(DESTDIR) -PKG_CMD?= ${LOCALBASE_REL}/sbin/pkg_create -PKG_ADD?= ${LOCALBASE_REL}/sbin/pkg_add -PKG_DELETE?= ${LOCALBASE_REL}/sbin/pkg_delete -PKG_INFO?= ${LOCALBASE_REL}/sbin/pkg_info -PKG_VERSION?= ${LOCALBASE_REL}/sbin/pkg_version -.else -PKG_CMD?= ${LOCALBASE_REL}/sbin/pkg_create -PKG_ADD?= ${CHROOT} ${DESTDIR} ${LOCALBASE_REL}/sbin/pkg_add -PKG_DELETE?= ${CHROOT} ${DESTDIR} ${LOCALBASE_REL}/sbin/pkg_delete -PKG_INFO?= ${CHROOT} ${DESTDIR} ${LOCALBASE_REL}/sbin/pkg_info -.endif -.else .if !defined(DESTDIR) PKG_CMD?= /usr/sbin/pkg_create PKG_ADD?= /usr/sbin/pkg_add @@ -2318,7 +2274,6 @@ PKG_INFO?= ${CHROOT} ${DESTDIR} /usr/sbin/pkg_info PKG_VERSION?= ${CHROOT} ${DESTDIR} /usr/sbin/pkg_version .endif -.endif # Does the pkg_create tool support conflict checking? # XXX Slow? @@ -2360,25 +2315,6 @@ ALL_TARGET?= all INSTALL_TARGET?= install - -# This is a mid-term solution patch while pkg-comment files are -# phased out. -# The final simpler patch will come afterwards -.if !defined(COMMENT) -check-makevars:: - @${ECHO_CMD} 'Makefile error: there is no COMMENT variable defined' - @${ECHO_CMD} 'for this port. Please, rectify this.' - @${FALSE} -.else -.if exists(${COMMENTFILE}) -check-makevars:: - @${ECHO_CMD} 'Makefile error: There is a COMMENTFILE in this port.' - @${ECHO_CMD} 'COMMENTFILEs have been deprecated in' - @${ECHO_CMD} 'favor of COMMENT variables.' - @${ECHO_CMD} 'Please, rectify this.' - @${FALSE} -.endif -.endif # Popular master sites .include "bsd.sites.mk" >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702050241.l152fvL1085678>