From owner-p4-projects@FreeBSD.ORG Tue Jul 11 14:00:35 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D8D8A16A4DF; Tue, 11 Jul 2006 14:00:34 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9BF9B16A4DD for ; Tue, 11 Jul 2006 14:00:34 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E82043D76 for ; Tue, 11 Jul 2006 14:00:34 +0000 (GMT) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6BE0Y9h039470 for ; Tue, 11 Jul 2006 14:00:34 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6BE0Yur039467 for perforce@freebsd.org; Tue, 11 Jul 2006 14:00:34 GMT (envelope-from gabor@FreeBSD.org) Date: Tue, 11 Jul 2006 14:00:34 GMT Message-Id: <200607111400.k6BE0Yur039467@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 101273 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jul 2006 14:00:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=101273 Change 101273 by gabor@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: