From owner-svn-ports-head@freebsd.org Tue Jan 19 09:50:12 2016 Return-Path: Delivered-To: svn-ports-head@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 13676A88C9A; Tue, 19 Jan 2016 09:50:12 +0000 (UTC) (envelope-from rakuco@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 E2002112F; Tue, 19 Jan 2016 09:50:11 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0J9oAub032710; Tue, 19 Jan 2016 09:50:10 GMT (envelope-from rakuco@FreeBSD.org) Received: (from rakuco@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0J9oAbV032707; Tue, 19 Jan 2016 09:50:10 GMT (envelope-from rakuco@FreeBSD.org) Message-Id: <201601190950.u0J9oAbV032707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rakuco set sender to rakuco@FreeBSD.org using -f From: Raphael Kubo da Costa Date: Tue, 19 Jan 2016 09:50:10 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r406678 - in head/net: libproxy libproxy-python X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2016 09:50:12 -0000 Author: rakuco Date: Tue Jan 19 09:50:10 2016 New Revision: 406678 URL: https://svnweb.freebsd.org/changeset/ports/406678 Log: Modernize net/libproxy-python and fix dependencies. In preparation for updating the libproxy ports to 0.4.12, first land some changes that also apply to 0.4.6 and can be MFH'ed. - Make net/libproxy a run-time dependency: we only install .py files in this port, and they only load libproxy.so when being run. Consequently, also set NO_ARCH=yes. - Set NO_BUILD=yes and modernize the installation. Instead of having an empty do-build target and invoking Python's compileall.py in post-build, do it like most other ports and call it in post-install (this requires guarding the post-install target in net/libproxy's Makefile). We also pass -d to compileall.py to avoid having ${STAGEDIR} in the .pyc and .pyo files (and shown in exception tracebacks). - Let the port handle installation instead of defining do-install. We just need to set INSTALL_WRKSRC appropriately to avoid installing more files than we want. Approved by: gnome (kwm) Modified: head/net/libproxy-python/Makefile head/net/libproxy-python/pkg-plist head/net/libproxy/Makefile Modified: head/net/libproxy-python/Makefile ============================================================================== --- head/net/libproxy-python/Makefile Tue Jan 19 09:48:59 2016 (r406677) +++ head/net/libproxy-python/Makefile Tue Jan 19 09:50:10 2016 (r406678) @@ -2,36 +2,32 @@ # $FreeBSD$ # $MCom: ports/net/libproxy-python/Makefile,v 1.1 2011/01/12 13:10:54 kwm Exp $ -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= net lang PKGNAMESUFFIX= -python MAINTAINER= gnome@FreeBSD.org COMMENT= python binding for libproxy -LIB_DEPENDS= libproxy.so:${PORTSDIR}/net/libproxy +RUN_DEPENDS= libproxy>=${PORTVERSION}:${PORTSDIR}/net/libproxy MASTERDIR= ${.CURDIR}/../libproxy DESCR= ${.CURDIR}/pkg-descr PLIST= ${.CURDIR}/pkg-plist -USES+= python -LIBPROXY_SLAVE= python +INSTALL_WRKSRC= ${CONFIGURE_WRKSRC}/bindings/python +NO_ARCH= yes +NO_BUILD= yes +USES= python -do-build: -# empty +LIBPROXY_SLAVE= python -post-build: - ${PYTHON_CMD} -Qold ${PYTHON_LIBDIR}/compileall.py \ - ${WRKSRC}/bindings/python +post-install: + ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \ + -f -d ${PYTHONPREFIX_SITELIBDIR} \ + ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \ - ${WRKSRC}/bindings/python - -do-install: - @${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} -.for file in libproxy.py libproxy.pyc libproxy.pyo - ${INSTALL_DATA} ${WRKSRC}/bindings/python/${file} \ - ${STAGEDIR}${PYTHON_SITELIBDIR} -.endfor + -f -d ${PYTHONPREFIX_SITELIBDIR} \ + ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} .include "${MASTERDIR}/Makefile" Modified: head/net/libproxy-python/pkg-plist ============================================================================== --- head/net/libproxy-python/pkg-plist Tue Jan 19 09:48:59 2016 (r406677) +++ head/net/libproxy-python/pkg-plist Tue Jan 19 09:50:10 2016 (r406678) @@ -1,4 +1,3 @@ %%PYTHON_SITELIBDIR%%/libproxy.py %%PYTHON_SITELIBDIR%%/libproxy.pyc %%PYTHON_SITELIBDIR%%/libproxy.pyo -@dir lib/libproxy/%%VERSION%%/modules Modified: head/net/libproxy/Makefile ============================================================================== --- head/net/libproxy/Makefile Tue Jan 19 09:48:59 2016 (r406677) +++ head/net/libproxy/Makefile Tue Jan 19 09:50:10 2016 (r406678) @@ -66,7 +66,10 @@ CMAKE_ARGS+= -DWITH_MOZJS:BOOL=OFF . endif .endif +# This will be removed after the update to 0.4.12. +.if !target(post-install) post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/lib/libproxy/${PORTVERSION}/modules/ +.endif .include