Index: bsd.port.mk =================================================================== RCS file: /TESTBSD/REPO/ports/Mk/bsd.port.mk,v retrieving revision 1.462 diff -u -r1.462 bsd.port.mk --- bsd.port.mk 15 Aug 2003 22:57:58 -0000 1.462 +++ bsd.port.mk 21 Aug 2003 10:31:02 -0000 @@ -920,6 +920,7 @@ .else INDEXFILE?= INDEX .endif +MOVEDFILE?= MOVED .if defined(USE_BZIP2) EXTRACT_SUFX?= .tar.bz2 .elif defined(USE_ZIP) @@ -3783,6 +3784,7 @@ fi; \ if [ $$notfound != 0 ]; then \ ${ECHO_MSG} "===> Verifying $$target for $$prog in $$dir"; \ + ${CHECK-MOVED-DEPENDS} ;\ if [ ! -d "$$dir" ]; then \ ${ECHO_MSG} " >> No directory for $$prog. Skipping.."; \ else \ @@ -3839,8 +3841,30 @@ fi; \ if [ $$notfound != 0 ]; then \ ${ECHO_MSG} "===> Verifying $$target for $$lib in $$dir"; \ - if [ ! -d "$$dir" ]; then \ - ${ECHO_MSG} " >> No directory for $$lib. Skipping.."; \ + direxists=1; \ + if [ ! -d $$dir ]; then \ + newdir=`${EGREP} "^$${dir##${PORTSDIR}/}\|" ${PORTSDIR}/${MOVEDFILE} | \ + ${AWK} -F\| ' $$2 ~ /^$$/ {print $$1" has been removed on " $$3 ". reason: "$$4; exit }; \ + { print "${PORTSDIR}/" $$2};'` ;\ + if ( [ `echo "$$newdir" | wc -w` -gt "1" ] ); then \ + ${ECHO_MSG} " >> $$newdir"; \ + ${ECHO_MSG} " >> Please informs the maintainer (${MAINTAINER})"; \ + elif ( [ X$$newdir != "X" ] ) ; then \ + dir=$$newdir; \ + ${ECHO_MSG} " >> DEPENDENCY HAS MOVED to $$newdir";\ + ${ECHO_MSG} " >> Please inform the maintainer (${MAINTAINER})"; \ + if [ -d "$$newdir" ]; then \ + ${ECHO_MSG} "===> Verifying $$target for $$lib in $$dir"; \ + direxists=0; \ + fi; \ + else \ + ${ECHO_MSG} " >> Can't find any informations in ${PORTSDIR}/${MOVEDFILE}"; \ + fi;\ + else \ + direxists=0; \ + fi; \ + if [ ! "$$direxists" -eq "0" ]; then \ + ${ECHO_MSG} " >> No directory for $$lib. Skipping..."; \ else \ if [ X${USE_PACKAGE_DEPENDS} != "X" ]; then \ subpkgfile=`(cd $$dir; ${MAKE} $$depends_args -V PKGFILE)`; \ @@ -3891,6 +3915,12 @@ .endif # Dependency lists: both build and runtime, recursive. Print out directory names. +CHECK-MOVED-DEPENDS= \ + if [ ! -d $$dir ]; then \ + newdir=`${EGREP} "^$${dir\#\#${PORTSDIR}/}\|" ${PORTSDIR}/${MOVEDFILE} | \ + ${AWK} -F\| ' $$2 ~ /^[a-z]+/ { print "${PORTSDIR}/" $$2};'`; \ + [ X$${newdir} != "X" ] && [ -d $$newdir ] && dir=$$newdir; \ + fi all-depends-list: @${ALL-DEPENDS-LIST} @@ -3898,6 +3928,7 @@ ALL-DEPENDS-LIST= \ checked="${PARENT_CHECKED}"; \ for dir in $$(${ECHO_CMD} "${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//') $$(${ECHO_CMD} ${DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/:.*//'); do \ + ${CHECK-MOVED-DEPENDS} ;\ if [ -d $$dir ]; then \ if (${ECHO_CMD} $$checked | ${GREP} -qwv "$$dir"); then \ child=$$(cd $$dir; ${MAKE} PARENT_CHECKED="$$checked" all-depends-list); \ @@ -4011,6 +4042,7 @@ BUILD-DEPENDS-LIST= \ for dir in $$(${ECHO_CMD} "${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//' | sort -u) $$(${ECHO_CMD} ${DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/:.*//' | sort -u); do \ + ${CHECK-MOVED-DEPENDS} ;\ if [ -d $$dir ]; then \ ${ECHO_CMD} $$dir; \ else \ @@ -4023,6 +4055,7 @@ RUN-DEPENDS-LIST= \ for dir in $$(${ECHO_CMD} "${LIB_DEPENDS} ${RUN_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//' | sort -u) $$(${ECHO_CMD} ${DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/:.*//' | sort -u); do \ + ${CHECK-MOVED-DEPENDS} ;\ if [ -d $$dir ]; then \ ${ECHO_CMD} $$dir; \ else \ @@ -4053,6 +4086,7 @@ checked="${PARENT_CHECKED}"; \ for dir in $$(${ECHO_CMD} "${LIB_DEPENDS} ${RUN_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//') $$(${ECHO_CMD} ${DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/:.*//'); do \ dir=$$(${REALPATH} $$dir); \ + ${CHECK-MOVED-DEPENDS} ;\ if [ -d $$dir ]; then \ if (${ECHO_CMD} $$checked | ${GREP} -qwv "$$dir"); then \ childout=$$(cd $$dir; ${MAKE} CHILD_DEPENDS=yes PARENT_CHECKED="$$checked" package-depends-list); \ @@ -4123,12 +4157,32 @@ my @dirs = @$$i; \ @$$i = (); \ for (@dirs) { \ - if (-d $$_) { \ - push @$$i, $$_; \ + my $$portdir = $$_ ; \ + my $$direxists = 1;\ + if (-d $$_) { \ + $$direxists = 0;\ } else { \ - print STDERR qq{${PKGNAME}: \"$$_\" non-existent -- dependency list incomplete\n}; \ - } \ - } \ + my $$portsdir="${PORTSDIR}"; \ + $$_ =~ s/$$portsdir\///;\ + my $$newdir = my $$cond = $$_ ; \ + open(MIGRATE,"${PORTSDIR}/${MOVEDFILE}");\ + while () { \ + if (/^$$cond\|/) { \ + (my $$origdir, $$newdir, my $$date, my $$reason) = split (/\|/); \ + if ( -d "$$portsdir/$$newdir" && ( $$newdir ne "")) { \ + $$portdir = "$$portsdir/$$newdir"; \ + $$direxists = 0;\ + } \ + } \ + }\ + close(MIGRATE);\ + }\ + if ($$direxists eq "0") { \ + push @$$i, $$portdir;\ + } else { \ + print STDERR qq{${PKGNAME}: \"$$portdir\" non-existent -- dependency list incomplete\n}; \ + } \ + } \ } \ for (@bdirs, @mdirs) { \ $$x{$$_} = 1; \