From owner-freebsd-ports-bugs@FreeBSD.ORG Mon May 23 16:30:12 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BE891065677 for ; Mon, 23 May 2011 16:30:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1CF868FC13 for ; Mon, 23 May 2011 16:30:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p4NGU9N5050100 for ; Mon, 23 May 2011 16:30:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p4NGU93Y050096; Mon, 23 May 2011 16:30:09 GMT (envelope-from gnats) Resent-Date: Mon, 23 May 2011 16:30:09 GMT Resent-Message-Id: <201105231630.p4NGU93Y050096@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Baptiste Daroussin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B917106564A for ; Mon, 23 May 2011 16:27:27 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 00AAA8FC08 for ; Mon, 23 May 2011 16:27:26 +0000 (UTC) Received: by wwc33 with SMTP id 33so6093156wwc.31 for ; Mon, 23 May 2011 09:27:25 -0700 (PDT) Received: by 10.216.241.78 with SMTP id f56mr2290668wer.76.1306168045708; Mon, 23 May 2011 09:27:25 -0700 (PDT) Received: from localhost (mlr78-1-82-232-208-178.fbx.proxad.net [82.232.208.178]) by mx.google.com with ESMTPS id m84sm3359693weq.12.2011.05.23.09.27.24 (version=SSLv3 cipher=OTHER); Mon, 23 May 2011 09:27:24 -0700 (PDT) Message-Id: <4dda8aec.6ae8d80a.412a.6e3a@mx.google.com> Date: Mon, 23 May 2011 09:27:24 -0700 (PDT) From: Baptiste Daroussin Sender: Baptiste Daroussin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/157273: [PATCH] some cleanup on bsd.port.mk X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Baptiste Daroussin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 16:30:12 -0000 >Number: 157273 >Category: ports >Synopsis: [PATCH] some cleanup on bsd.port.mk >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Mon May 23 16:30:09 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Baptiste Daroussin >Release: FreeBSD 8.2-STABLE amd64 >Organization: >Environment: System: FreeBSD azathoth.lan 8.2-STABLE FreeBSD 8.2-STABLE #0 r219454M: Thu Mar 10 20:09:22 CET 2011 root@azathoth.lan:/usr/obj/usr/src/sys/AZATHOTH amd64 >Description: this patch supersedes ports/155629 and ports/65804 + add some new cleanups >How-To-Repeat: >Fix: --- cleanup-b.p.mk.patch begins here --- Index: bsd.port.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.683 diff -u -r1.683 bsd.port.mk --- bsd.port.mk 17 May 2011 19:30:02 -0000 1.683 +++ bsd.port.mk 23 May 2011 16:16:41 -0000 @@ -1173,7 +1173,7 @@ .if !target(makepatch) makepatch: - @cd ${.CURDIR} && ${MKDIR} ${FILESDIR} + @${MKDIR} ${FILESDIR} @(cd ${PATCH_WRKSRC}; \ for i in `find . -type f -name '*.orig'`; do \ ORG=$$i; \ @@ -1191,11 +1191,6 @@ # Start of options section .if defined(INOPTIONSMK) || ( !defined(USEOPTIONSMK) && !defined(AFTERPORTMK) ) -.if defined(MAKE_VERSION) -.if ${MAKE_VERSION} >= 5200408030 || ${MAKE_VERSION} >= 4200408030 && ${MAKE_VERSION} < 5000000000 -NOPRECIOUSSOFTMAKEVARS= yes -.endif -.endif # Get the default maintainer MAINTAINER?= ports@FreeBSD.org @@ -2975,12 +2970,10 @@ check-categories: .for cat in ${CATEGORIES} - @if ${ECHO_CMD} ${VALID_CATEGORIES} | ${GREP} -wq ${cat}; then \ - ${TRUE}; \ - else \ - ${ECHO_MSG} "${PKGNAME}: Makefile error: category ${cat} not in list of valid categories."; \ - ${FALSE}; \ - fi +. if empty(VALID_CATEGORIES:M${cat}) + @${ECHO_MSG} "${PKGNAME}: Makefile error: category ${cat} not in list of valid categories."; \ + ${FALSE}; +. endif .endfor .endif @@ -4849,7 +4842,7 @@ for _file in ${DISTFILES}; do \ file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e 's/,/ /g'` ; \ - if [ ! -z "${LISTALL}" -o ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ + if [ ! -z "${LISTALL}" -o ! -f $$file -a ! -f $${file##*/} ]; then \ if [ ! -z "$$select" ] ; then \ __MASTER_SITES_TMP= ; \ for group in $$select; do \ @@ -4865,7 +4858,7 @@ fi ; \ for site in `eval $$SORTED_MASTER_SITES_CMD_TMP ${_RANDOMIZE_SITES}`; do \ DIR=${DIST_SUBDIR}; \ - CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${DISTINFO_FILE} | ${AWK} '{print $$4}'`; \ + CKSIZE=`${AWK} "/^SIZE \($${DIR:+$$DIR/}$$file\)"'{print $$4}' ${DISTINFO_FILE}`; \ case $${file} in \ */*) args="-o $${file} $${site}$${file}";; \ *) args=$${site}$${file};; \ @@ -4880,7 +4873,7 @@ for _file in ${PATCHFILES}; do \ file=`${ECHO_CMD} $$_file | ${SED} -E -e 's/:[^:]+$$//'` ; \ select=`${ECHO_CMD} $${_file#$${file}} | ${SED} -e 's/^://' -e 's/,/ /g'` ; \ - if [ ! -z "${LISTALL}" -o ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ + if [ ! -z "${LISTALL}" -o ! -f $$file -a ! -f $${file##*/} ]; then \ if [ ! -z "$$select" ] ; then \ __PATCH_SITES_TMP= ; \ for group in $$select; do \ @@ -4896,7 +4889,7 @@ fi ; \ for site in `eval $$SORTED_PATCH_SITES_CMD_TMP ${_RANDOMIZE_SITES}`; do \ DIR=${DIST_SUBDIR}; \ - CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${DISTINFO_FILE} | ${AWK} '{print $$4}'`; \ + CKSIZE=`${AWK} "/^SIZE \($${DIR:+$$DIR/}$$file\)"'{print $$4}' ${DISTINFO_FILE}`; \ case $${file} in \ */*) args="-o $${file} $${site}$${file}";; \ *) args=$${site}$${file};; \ @@ -5163,15 +5156,15 @@ .if defined(${deptype}_DEPENDS) .if !defined(NO_DEPENDS) @for i in `${ECHO_CMD} "${${deptype}_DEPENDS}"`; do \ - prog=`${ECHO_CMD} $$i | ${SED} -e 's/:.*//'`; \ + prog=$${i%%:*}; \ if [ -z "$$prog" ]; then \ ${ECHO_MSG} "Error: there is an empty port dependency in ${deptype}_DEPENDS."; \ break; \ fi; \ - dir=`${ECHO_CMD} $$i | ${SED} -e 's/[^:]*://'`; \ + dir=$${i##*:}; \ if ${EXPR} "$$dir" : '.*:' > /dev/null; then \ - target=`${ECHO_CMD} $$dir | ${SED} -e 's/.*://'`; \ - dir=`${ECHO_CMD} $$dir | ${SED} -e 's/:.*//'`; \ + target=$${dir##*:}; \ + dir=$${dir%%:*}; \ if [ X${DEPENDS_PRECLEAN} != "X" ]; then \ target="clean $$target"; \ depends_args="$$depends_args NOCLEANDEPENDS=yes"; \ @@ -6099,14 +6092,6 @@ tags: .endif -.if !defined(NOPRECIOUSSOFTMAKEVARS) -.for softvar in CKSUMFILES _MLINKS -.if defined(${softvar}) -__softMAKEFLAGS+= '${softvar}+=${${softvar}:S/'/'\''/g}' -.endif -.endfor -.endif - .if !defined(NOPRECIOUSMAKEVARS) # These won't change, so we can pass them through the environment .MAKEFLAGS: \ --- cleanup-b.p.mk.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: