From owner-svn-ports-head@FreeBSD.ORG  Wed Oct  8 17:11:53 2014
Return-Path: <owner-svn-ports-head@FreeBSD.ORG>
Delivered-To: svn-ports-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id 84497271;
 Wed,  8 Oct 2014 17:11:53 +0000 (UTC)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 70730D63;
 Wed,  8 Oct 2014 17:11:53 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s98HBrvc001487;
 Wed, 8 Oct 2014 17:11:53 GMT (envelope-from bapt@FreeBSD.org)
Received: (from bapt@localhost)
 by svn.freebsd.org (8.14.9/8.14.9/Submit) id s98HBrRM001486;
 Wed, 8 Oct 2014 17:11:53 GMT (envelope-from bapt@FreeBSD.org)
Message-Id: <201410081711.s98HBrRM001486@svn.freebsd.org>
X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org
 using -f
From: Baptiste Daroussin <bapt@FreeBSD.org>
Date: Wed, 8 Oct 2014 17:11:53 +0000 (UTC)
To: ports-committers@freebsd.org, svn-ports-all@freebsd.org,
 svn-ports-head@freebsd.org
Subject: svn commit: r370464 - head/Mk
X-SVN-Group: ports-head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-ports-head@freebsd.org
X-Mailman-Version: 2.1.18-1
Precedence: list
List-Id: SVN commit messages for the ports tree for head
 <svn-ports-head.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/svn-ports-head>,
 <mailto:svn-ports-head-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-ports-head/>
List-Post: <mailto:svn-ports-head@freebsd.org>
List-Help: <mailto:svn-ports-head-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-ports-head>,
 <mailto:svn-ports-head-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 08 Oct 2014 17:11:53 -0000

Author: bapt
Date: Wed Oct  8 17:11:52 2014
New Revision: 370464
URL: https://svnweb.freebsd.org/changeset/ports/370464
QAT: https://qat.redports.org/buildarchive/r370464/

Log:
  Check CATEGORIES sanity directly from bsd.sanity.mk
  
  Differential Revision:	https://reviews.freebsd.org/D917
  Reviewed by:	bdrewery

Modified:
  head/Mk/bsd.sanity.mk

Modified: head/Mk/bsd.sanity.mk
==============================================================================
--- head/Mk/bsd.sanity.mk	Wed Oct  8 17:09:39 2014	(r370463)
+++ head/Mk/bsd.sanity.mk	Wed Oct  8 17:11:52 2014	(r370464)
@@ -7,6 +7,15 @@
 WARNING+=	"WITHOUT_NLS is deprecated use OPTIONS_UNSET=NLS instead"
 .endif
 
+.if defined(PKGORIGIN)
+.for _c in ${CATEGORIES}
+_CAT?=	${_c}
+.endfor
+.if ${.CURDIR:H:T} != ${_CAT}
+DEV_ERROR+=	"The first entry in CATEGORIES should be the directory where the port lives"
+.endif
+.endif
+
 #.if defined(WITHOUT_X11)
 #WARNING+=	"WITHOUT_X11 is deprecated use X11 option instead"
 #.endif