From owner-svn-ports-all@FreeBSD.ORG Fri Sep 21 09:10:23 2012 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B5BC106566B; Fri, 21 Sep 2012 09:10:23 +0000 (UTC) (envelope-from martymac@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 267C28FC1A; Fri, 21 Sep 2012 09:10:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8L9ANOb003052; Fri, 21 Sep 2012 09:10:23 GMT (envelope-from martymac@svn.freebsd.org) Received: (from martymac@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8L9AMEx003050; Fri, 21 Sep 2012 09:10:22 GMT (envelope-from martymac@svn.freebsd.org) Message-Id: <201209210910.q8L9AMEx003050@svn.freebsd.org> From: Ganael LAPLANCHE Date: Fri, 21 Sep 2012 09:10:22 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r304617 - head/sysutils/dvdvideo X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.5 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, 21 Sep 2012 09:10:23 -0000 Author: martymac Date: Fri Sep 21 09:10:22 2012 New Revision: 304617 URL: http://svn.freebsd.org/changeset/ports/304617 Log: Fix plist and remove BROKEN flag when building with python 3.2+ Modified: head/sysutils/dvdvideo/Makefile (contents, props changed) Modified: head/sysutils/dvdvideo/Makefile ============================================================================== --- head/sysutils/dvdvideo/Makefile Fri Sep 21 08:53:58 2012 (r304616) +++ head/sysutils/dvdvideo/Makefile Fri Sep 21 09:10:22 2012 (r304617) @@ -33,10 +33,6 @@ DVDCSS_LIBVERSION= 3 .include -.if ${PYTHON_REL} >= 323 -BROKEN= bad plist with latest python -.endif - .if ${PORT_OPTIONS:MDVDCSS} LIB_DEPENDS+= dvdcss:${PORTSDIR}/multimedia/libdvdcss .endif @@ -45,4 +41,21 @@ post-patch: @${REINPLACE_CMD} -E -e 's|(libdvdcss.so)\.2|\1.${DVDCSS_LIBVERSION}|' \ ${WRKSRC}/dvdvideo/libdvdcss.py +# When Python version is 3.2+ we rewrite all the filenames +# of TMPPLIST that end with .py[co], so that they conform +# to PEP 3147 (see http://www.python.org/dev/peps/pep-3147/) +.if ${PYTHON_REL} >= 320 +PYMAGICTAG= ${PYTHON_CMD} -c 'import imp; print(imp.get_tag())' +add-plist-post: + @${AWK} '\ + /\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0, /\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] = 1}; sub(/\.py[co]$$/, "." mt "&"); sub(/[^\/]+\.py[co]$$/, pc "/&"); print; next} \ + /^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ + {print} \ + END {if (sp in dirs) {print "@dirrm " sp "/" pc}} \ + ' \ + pc="__pycache__" mt="$$(${PYMAGICTAG})" sp="${PYTHON_SITELIBDIR:S,${PYTHONBASE}/,,g}" \ + ${TMPPLIST} > ${TMPPLIST}.pyc_tmp + @${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST} +.endif + .include