diff options
author | Mark Linimon <linimon@FreeBSD.org> | 2007-07-18 18:21:57 +0000 |
---|---|---|
committer | Mark Linimon <linimon@FreeBSD.org> | 2007-07-18 18:21:57 +0000 |
commit | 86896d9906271993732e4585fe235c288d55755d (patch) | |
tree | 2c8e054dc0b90e7920346fc42fee3a15c8e17b96 /ports-mgmt/portmk | |
parent | sync with master 1.575. (diff) |
Sync with master 1.70.
Notes
Notes:
svn path=/head/; revision=195865
Diffstat (limited to 'ports-mgmt/portmk')
-rw-r--r-- | ports-mgmt/portmk/Mk/bsd.port.subdir.mk | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/ports-mgmt/portmk/Mk/bsd.port.subdir.mk b/ports-mgmt/portmk/Mk/bsd.port.subdir.mk index 97f28a956917..062e6e1e7063 100644 --- a/ports-mgmt/portmk/Mk/bsd.port.subdir.mk +++ b/ports-mgmt/portmk/Mk/bsd.port.subdir.mk @@ -271,6 +271,8 @@ INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/\1/} .else INDEXFILE?= INDEX .endif +MOVEDDIR?= ${PORTSDIR} +MOVEDFILE?= MOVED HTMLIFY= sed -e 's/&/\&/g' -e 's/>/\>/g' -e 's/</\</g' @@ -330,6 +332,7 @@ PORTSEARCH_DISPLAY_FIELDS?=name,path,info,maint,index,bdeps,rdeps,www PORTSEARCH_KEYLIM?=0 PORTSEARCH_XKEYLIM?=0 PORTSEARCH_IGNORECASE?=1 +PORTSEARCH_MOVED?=1 _PORTSEARCH= \ here=${.CURDIR}; \ @@ -408,11 +411,11 @@ _PORTSEARCH= \ split(display, d, /,[ \t]*/); \ split(xdisplay, xd, /,[ \t]*/); \ for (i in d) { \ - toprint = 1;\ + toprint = 1; \ for (j in xd) { \ if (d[i] == xd[j] ) { \ toprint=0; \ - break;\ + break; \ }\ } \ if (toprint == 1 ) disp[fields[d[i]]] = 1; \ @@ -444,7 +447,31 @@ _PORTSEARCH= \ printf("%s:\t%s\n", names[i], $$i); \ print(""); \ }' ${INDEXDIR}/${INDEXFILE}; \ - fi + if [ "$$name" -o "$$xname" ] && [ ${PORTSEARCH_MOVED} -gt 0 ]; \ + then \ + awk -F\| -v name="$$name" -v xname="$$xname" \ + -v icase="$${icase:-${PORTSEARCH_IGNORECASE}}" \ + 'BEGIN { \ + if (icase) { \ + if (length(name)) name = tolower(name); if (length(xname)) xname = tolower(xname); \ + } \ + fields["name"] = 1; names[1] = "Port"; \ + fields["destination"] = 2; names[2] = "Moved"; \ + fields["date"] = 3; names[3] = "Date"; \ + fileds["reason"] = 4; names[4] = "Reason"; \ + } \ + { \ + oldname = $$1; newname = $$2; \ + sub(".*\/", "", oldname); newname = sub(".*\/", "", newname); \ + if (((icase ? tolower(oldname) : oldname) ~ name) || ((icase ? tolower(newname) : newname) ~ name)) { \ + for (i = 1; i <= 4; i++) { \ + printf("%s:\t%s\n", names[i], $$i); \ + } \ + print(""); \ + } \ + }' ${MOVEDDIR}/${MOVEDFILE}; \ + fi \ + fi search: @${_PORTSEARCH} |