From owner-cvs-all Sun Mar 31 11:45:57 2002 Delivered-To: cvs-all@freebsd.org Received: from aldan.algebra.com (aldan.algebra.com [216.254.65.224]) by hub.freebsd.org (Postfix) with ESMTP id 393A737B41C; Sun, 31 Mar 2002 11:45:41 -0800 (PST) Received: from aldan.algebra.com (localhost [127.0.0.1]) by aldan.algebra.com (8.12.2/8.12.2) with ESMTP id g2VJjDFX032971; Sun, 31 Mar 2002 14:45:17 -0500 (EST) (envelope-from mi@aldan.algebra.com) Message-Id: <200203311945.g2VJjDFX032971@aldan.algebra.com> Date: Sun, 31 Mar 2002 14:45:13 -0500 (EST) From: Mikhail Teterin Subject: Re: malloc.h--cheaper by the dozen? To: trevor@jpj.net Cc: kris@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, portmgr@FreeBSD.org, wollman@FreeBSD.org, thierry@pompo.net In-Reply-To: <20020330232651.I16128-100000@blues.jpj.net> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 31 Mar, Trevor Johnson wrote: > Instead of having separate patches for dozens of ports, wouldn't the > maintenance be much easier if the patching were done from bsd.port.mk > instead? A few days ago, Thierry Thomas proposed [0] a patch which > would do just that. It could be argued that patching every single > port is wasteful, but how about a facility where the porter could > add a "MALLOC_PATCH= yes" or "MALLOC_PATCH= no" line to enable or > disable the patching (depending on whether it would default to being > on or off)? Maybe a warning could be generated, in case anything were > changed by the patching. Let me express my support for this proposal with the followin "pork barrel" attachment. If bsd.port.mk detects the LOCALBASE is different from /usr/local or X11BASE is different from /usr/X11R6 it shall do something like the following (untested) after the patching: find ${WRKSRC} -type f -print0 | \ xargs -0 ${GREP} -lE --null '/usr/X11R6|/usr/local' | \ xargs -0 ${PERL} -pi -e 's,/usr/X11R6,${X11BASE},g;' \ -e 's,/usr/local,${LOCALBASE},g' In many cases this is not neccessary, since configure scripts usually DTRT, but not always. Also the wrong path often ends up hardcoded in the documentation, etc. Some ports do this already, but this another one of those "cheaper by the dozen" things, IMHO. -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message