From owner-svn-ports-head@FreeBSD.ORG Mon Oct 20 07:33:01 2014 Return-Path: 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 B351814B; Mon, 20 Oct 2014 07:33:01 +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 A00358AB; Mon, 20 Oct 2014 07:33:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9K7X1Us073716; Mon, 20 Oct 2014 07:33:01 GMT (envelope-from marino@FreeBSD.org) Received: (from marino@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9K7X1e7073715; Mon, 20 Oct 2014 07:33:01 GMT (envelope-from marino@FreeBSD.org) Message-Id: <201410200733.s9K7X1e7073715@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marino set sender to marino@FreeBSD.org using -f From: John Marino Date: Mon, 20 Oct 2014 07:33:01 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r371239 - head/Mk/Uses 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2014 07:33:01 -0000 Author: marino Date: Mon Oct 20 07:33:00 2014 New Revision: 371239 URL: https://svnweb.freebsd.org/changeset/ports/371239 QAT: https://qat.redports.org/buildarchive/r371239/ Log: Add Mk/Uses/alias.mk When on used FreeBSD, this tool doesn't do anything. However, when used on DragonFly, it will define __FreeBSD__ appropriately in CFLAGS which allows the port to build with minimal or no extra patches. Differential Revision: https://reviews.freebsd.org/D950 Reviewed by: portmgr Approved by: bapt (portmgr) Added: head/Mk/Uses/alias.mk (contents, props changed) Added: head/Mk/Uses/alias.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/Mk/Uses/alias.mk Mon Oct 20 07:33:00 2014 (r371239) @@ -0,0 +1,31 @@ +# $FreeBSD$ +# +# Add __FreeSBD__ definition to CFLAGS +# Used by DPorts when masquerading as FreeBSD allows port to build without +# additional patches +# +# Feature: alias +# Usage: USES=alias or USES=alias:ARGS +# Valid ARGS: 8, 9 (default), 10, 11 +# +# MAINTAINER: marino@FreeBSD.org + +.if !defined(_INCLUDE_USES_ALIAS_MK) +_INCLUDE_USES_ALIAS_MK= yes + +.if ${OPSYS} == DragonFly + +.if empty(alias_ARGS) +CFLAGS+= -D__FreeBSD__=9 +.else +. if ${alias_ARGS} == 8 || ${alias_ARGS} == 10 \ + || ${alias_ARGS} == 9 || ${alias_ARGS} == 11 +CFLAGS+= -D__FreeBSD__=${alias_ARGS} +. else +IGNORE= invalid MAJOR RELEASE argument (${alias_ARGS}) for USES=alias +. endif +.endif + +.endif # OPSYS == DragonFly + +.endif