From c151352159fdecb0d0347d3c561070450223b3e0 Mon Sep 17 00:00:00 2001 From: DPorts Builder Date: Tue, 19 Nov 2013 05:59:24 -0800 Subject: [PATCH] Sync Mk with ports --- Mk/Uses/dos2unix.mk | 40 ++++++++++++++++++++++++++++++++++++++++ Mk/bsd.lua.mk | 20 ++------------------ Mk/bsd.port.mk | 12 ++++++++++-- Mk/bsd.sanity.mk | 6 +++++- 4 files changed, 57 insertions(+), 21 deletions(-) create mode 100644 Mk/Uses/dos2unix.mk diff --git a/Mk/Uses/dos2unix.mk b/Mk/Uses/dos2unix.mk new file mode 100644 index 00000000000..6839a447463 --- /dev/null +++ b/Mk/Uses/dos2unix.mk @@ -0,0 +1,40 @@ +# $FreeBSD: Mk/Uses/dos2unix.mk 334181 2013-11-18 12:58:11Z bapt $ +# +# Provide support to convert files from dos2unix +# +# MAINTAINER: portmgr@FreeBSD.org +# +# 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 + +.if !defined(_INCLUDE_USES_DOS2UNIX_MK) +_INCLUDE_USES_DOS2UNIX_MK= yes + +.if !defined(DOS2UNIX_FILES) && !defined(DOS2UNIX_REGEX) && !defined(DOS2UNIX_GLOB) +_DOS2UNIX_ALL= yes +.endif + +pre-patch: dos2unix + +dos2unix: + @${ECHO_MSG} "===> Converting DOS text files to UNIX text files" +.if defined(_DOS2UNIX_ALL) + @${FIND} ${WRKSRC} -type f -print0 | \ + ${XARGS} -0 ${SED} -i '' -e 's/ $$//' +.else +.if defined(DOS2UNIX_FILES) + @(cd ${WRKSRC}; \ + ${ECHO_CMD} ${DOS2UNIX_FILES} | ${XARGS} ${SED} -i '' -e 's/ $$//' ) +.elif defined(DOS2UNIX_REGEX) + @${FIND} -E ${WRKSRC} -type f -iregex '${DOS2UNIX_REGEX}' -print0 | \ + ${XARGS} -0 ${SED} -i '' -e 's/ $$//' +.else +.for f in ${DOS2UNIX_GLOB} + @${FIND} ${SRCSRC} -type f -name '${f}' -print0 | \ + ${XARGS} -0 ${SED} -i '' -e 's/ $$//' +.endfor +.endif +.endif + +.endif diff --git a/Mk/bsd.lua.mk b/Mk/bsd.lua.mk index 2fd75ab43bc..511f34cb80f 100644 --- a/Mk/bsd.lua.mk +++ b/Mk/bsd.lua.mk @@ -1,7 +1,7 @@ #-*- tab-width: 4; -*- # ex:ts=4 # -# $FreeBSD: Mk/bsd.lua.mk 332223 2013-10-31 11:12:23Z bapt $ +# $FreeBSD: Mk/bsd.lua.mk 334220 2013-11-18 16:15:51Z bapt $ # # bsd.lua.mk - Support for Lua based ports. # @@ -153,7 +153,7 @@ _LUA_COMPS_ALL= lua tolua toluaxx ruby \ alien app compat51 dfui filename gettext posix \ pty socket _LUA_DEP_TYPES_ALL= build lib run -_LUA_VERS_ALL= 5.0 5.1 +_LUA_VERS_ALL= 5.1 _LUA_PLIST_ALL= LUA_VER LUA_VER_SH LUA_VER_STR LUA_PREFIX LUA_SUBDIR _LUA_PLIST_DIR_ALL= LUA_BINDIR LUA_INCDIR LUA_LIBDIR \ LUA_MODLIBDIR LUA_MODSHAREDIR @@ -168,22 +168,6 @@ _LUA_VERS_LISTS= _LUA_VER_INSTALLED WANT_LUA_VER WITH_LUA_VER # _LUA_DEPTYPE_comp_ver - Default dependency type. # -_LUA_PORT_lua_5.0= lang/lua50 -_LUA_DEPTYPE_lua_5.0= lib -_LUA_PORT_tolua_5.0= lang/tolua50 -_LUA_PORT_toluaxx_5.0= lang/tolua++50 -_LUA_PORT_ruby_5.0= lang/ruby-lua - -_LUA_PORT_app_5.0= devel/lua50-app -_LUA_PORT_compat51_5.0= devel/lua50-compat51 -_LUA_FILE_compat51_5.0= ${LUA_MODSHAREDIR}/compat-5.1.lua -_LUA_PORT_dfui_5.0= devel/lua50-dfui -_LUA_PORT_filename_5.0= devel/lua50-filename -_LUA_PORT_gettext_5.0= devel/lua50-gettext -_LUA_PORT_posix_5.0= devel/lua50-posix -_LUA_PORT_pty_5.0= devel/lua50-pty -_LUA_PORT_socket_5.0= net/lua50-luasocket - _LUA_PORT_lua_5.1= lang/lua _LUA_DEPTYPE_lua_5.1= lib diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 84bd15b071c..7936e347102 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1,7 +1,7 @@ #-*- tab-width: 4; -*- # ex:ts=4 # -# $FreeBSD: Mk/bsd.port.mk 333576 2013-11-12 14:56:50Z bapt $ +# $FreeBSD: Mk/bsd.port.mk 334256 2013-11-18 19:48:21Z eadler $ # $NetBSD: $ # # bsd.port.mk - 940820 Jordan K. Hubbard. @@ -312,6 +312,8 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # passed to the compiler by setting DEBUG_FLAGS. It is # set to "-g" at default. # +# WITH_DEBUG_PORTS - A list of origins for which WITH_DEBUG will be set +# # WITH_SSP_PORTS # - If set, SSP_FLAGS (defaults to -fstack-protector) # is added to CFLAGS and the necessary flags @@ -1310,6 +1312,12 @@ MAKE_ENV+= TMPDIR="${TMPDIR}" CONFIGURE_ENV+= TMPDIR="${TMPDIR}" .endif # defined(TMPDIR) +.if defined(WITH_DEBUG_PORTS) +.if ${WITH_DEBUG_PORTS:M${PKGORIGIN}} +WITH_DEBUG= yes +.endif +.endif + # Reset value from bsd.own.mk. .if defined(WITH_DEBUG) && !defined(WITHOUT_DEBUG) STRIP= #none @@ -3685,7 +3693,7 @@ do-patch: done; \ fi; \ fi - @if [ -d ${DFLY_PATCHDIR} ]; then \ + @set -e ; if [ -d ${DFLY_PATCHDIR} ]; then \ if [ "`${ECHO_CMD} ${DFLY_PATCHDIR}/patch-*`" != "${DFLY_PATCHDIR}/patch-*" ]; then \ ${ECHO_MSG} "===> Applying ${OPSYS} patches for ${PKGNAME}" ; \ PATCHES_APPLIED="" ; \ diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk index 6ce10687fb2..0b74b0a6d37 100644 --- a/Mk/bsd.sanity.mk +++ b/Mk/bsd.sanity.mk @@ -1,4 +1,4 @@ -# $FreeBSD: Mk/bsd.sanity.mk 331668 2013-10-26 09:29:18Z mva $ +# $FreeBSD: Mk/bsd.sanity.mk 334214 2013-11-18 15:45:08Z bapt $ # # MAINTAINER: portmgr@FreeBSD.org # @@ -127,3 +127,7 @@ DEV_WARNING+= "PYDISTUTILS_AUTOPLIST features Python 3.x support, PYTHON_PY3K_PL .if defined(_PREMKINCLUDED) DEV_ERROR+= "you cannot include bsd.port[.pre].mk twice" .endif + +.if defined(USE_DOS2UNIX) +DEV_WARNING+= "USE_DOS2UNIX is deprecated, please use USES=dos2unix" +.endif -- 2.41.0