Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Dec 2013 10:22:26 +0000 (UTC)
From:      Rene Ladan <rene@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r337333 - head/Mk
Message-ID:  <201312241022.rBOAMQKr032891@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rene
Date: Tue Dec 24 10:22:26 2013
New Revision: 337333
URL: http://svnweb.freebsd.org/changeset/ports/337333

Log:
  - Replace USE_DOS2UNIX target by a wrapper for USES=dos2unix
  - Remove comments for USE_DOS2UNIX
  
  This makes bsd.port.mk line-ending clean.
  
  PR:		ports/184168
  Submitted by:	myself
  Approved by:	portmgr (bdrewery)
  Exp-runs by:	bdrewery

Modified:
  head/Mk/bsd.port.mk

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Tue Dec 24 10:21:56 2013	(r337332)
+++ head/Mk/bsd.port.mk	Tue Dec 24 10:22:26 2013	(r337333)
@@ -336,12 +336,6 @@ FreeBSD_MAINTAINER=	portmgr@FreeBSD.org
 #				  for compression.
 # USE_MAKESELF		- If set, this port distfile uses makeself, not tar w/[bg]zip
 #				  for compression.
-# USE_DOS2UNIX	- If set to "YES", remove the ^M from all files
-#				  under ${WRKSRC}. If set to a string, remove in all
-#				  files under ${WRKSRC} with one of these names the ^Ms.
-# DOS2UNIX_REGEX
-#				- Limit the ^M removal to files which name matches
-#				  the regular expression.
 # USE_GCC		- If set, this port requires this version of gcc, either in
 #				  the system or installed from a port.
 # USE_CSTD		- Override the default C language standard (gnu89, gnu99)
@@ -1304,8 +1298,6 @@ UNIQUENAME?=	${PKGNAMEPREFIX}${PORTNAME}
 
 .endif
 
-DOS2UNIX_REGEX?=	.*
-
 # At least KDE needs TMPDIR for the package building,
 # so we're setting it to the known default value.
 .if defined(PACKAGE_BUILDING)
@@ -1513,6 +1505,19 @@ PKGCOMPATDIR?=		${LOCALBASE}/lib/compat/
 USES+=	gmake
 .endif
 
+.if defined(USE_DOS2UNIX)
+.if ${USE_DOS2UNIX:U}=="YES"
+DOS2UNIX_REGEX?=	.*
+.else
+.if ${USE_DOS2UNIX:M*/*}
+DOS2UNIX_FILES+=	${USE_DOS2UNIX}
+.else
+DOS2UNIX_GLOB+=	${USE_DOS2UNIX}
+.endif
+.endif
+USES+=	dos2unix
+.endif
+
 .if !defined(UID)
 UID!=	${ID} -u
 .endif
@@ -3626,31 +3631,6 @@ do-extract:
 
 # Patch
 
-.if !target(patch-dos2unix)
-patch-dos2unix:
-.if defined(USE_DOS2UNIX)
-.if ${USE_DOS2UNIX:U}=="YES"
-	@${ECHO_MSG} "===>   Converting DOS text files to UNIX text files"
-	@${FIND} -E ${WRKSRC} -type f -iregex '${DOS2UNIX_REGEX}' -print0 | \
-			${XARGS} -0 ${REINPLACE_CMD} -i '' -e 's/
$$//'
-.else
-.if ${USE_DOS2UNIX:M*/*}
-.for f in ${USE_DOS2UNIX}
-	@${ECHO_MSG} "===>   Converting DOS text file to UNIX text file: ${f}"
-	@${REINPLACE_CMD} -i '' -e 's/
$$//' ${WRKSRC}/${f}
-.endfor
-.else
-.for f in ${USE_DOS2UNIX}
-	@${FIND} ${WRKSRC} -type f -name '${f}' -print0 | \
-			${XARGS} -0 ${REINPLACE_CMD} -i '' -e 's/
$$//'
-.endfor
-.endif
-.endif
-.else
-	@${DO_NADA}
-.endif
-.endif
-
 .if !target(do-patch)
 do-patch:
 .if defined(PATCHFILES)
@@ -4410,7 +4390,7 @@ _EXTRACT_SEQ=	check-build-conflicts extr
 				pre-extract pre-extract-script do-extract \
 				post-extract post-extract-script
 _PATCH_DEP=		extract
-_PATCH_SEQ=		ask-license patch-message patch-depends patch-dos2unix pre-patch \
+_PATCH_SEQ=		ask-license patch-message patch-depends pre-patch \
 				pre-patch-script do-patch post-patch post-patch-script
 _CONFIGURE_DEP=	patch
 _CONFIGURE_SEQ=	build-depends lib-depends configure-message run-autotools-fixup \



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