From owner-freebsd-ports@FreeBSD.ORG Tue Apr 30 10:38:25 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 A2F99EE0 for ; Tue, 30 Apr 2013 10:38:25 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-we0-x22f.google.com (mail-we0-x22f.google.com [IPv6:2a00:1450:400c:c03::22f]) by mx1.freebsd.org (Postfix) with ESMTP id 3E1B718A8 for ; Tue, 30 Apr 2013 10:38:25 +0000 (UTC) Received: by mail-we0-f175.google.com with SMTP id i48so295196wef.6 for ; Tue, 30 Apr 2013 03:38:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=q3HfrE4PspksYKLlJ8Tm7nklGFA4LmSVSkYRtVPN28c=; b=fJ0VAt38Abt87egX2NvDCBHV1T3Nmq9kn5/OYZ3KMZRhHY437l/7+CwhUhaeTcoup6 SUTasuxoqIgbCDiWF3oevR3PwAqs+SMZf/tZ6CSKY/4pVItVJ7NjT03IZom+/nfR3uWC 0ZfQRQRdsfpFsaN5+4P5Uz5sFKNrzAiPN5rZIQ1yn/d208XtvGM+FyHJR4zWXHxmgUIr goX0ArxNsD5QAdwGmS4fAkIWRBGTJoPBlfQbl6ERCIegH+ISrFgshHuDntesaB7fpJnJ lDtgtrTQdeR5y95S1l4PHPUbo08DbAofJGygx1b0SzNaK7yQPrhtmALFBNyHFslhRsq6 fexg== X-Received: by 10.194.92.176 with SMTP id cn16mr84336385wjb.51.1367318304196; Tue, 30 Apr 2013 03:38:24 -0700 (PDT) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPSA id g4sm28019716wib.11.2013.04.30.03.38.22 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 30 Apr 2013 03:38:23 -0700 (PDT) Sender: Baptiste Daroussin Date: Tue, 30 Apr 2013 12:38:21 +0200 From: Baptiste Daroussin To: ports@FreeBSD.org Subject: [BRAINSTORM] shebang fixing framework Message-ID: <20130430103821.GJ3577@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2fjX3cMESU3XgGmZ" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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 10:38:25 -0000 --2fjX3cMESU3XgGmZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, For a while now: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/51152 we are looking for a framework/helpers to help patching scripts shebang so that they fit where the interpreters is on FreeBSD. We also want to get rid of /usr/bin/perl http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/170219 and such helpers would help here is what I do propose: http://people.freebsd.org/~bapt/shebangfix.mk.txt How the above works: USES= shebangfix SHEBANG_LANG= perl perl_FILES= *.pl you want to create a custom one for the joescript? USES= shebangfix SHEBANG_LANG= joescript joescript_FILES= *.joe joescript_OLD_CMD= /usr/bin/joe joescript_CMD= ${LOCALBASE}/bin/joe How to fix both python and perl scripts: USES= shebangfix SHEBANG_LANG= perl python perl_FILES= *.pl python_FILES= bin/*.py myscript/script.py the _FILES should be relative to ${WRKSRC} it can be globbing So far what has been proposed already is: - replace ${lang}_FILES by FIX_${lang} - nuke SHEBANG_LANG in favor of USES= shebangfix:perl:python - nuke SHEBANG_LANG in favor of USES= shebangfix:"perl python" - nuke SHEBANG_LANG in favor of USES= shebangfix:perl+python What do you guys think about it, what do you propose. What majority prefers will be implemented and committed during BSDCan! regards, Bapt --2fjX3cMESU3XgGmZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlF/nx0ACgkQ8kTtMUmk6ExHQgCfSq98GCnS/63P1DF4ToWWCuh8 yusAmwUG+mq/6Ik5ZQjkQG5J3VC9DAbh =msZK -----END PGP SIGNATURE----- --2fjX3cMESU3XgGmZ--