From owner-svn-ports-head@FreeBSD.ORG Fri Nov 8 21:38:07 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 14E876B3; Fri, 8 Nov 2013 21:38:07 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 01FA92239; Fri, 8 Nov 2013 21:38:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8Lc6k5060832; Fri, 8 Nov 2013 21:38:06 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8Lc6a1060830; Fri, 8 Nov 2013 21:38:06 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201311082138.rA8Lc6a1060830@svn.freebsd.org> From: Antoine Brodin Date: Fri, 8 Nov 2013 21:38:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r333262 - head/devel/pear 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.14 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: Fri, 08 Nov 2013 21:38:07 -0000 Author: antoine Date: Fri Nov 8 21:38:06 2013 New Revision: 333262 URL: http://svnweb.freebsd.org/changeset/ports/333262 Log: Stage support for pear classes and channels Reviewed by: bapt, ports@ Modified: head/devel/pear/bsd.pear.channel.mk head/devel/pear/bsd.pear.mk Modified: head/devel/pear/bsd.pear.channel.mk ============================================================================== --- head/devel/pear/bsd.pear.channel.mk Fri Nov 8 21:37:06 2013 (r333261) +++ head/devel/pear/bsd.pear.channel.mk Fri Nov 8 21:38:06 2013 (r333262) @@ -29,8 +29,9 @@ IGNORE= Cannot find registry file: ${PE .endif do-install: - @${MKDIR} ${PREFIX}/${LPEARDIR}/.registry/.channel.${PEAR_CHANNEL_HOST} + @${MKDIR} ${STAGEDIR}${PREFIX}/${LPEARDIR}/.channels/.alias + @${MKDIR} ${STAGEDIR}${PREFIX}/${LPEARDIR}/.registry/.channel.${PEAR_CHANNEL_HOST} @${INSTALL_DATA} ${PEAR_CHANNEL_REG} \ - ${PREFIX}/${LPEARDIR}/.channels/ + ${STAGEDIR}${PREFIX}/${LPEARDIR}/.channels @${ECHO_CMD} -n ${PEAR_CHANNEL_HOST} > \ - ${PREFIX}/${LPEARDIR}/.channels/.alias/${PEAR_CHANNEL_ALIAS}.txt + ${STAGEDIR}${PREFIX}/${LPEARDIR}/.channels/.alias/${PEAR_CHANNEL_ALIAS}.txt Modified: head/devel/pear/bsd.pear.mk ============================================================================== --- head/devel/pear/bsd.pear.mk Fri Nov 8 21:37:06 2013 (r333261) +++ head/devel/pear/bsd.pear.mk Fri Nov 8 21:38:06 2013 (r333262) @@ -190,6 +190,18 @@ do-autogenerate-plist: patch ${ECHO_CMD} "Cannot generate packing list: package files outside PREFIX"; \ exit 1; fi; @${ECHO_CMD} "${LPKGREGDIR}/package.xml" > ${PLIST} + # pkg_install needs to escape $ in directory name while pkg does not +.if defined(WITH_PKGNG) + @cd ${WRKDIR}/inst/${PREFIX} && ${FIND} . -type f | ${SORT} \ + | ${CUT} -c 3- >> ${PLIST} + @DIRS=`cd ${WRKDIR}/inst/${PREFIX} && ${FIND} . -type d | ${SORT} -r | \ + ${CUT} -c 3-`; \ + for d in $${DIRS}; do \ + if [ ! -d ${LOCALBASE}/$${d} ]; then \ + ${ECHO_CMD} "@dirrmtry $${d}" >> ${PLIST}; \ + fi; \ + done +.else @cd ${WRKDIR}/inst/${PREFIX} && ${FIND} . -type f | ${SORT} \ | ${CUT} -c 3- >> ${PLIST} @DIRS=`cd ${WRKDIR}/inst/${PREFIX} && ${FIND} . -type d | ${SORT} -r | \ @@ -199,6 +211,7 @@ do-autogenerate-plist: patch ${ECHO_CMD} "@dirrmtry $${d}" >> ${PLIST}; \ fi; \ done +.endif @${ECHO_CMD} "@dirrm ${LPKGREGDIR}" >> ${PLIST} @${ECHO_CMD} "@dirrmtry ${LPKGREGDIR:H}" >> ${PLIST} @@ -215,62 +228,66 @@ do-install: do-install-files do-install do-auto-install: @${ECHO_MSG} "===> Installing package with pear" +.if defined(NO_STAGE) @cd ${WRKSRC} && ${PEAR} install -n -f package.xml +.else + @cd ${WRKSRC} && ${PEAR} install -n -f -P ${STAGEDIR} package.xml +.endif do-install-files: do-install-files-msg - @${MKDIR} ${INSTDIR} + @${MKDIR} ${STAGEDIR}${INSTDIR} . for dir in ${FILESDIRS} - @${MKDIR} ${INSTDIR}/${dir} + @${MKDIR} ${STAGEDIR}${INSTDIR}/${dir} . endfor . for file in ${FILES} - @${INSTALL_DATA} ${PEARWRKSRC}/${file} ${INSTDIR}/${file} + @${INSTALL_DATA} ${PEARWRKSRC}/${file} ${STAGEDIR}${INSTDIR}/${file} . endfor do-install-docs: do-install-docs-msg . if !defined(NOPORTDOCS) && !empty(DOCS) @${ECHO_MSG} "===> Installing documentation in ${DOCSDIR}." - @${MKDIR} ${DOCSDIR} + @${MKDIR} ${STAGEDIR}${DOCSDIR} . for dir in ${DOCSDIRS} - @${MKDIR} ${DOCSDIR}/${dir} + @${MKDIR} ${STAGEDIR}${DOCSDIR}/${dir} . endfor . for file in ${DOCS} - @${INSTALL_DATA} ${WRKSRC}/${_DOCSDIR}/${file} ${DOCSDIR}/${file} + @${INSTALL_DATA} ${WRKSRC}/${_DOCSDIR}/${file} ${STAGEDIR}${DOCSDIR}/${file} . endfor . endif do-install-tests: do-install-tests-msg . if !empty(TESTS) @${ECHO_MSG} "===> Installing tests in ${TESTSDIR}." - @${MKDIR} ${TESTSDIR} + @${MKDIR} ${STAGEDIR}${TESTSDIR} . for dir in ${TESTSDIRS} - @${MKDIR} ${TESTSDIR}/${dir} + @${MKDIR} ${STAGEDIR}${TESTSDIR}/${dir} . endfor . for file in ${TESTS} - @${INSTALL_DATA} ${WRKSRC}/${_TESTSDIR}/${file} ${TESTSDIR}/${file} + @${INSTALL_DATA} ${WRKSRC}/${_TESTSDIR}/${file} ${STAGEDIR}${TESTSDIR}/${file} . endfor . endif do-install-data: do-install-data-msg . if !empty(DATA) @${ECHO_MSG} "===> Installing data in ${DATADIR}." - @${MKDIR} ${DATADIR} + @${MKDIR} ${STAGEDIR}${DATADIR} . for dir in ${DATADIRS} - @${MKDIR} ${DATADIR}/${dir} + @${MKDIR} ${STAGEDIR}${DATADIR}/${dir} . endfor . for file in ${DATA} - @${INSTALL_DATA} ${WRKSRC}/${_DATADIR}/${file} ${DATADIR}/${file} + @${INSTALL_DATA} ${WRKSRC}/${_DATADIR}/${file} ${STAGEDIR}${DATADIR}/${file} . endfor . endif do-install-sqls: do-install-sqls-msg . if !empty(SQLS) @${ECHO_MSG} "===> Installing sqls in ${SQLSDIR}." - @${MKDIR} ${SQLSDIR} + @${MKDIR} ${STAGEDIR}${SQLSDIR} . for dir in ${SQLSDIRS} - @${MKDIR} ${SQLSDIR}/${dir} + @${MKDIR} ${STAGEDIR}${SQLSDIR}/${dir} . endfor . for file in ${SQLS} - @${INSTALL_DATA} ${WRKSRC}/${_SQLSDIR}/${file} ${SQLSDIR}/${file} + @${INSTALL_DATA} ${WRKSRC}/${_SQLSDIR}/${file} ${STAGEDIR}${SQLSDIR}/${file} . endfor . endif @@ -282,19 +299,19 @@ do-install-scriptfiles: do-install-scrip @${REINPLACE_CMD} -e "s|@php_bin@|${SCRIPTFILESDIR}/php|g" ${WRKSRC}/${file} @${REINPLACE_CMD} -e "s|@php_dir@|${PREFIX}/lib/php|g" ${WRKSRC}/${file} @${REINPLACE_CMD} -e "s|@include_path@|${PREFIX}/${LPEARDIR}|g" ${WRKSRC}/${file} - @${INSTALL_SCRIPT} ${WRKSRC}/${file} ${SCRIPTFILESDIR}/${file} + @${INSTALL_SCRIPT} ${WRKSRC}/${file} ${STAGEDIR}${SCRIPTFILESDIR}/${file} . endfor . endif do-install-examples: do-install-examples-msg . if !defined(NOPORTDOCS) && !empty(EXAMPLES) @${ECHO_MSG} "===> Installing examples in ${EXAMPLESDIR}." - @${MKDIR} ${EXAMPLESDIR} + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} . for dir in ${EXAMPLESDIRS} - @${MKDIR} ${EXAMPLESDIR}/${dir} + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/${dir} . endfor . for file in ${EXAMPLES} - @${INSTALL_DATA} ${WRKSRC}/${_EXAMPLESDIR}/${file} ${EXAMPLESDIR}/${file} + @${INSTALL_DATA} ${WRKSRC}/${_EXAMPLESDIR}/${file} ${STAGEDIR}${EXAMPLESDIR}/${file} . endfor . endif .endif @@ -303,9 +320,9 @@ do-generate-deinstall-script: @${SED} ${_SUB_LIST_TEMP} -e '/^@comment /d' ${PORTSDIR}/devel/pear/pear-deinstall.in > ${WRKDIR}/pear-deinstall pear-post-install: - @${MKDIR} ${PKGREGDIR} - @${INSTALL_DATA} ${WRKDIR}/package.xml ${PKGREGDIR} -.if !defined(PEAR_AUTOINSTALL) + @${MKDIR} ${STAGEDIR}${PKGREGDIR} + @${INSTALL_DATA} ${WRKDIR}/package.xml ${STAGEDIR}${PKGREGDIR} +.if defined(NO_STAGE) && !defined(PEAR_AUTOINSTALL) @${SETENV} PKG_PREFIX=${PREFIX} \ ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif