From owner-svn-ports-all@freebsd.org Fri Mar 11 10:39:06 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56466ACBB4C; Fri, 11 Mar 2016 10:39:06 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 287D0E44; Fri, 11 Mar 2016 10:39:06 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2BAd5ap067779; Fri, 11 Mar 2016 10:39:05 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2BAd5qF067778; Fri, 11 Mar 2016 10:39:05 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201603111039.u2BAd5qF067778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Fri, 11 Mar 2016 10:39:05 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r410819 - 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-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2016 10:39:06 -0000 Author: jbeich Date: Fri Mar 11 10:39:04 2016 New Revision: 410819 URL: https://svnweb.freebsd.org/changeset/ports/410819 Log: Allow overriding WRKSRC for USES=dos2unix Approved by: portmgr (mat) Differential Revision: https://reviews.freebsd.org/D5607 Modified: head/Mk/Uses/dos2unix.mk Modified: head/Mk/Uses/dos2unix.mk ============================================================================== --- head/Mk/Uses/dos2unix.mk Fri Mar 11 10:34:27 2016 (r410818) +++ head/Mk/Uses/dos2unix.mk Fri Mar 11 10:39:04 2016 (r410819) @@ -5,6 +5,7 @@ # DOS2UNIX_REGEX a regular expression to match files that needs to be converted # DOS2UNIX_FILES list of files of glob pattern relative to ${WRKSRC} # DOS2UNIX_GLOB list of glob pattern find(1) will match with +# DOS2UNIX_WRKSRC top-level path for directory traversal instead of ${WRKSRC} # # MAINTAINER: portmgr@FreeBSD.org @@ -15,22 +16,24 @@ _INCLUDE_USES_DOS2UNIX_MK= yes _DOS2UNIX_ALL= yes .endif +DOS2UNIX_WRKSRC?= ${WRKSRC} + _USES_patch+= 200:dos2unix dos2unix: @${ECHO_MSG} "===> Converting DOS text files to UNIX text files" .if defined(_DOS2UNIX_ALL) - @${FIND} ${WRKSRC} -type f -print0 | \ + @${FIND} ${DOS2UNIX_WRKSRC} -type f -print0 | \ ${XARGS} -0 ${SED} -i '' -e 's/ $$//' .else .if defined(DOS2UNIX_FILES) - @(cd ${WRKSRC}; \ + @(cd ${DOS2UNIX_WRKSRC}; \ ${ECHO_CMD} ${DOS2UNIX_FILES} | ${XARGS} ${SED} -i '' -e 's/ $$//' ) .elif defined(DOS2UNIX_REGEX) - @${FIND} -E ${WRKSRC} -type f -iregex '${DOS2UNIX_REGEX}' -print0 | \ + @${FIND} -E ${DOS2UNIX_WRKSRC} -type f -iregex '${DOS2UNIX_REGEX}' -print0 | \ ${XARGS} -0 ${SED} -i '' -e 's/ $$//' .else .for f in ${DOS2UNIX_GLOB} - @${FIND} ${WRKSRC} -type f -name '${f}' -print0 | \ + @${FIND} ${DOS2UNIX_WRKSRC} -type f -name '${f}' -print0 | \ ${XARGS} -0 ${SED} -i '' -e 's/ $$//' .endfor .endif