Date: Sun, 8 Oct 2006 04:32:08 +0200 From: Lars Engels <lars.engels@0x20.net> To: Florent Thoumie <flz@xbsd.org> Cc: VANHULLEBUS Yvan <vanhu_bsd@zeninc.net>, LI Xin <delphij@delphij.net>, freebsd-ports@freebsd.org Subject: Re: Ethereal not listed Message-ID: <20061008023207.GC62285@e.0x20.net> In-Reply-To: <1160055123.45511.8.camel@mayday.esat.net> References: <!&!AAAAAAAAAAAuAAAAAAAAAEOgyVY%2B4X9AvdwxUSZzMysBAJlFWO9tSrJEh27%2BaoXUr1UAAAAomREAABAAAACOckAfrRugTKcThu29JUP5AQAAAAA=@hotmail.com> <20061005083356.GA1083@jayce.zen.inc> <1160038831.26384.5.camel@localhost> <452507E1.7060400@delphij.net> <1160055123.45511.8.camel@mayday.esat.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--d01dLTUuW90fS44H Content-Type: multipart/mixed; boundary="eRtJSFbw+EEWtPj3" Content-Disposition: inline --eRtJSFbw+EEWtPj3 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 05, 2006 at 02:32:03PM +0100, Florent Thoumie wrote: > On Thu, 2006-10-05 at 21:25 +0800, LI Xin wrote: > > Florent Thoumie wrote: > >=20 > > I think teaching ${PORTSDIR}/Makefile about how to do 'make search=3D' = on > > MOVED as well might be good idea, though :-) >=20 > Maybe, I don't use 'make search'. Patches welcome, as usual :-) I also prefer 'make quicksearch' ;-) Attached is a patch for Mk/bsd.port.subdir.mk that allows to 'make search' in MOVED as well (activated by default) if one uses 'name=3D'. To disable searching in MOVED use 'make PORTSEARCH_MOVED=3D0 search'. Sample output: # make search name=3Dethereal Port: net/ethereal Moved: net/wireshark Date: 2006-07-17 Reason: Project name has changed Port: net/ethereal-lite Moved: net/wireshark-lite Date: 2006-07-17 Reason: Project name has changed [...] Any comments are welcome. -Lars --eRtJSFbw+EEWtPj3 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: attachment; filename="search_moved.patch" Content-Transfer-Encoding: quoted-printable --- bsd.port.subdir.mk.orig Sun Oct 8 01:18:03 2006 +++ bsd.port.subdir.mk Sun Oct 8 04:21:28 2006 @@ -271,6 +271,8 @@ .else INDEXFILE?=3D INDEX .endif +MOVEDDIR?=3D ${PORTSDIR} +MOVEDFILE?=3D MOVED =20 HTMLIFY=3D sed -e 's/&/\&/g' -e 's/>/\>/g' -e 's/</\</g' =20 @@ -331,6 +333,7 @@ PORTSEARCH_KEYLIM?=3D0 PORTSEARCH_XKEYLIM?=3D0 PORTSEARCH_IGNORECASE?=3D1 +PORTSEARCH_MOVED?=3D1 =20 _PORTSEARCH=3D \ here=3D${.CURDIR}; \ @@ -409,11 +412,11 @@ split(display, d, /,[ \t]*/); \ split(xdisplay, xd, /,[ \t]*/); \ for (i in d) { \ - toprint =3D 1;\ + toprint =3D 1; \ for (j in xd) { \ if (d[i] =3D=3D xd[j] ) { \ toprint=3D0; \ - break;\ + break; \ }\ } \ if (toprint =3D=3D 1 ) disp[fields[d[i]]] =3D 1; \ @@ -443,7 +446,29 @@ 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=3D"$$name" -v xname=3D"$$xname" \ + -v icase=3D"$${icase:-${PORTSEARCH_IGNORECASE}}" \ + 'BEGIN { \ + if (icase) { \ + if (length(name)) name =3D tolower(name); if (length(xname)) xnam= e =3D tolower(xname); \ + } \ + fields["name"] =3D 1; names[1] =3D "Port"; \ + fields["destination"] =3D 2; names[2] =3D "Moved"; \ + fields["date"] =3D 3; names[3] =3D "Date"; \ + fileds["reason"] =3D 4; names[4] =3D "Reason"; \ + } \ + { \ + if (((icase ? tolower($$1) : $$1) ~ name) || ((icase ? tolower($$= 2) : $$2) ~ name)) { \ + for (i =3D 1; i <=3D 4; i++) { \ + printf("%s:\t%s\n", names[i], $$i); \ + } \ + print(""); \ + } \ + }' ${MOVEDDIR}/${MOVEDFILE}; \ + fi \ + fi=20 =20 search: @${_PORTSEARCH} --eRtJSFbw+EEWtPj3-- --d01dLTUuW90fS44H Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFKGMnKc512sD3afgRAl9iAJ0Q8TixQBxIEwW4a5OeTl1jb3wQJgCfa06Q c6FjqSVOAftyePb5DXjDbf0= =Q8uj -----END PGP SIGNATURE----- --d01dLTUuW90fS44H--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061008023207.GC62285>