From owner-freebsd-ports@FreeBSD.ORG Tue Apr 30 17:52:12 2013 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 12560D79; Tue, 30 Apr 2013 17:52:12 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) by mx1.freebsd.org (Postfix) with ESMTP id D1A4410E3; Tue, 30 Apr 2013 17:52:11 +0000 (UTC) Received: by mail-ie0-f170.google.com with SMTP id at1so992160iec.1 for ; Tue, 30 Apr 2013 10:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=cMUOOwinHG0/aYjIieaSeXMGBAnfgGoF7gcumYWBdnA=; b=A27Je6B/64+DBc/icgHFMeMRWe7ZQEDfIlh9COKpRAqRPlpw+z4ySZ05YjKbr1b0s/ uhuJytraqnpm4Qfg6vIajUiyVSCy7OtPkVtJkNFumfmUmVCnqSJ3tFOftc16eBef6y5E 4406+2y0KMWz0PvglQ7INW/YJOAQJNuUZCpbWE4e5eKG77QxyzYw1fecXXIe+XvITg9X jv4Rcew+ajSRxkFtcKGB8sAkQ5PSHC4LijtQsyoj4Jq9l4g58HH31A7km5Tf8lLd89Io BdFr1uQiZhITdknmD5p/cfoK05f/tuodDJ6TFN3CI/Zf9GUmDY8urLIyrZr9gnnYwHl1 dUMg== MIME-Version: 1.0 X-Received: by 10.42.44.201 with SMTP id c9mr17240627icf.47.1367344331467; Tue, 30 Apr 2013 10:52:11 -0700 (PDT) Received: by 10.64.58.52 with HTTP; Tue, 30 Apr 2013 10:52:11 -0700 (PDT) Received: by 10.64.58.52 with HTTP; Tue, 30 Apr 2013 10:52:11 -0700 (PDT) In-Reply-To: References: <20130430103821.GJ3577@ithaqua.etoilebsd.net> <20130430173500.GP3577@ithaqua.etoilebsd.net> <20130430174130.GQ3577@ithaqua.etoilebsd.net> Date: Tue, 30 Apr 2013 18:52:11 +0100 Message-ID: Subject: Re: [BRAINSTORM] shebang fixing framework From: Chris Rees To: Eitan Adler Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: ports@freebsd.org, Baptiste Daroussin X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Apr 2013 17:52:12 -0000 On 30 Apr 2013 18:46, "Eitan Adler" wrote: > > On 30 April 2013 13:41, Baptiste Daroussin wrote: > > On Tue, Apr 30, 2013 at 01:38:03PM -0400, Eitan Adler wrote: > >> On 30 April 2013 13:35, Baptiste Daroussin wrote: > >> > All of this will be damn slow operations, we want to keep this as fast as > >> > possible, even if per-ports it seems quite fast, when you are about the build > >> > the whole ports tree few seconds there and there will become hours > >> > >> Yes, that is why I ended with "I guess it isn't too bad.", although I > >> guess it wasn't clear I meant needing lang_FILES. > >> > >> I'd prefer shebangfix_FILES and have all the language fixes apply > >> without needing to specify which one. > > > > most of the case you will know what file needs what shebang, so why trying all > > possible case when you can get it directly? > > If applied as a regex it doesn't really matter. > > I'm thinking it will look something like > > sed -e regex_for_perl \ > -e regex_for_python \ > -e regex_for_php \ > ${shebangfix_FILES} > > or some variant thereof > > now that I think about it a bit more it may even be faster than > forking once per language. How many ports are likely to have more than one language? This proposes running each regex over each file in turn. Chris