public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/lua:master commit in: dev-lua/iluajit/files/, dev-lua/iluajit/
@ 2015-05-11  9:20 Vadim A. Misbakh-Soloviov
  0 siblings, 0 replies; 2+ messages in thread
From: Vadim A. Misbakh-Soloviov @ 2015-05-11  9:20 UTC (permalink / raw
  To: gentoo-commits

commit:     c93be8bad5c6c628451c8af913077cd03d424b8c
Author:     Vadim A. Misbakh-Soloviov <git <AT> mva <DOT> name>
AuthorDate: Mon May 11 09:18:48 2015 +0000
Commit:     Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name>
CommitDate: Mon May 11 09:18:48 2015 +0000
URL:        https://gitweb.gentoo.org/proj/lua.git/commit/?id=c93be8ba

[dev-lua/luajit] replaced wrapper

Signed-off-by: Vadim A. Misbakh-Soloviov <git <AT> mva.name>

 dev-lua/iluajit/files/iluajit       | 90 +++++++++++++++++++++++++++++++++++++
 dev-lua/iluajit/iluajit-9999.ebuild |  3 +-
 2 files changed, 92 insertions(+), 1 deletion(-)

diff --git a/dev-lua/iluajit/files/iluajit b/dev-lua/iluajit/files/iluajit
new file mode 100755
index 0000000..8c48baf
--- /dev/null
+++ b/dev-lua/iluajit/files/iluajit
@@ -0,0 +1,90 @@
+#!luajit --
+
+-- Hide the shebang, since we don't hope env to be in /usr/bin, so just
+-- executing LuaJIT from the PATH, and make a pokerface, like we called
+-- it from env
+arg[-1]=arg[-2];
+arg[-2]=nil;
+
+local function run(cmd)
+    local f = io.popen(cmd..' 2>&1; echo "-retcode:$?"', 'r') -- XXX: Windows compat?
+    local l = f:read('*a')
+    f:close()
+    local i1,i2,ret = l:gsub("\n%-retcode","-retcode"):find('%-retcode:(%d+)\n$')
+    l = l:sub(1,i1-1)
+    return l,tonumber(ret)
+end
+
+local function exists(name)
+    if type(name)~="string" then return false end
+    return os.rename(name,name) and true or false
+end
+
+local ignore_argc=0;
+local force_interactive = false;
+local interactive = true;
+for i,v in pairs(arg) do
+	if ignore_argc>0 then
+		ignore_argc=-1;
+	elseif (v:match("^-l")) then
+		local req;
+		if (#v>2) then
+			req=v:match("^-l(.*)");
+		else
+			local nextarg=arg[i+1];
+			if (type(nextarg)=="string") then
+				ignore_argc=ignore_argc+1;
+				req=nextarg;
+			end
+		end
+		require(req);
+	elseif (v:match("^-e")) then
+		local ex;
+		if (#v>2) then
+			ex=v:match("^-e(.*)");
+		else
+			local nextarg=arg[i+1];
+			if (type(nextarg)=="string") then
+				ignore_argc=ignore_argc+1;
+				ex=nextarg;
+			end
+		end
+		loadstring(ex)();
+	elseif (v:match("^-i")) then
+		force_interactive=true;
+	elseif (v:match("^-b")) then
+		ignore_argc=math.huge; -- working with bytecode is incompatible with other options
+		local argv=arg;
+		for k,v in ipairs(argv) do
+			if v:match("^-[b]?[^ ]*e") then
+				argv[k+1]=[[']]..argv[k+1]:gsub([['(.*)']],[["%1"]])..[[']]
+				print(argv[k+1])
+			end
+		end
+		local args=table.concat(argv,' ')
+		local res,err=run("luajit "..args);
+		if (err==0) then
+			print(res);
+		else
+			local err_msg;
+			if res:find("\n") then
+				err_msg="\n"..res;
+			else
+				err_msg=res;
+			end
+			print("Error! Exit code: "..err.."; Message: "..(err_msg or "<no message>"))
+		end
+	elseif (i>0) then
+		interactive=false;
+		if (exists(v)) then
+			loadfile(v)();
+		end
+	end
+end
+if (force_interactive) then
+	interactive=true;
+end
+
+if (interactive and ignore_argc<math.huge) then
+	require("iluajit")
+end

diff --git a/dev-lua/iluajit/iluajit-9999.ebuild b/dev-lua/iluajit/iluajit-9999.ebuild
index b8d573c..f888097 100644
--- a/dev-lua/iluajit/iluajit-9999.ebuild
+++ b/dev-lua/iluajit/iluajit-9999.ebuild
@@ -39,5 +39,6 @@ src_install() {
 	insinto "${lmod}"
 	doins *.lua
 
-	make_wrapper "${PN}" "luajit ${lmod}/${PN}.lua"
+#	make_wrapper "${PN}" "luajit -l ${PN}"
+	dobin ${FILESDIR}/${PN}
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/lua:master commit in: dev-lua/iluajit/files/, dev-lua/iluajit/
@ 2016-05-27 22:13 Vadim A. Misbakh-Soloviov
  0 siblings, 0 replies; 2+ messages in thread
From: Vadim A. Misbakh-Soloviov @ 2016-05-27 22:13 UTC (permalink / raw
  To: gentoo-commits

commit:     2c481f352af476396598f0f9dc4a22a026b7fe67
Author:     Vadim A. Misbakh-Soloviov <git <AT> mva <DOT> name>
AuthorDate: Wed May 25 13:09:22 2016 +0000
Commit:     Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name>
CommitDate: Wed May 25 13:09:22 2016 +0000
URL:        https://gitweb.gentoo.org/proj/lua.git/commit/?id=2c481f35

iluajit: bump

 dev-lua/iluajit/files/iluajit       |  2 +-
 dev-lua/iluajit/iluajit-9999.ebuild | 15 ++++++---------
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/dev-lua/iluajit/files/iluajit b/dev-lua/iluajit/files/iluajit
index 8c48baf..fe9c705 100755
--- a/dev-lua/iluajit/files/iluajit
+++ b/dev-lua/iluajit/files/iluajit
@@ -1,4 +1,4 @@
-#!luajit --
+#!/usr/bin/luajit --
 
 -- Hide the shebang, since we don't hope env to be in /usr/bin, so just
 -- executing LuaJIT from the PATH, and make a pokerface, like we called

diff --git a/dev-lua/iluajit/iluajit-9999.ebuild b/dev-lua/iluajit/iluajit-9999.ebuild
index bb0b648..7d0be0e 100644
--- a/dev-lua/iluajit/iluajit-9999.ebuild
+++ b/dev-lua/iluajit/iluajit-9999.ebuild
@@ -2,18 +2,16 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: This ebuild is from Lua overlay; Bumped by mva; $
 
-EAPI="5"
+EAPI=6
 
-LUA_COMPAT="luajit2"
-VCS="git-r3"
+LUA_COMPAT=luajit2
+VCS=git
+GITHUB_A=jdesgats
+GITHUB_PN=ILuaJIT
 
 inherit lua
 
 DESCRIPTION="Readline powered shell for LuaJIT"
-HOMEPAGE="https://github.com/jdesgats/ILuaJIT"
-SRC_URI=""
-
-EGIT_REPO_URI="https://github.com/jdesgats/ILuaJIT.git"
 
 LICENSE="MIT"
 SLOT="0"
@@ -29,7 +27,7 @@ RDEPEND="
 DEPEND="${RDEPEND}"
 
 READMES=( README.md )
-HTML_DOCS=( html/ )
+HTML_DOCS=( html/. )
 
 all_lua_prepare() {
 	use doc && luadoc . -d html
@@ -40,6 +38,5 @@ each_lua_install() {
 }
 
 all_lua_install() {
-#	make_wrapper "${PN}" "luajit -l ${PN}"
 	dobin ${FILESDIR}/${PN}
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-27 22:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-11  9:20 [gentoo-commits] proj/lua:master commit in: dev-lua/iluajit/files/, dev-lua/iluajit/ Vadim A. Misbakh-Soloviov
  -- strict thread matches above, loose matches on Subject: below --
2016-05-27 22:13 Vadim A. Misbakh-Soloviov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox