PERFORCE change 101780 for review
Gabor Kovesdan
gabor at FreeBSD.org
Mon Jul 17 17:46:44 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=101780
Change 101780 by gabor at gabor_spitfire on 2006/07/17 17:45:38
Chroot a pkg_add command with -C if DESTDIR is set.
Affected files ...
.. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#33 edit
Differences ...
==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#33 (text+ko) ====
@@ -4655,22 +4655,28 @@
_DEPEND_ALWAYS= 0
.endif
-### FIXME: that pkg_add should be fixed for DESTDIR
-
_INSTALL_DEPENDS= \
if [ X${USE_PACKAGE_DEPENDS} != "X" ]; then \
subpkgfile=`(cd $$dir; ${MAKE} $$depends_args -V PKGFILE)`; \
if [ -r "$${subpkgfile}" -a "$$target" = "${DEPENDS_TARGET}" ]; then \
- ${ECHO_MSG} "===> Installing existing package $${subpkgfile}"; \
- ${PKG_ADD} $${subpkgfile}; \
+ if [ -z "${DESTDIR} ] ; then \
+ ${ECHO_MSG} "===> Installing existing package $${subpkgfile}"; \
+ ${PKG_ADD} $${subpkgfile}; \
+ else \
+ ${ECHO_MSG} "===> Installing existing package $${subpkgfile} into ${DESTDIR}"; \
+ ${PKG_ADD} -C ${DESTDIR} $${subpkgfile}; \
+ fi; \
else \
(cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
fi; \
else \
(cd $$dir; ${MAKE} -DINSTALLS_DEPENDS $$target $$depends_args) ; \
- fi ; \
- ${ECHO_MSG} "===> Returning to build of ${PKGNAME}"; \
-
+ fi; \
+ if [ -z "${DESTDIR}" ] ; then \
+ ${ECHO_MSG} "===> Returning to build of ${PKGNAME}"; \
+ else \
+ ${ECHO_MSG} "===> Returning to build of ${PKGNAME} for ${DESTDIR}"; \
+ fi
.for deptype in EXTRACT PATCH FETCH BUILD RUN
${deptype:L}-depends:
More information about the p4-projects
mailing list