PERFORCE change 101273 for review
Gabor Kovesdan
gabor at FreeBSD.org
Tue Jul 11 14:00:35 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=101273
Change 101273 by gabor at gabor_spitfire on 2006/07/11 14:00:04
Fix LIB_DEPENDS with DESTDIR, the key is chroot again.
Affected files ...
.. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#18 edit
Differences ...
==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#18 (text+ko) ====
@@ -4736,6 +4736,7 @@
lib-depends:
.if defined(LIB_DEPENDS) && !defined(NO_DEPENDS)
+.if !defined(DESTDIR)
@for i in ${LIB_DEPENDS}; do \
lib=$${i%%:*}; \
case $$lib in \
@@ -4777,6 +4778,49 @@
fi; \
fi; \
done
+.else
+ @for i in ${LIB_DEPENDS}; do \
+ lib=$${i%%:*}; \
+ case $$lib in \
+ *.*.*) pattern="`${ECHO_CMD} $$lib | ${SED} -e 's/\./\\\\./g'`" ;;\
+ *.*) pattern="$${lib%%.*}\.$${lib#*.}" ;;\
+ *) pattern="$$lib" ;;\
+ esac; \
+ dir=$${i#*:}; \
+ target=$${i##*:}; \
+ if ${TEST} $$dir = $$target; then \
+ target="${DEPENDS_TARGET}"; \
+ depends_args="${DEPENDS_ARGS}"; \
+ else \
+ dir=$${dir%%:*}; \
+ fi; \
+ ${ECHO_MSG} -n "===> ${PKGNAME} depends on shared library: $$lib in ${DESTDIR}"; \
+ if ${CHROOT} ${DESTDIR} ${LDCONFIG} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \
+ ${ECHO_MSG} " - found"; \
+ if [ ${_DEPEND_ALWAYS} = 1 ]; then \
+ ${ECHO_MSG} " (but building it anyway)"; \
+ notfound=1; \
+ else \
+ notfound=0; \
+ fi; \
+ else \
+ ${ECHO_MSG} " - not found"; \
+ notfound=1; \
+ fi; \
+ if [ $$notfound != 0 ]; then \
+ ${ECHO_MSG} "===> Verifying $$target for $$lib in $$dir"; \
+ if [ ! -d "$$dir" ]; then \
+ ${ECHO_MSG} " => No directory for $$lib. Skipping.."; \
+ else \
+ ${_INSTALL_DEPENDS} \
+ if ! ${CHROOT} ${DESTDIR} ${LDCONFIG} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \
+ ${ECHO_MSG} "Error: shared library \"$$lib\" does not exist"; \
+ ${FALSE}; \
+ fi; \
+ fi; \
+ fi; \
+ done
+.endif
.endif
misc-depends:
More information about the p4-projects
mailing list