public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/lua:master commit in: dev-lua/srlua/files/patches/5.3/, dev-lua/srlua/, dev-lua/srlua/files/
@ 2018-08-08 16:19 Vadim A. Misbakh-Soloviov
  0 siblings, 0 replies; only message in thread
From: Vadim A. Misbakh-Soloviov @ 2018-08-08 16:19 UTC (permalink / raw
  To: gentoo-commits

commit:     217dc88ed124fc1ecdf9d51bb3b7fafdd8e9d024
Author:     Vadim A. Misbakh-Soloviov <git <AT> mva <DOT> name>
AuthorDate: Wed Aug  8 16:16:57 2018 +0000
Commit:     Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name>
CommitDate: Wed Aug  8 16:16:57 2018 +0000
URL:        https://gitweb.gentoo.org/proj/lua.git/commit/?id=217dc88e

srlua: bump

 dev-lua/srlua/Manifest                             |  2 +-
 dev-lua/srlua/files/Makefile                       |  4 ++++
 dev-lua/srlua/files/glue                           | 14 ++++++-----
 .../files/patches/5.3/lua51-compatibility.patch    | 14 -----------
 .../srlua/{srlua-5.3.ebuild => srlua-101.ebuild}   | 28 ++++++++--------------
 5 files changed, 23 insertions(+), 39 deletions(-)

diff --git a/dev-lua/srlua/Manifest b/dev-lua/srlua/Manifest
index 425ad02..35f440a 100644
--- a/dev-lua/srlua/Manifest
+++ b/dev-lua/srlua/Manifest
@@ -1 +1 @@
-DIST srlua-5.3.tar.gz 3071 SHA256 bc801b454e0d9420b4d50934a6a046cafb8a6596d2da4b3b2bed97c414272d99 SHA512 fd172acde659e9a95ed28d8b60be68d5ed7046201cd5bfbe02402ca1d08646b5383d032d62a4b56d5a89341e224eacc4b94174175a39e38639fb2fc9d4a81475 WHIRLPOOL 39ba1a741a4219daf6b11a0c73aae35027d545bc65d8810297ce87831424e7f30642d8e71a532bd79eaa0a2d0011d369129e495f769457896b4d3b10c8ceaca1
+DIST srlua-101.tar.gz 3487 SHA256 2ab5e55670533ed1e445e5edd88b6b6a003c8a019113b9b7de327a087e6a7263 SHA512 827ac6b6b65100d8b159bfc30c7bbd4187d2df80a4e29ef0cdb4e2b4c7f44a132f254c02ed866d72abc8b0e33f64d169128ec653c2db722c267e28a5c62e3630 WHIRLPOOL c2883f3e366fb830ae33ef39d3242e7adfa4f9c0255bdadf4c738ff813d69ddc19e2c02c75ca0de971070aa28b2778cc993071679dfed9d026900716d84378ae

diff --git a/dev-lua/srlua/files/Makefile b/dev-lua/srlua/files/Makefile
new file mode 100644
index 0000000..0b9fefb
--- /dev/null
+++ b/dev-lua/srlua/files/Makefile
@@ -0,0 +1,4 @@
+all:
+	$(CC) $(CFLAGS) -o glue srglue.c
+	$(CC) $(CFLAGS) -o srlua srlua.c -Wl,-E $(STATIC) -ldl $(LUA_LINK_LIB)
+

diff --git a/dev-lua/srlua/files/glue b/dev-lua/srlua/files/glue
index b459ade..4768bbc 100644
--- a/dev-lua/srlua/files/glue
+++ b/dev-lua/srlua/files/glue
@@ -20,7 +20,7 @@ end
 local function getabis(abi)
 	local ret={}
 	local abistr
-	local abi=abi or ""
+	local abi=abi or "*"
 	local arch
 
 	if abi=="default" then
@@ -32,12 +32,12 @@ local function getabis(abi)
 		end
 	end
 
-	abistr=(io.popen("cd "..libexec.." 2>/dev/null; echo srlua."..abi.."*"):read() or "")
+	abistr=(io.popen(("echo %s/%s/srlua*"):format(libexec,abi)):read() or "")
 
 	if abistr:match("%*") then abistr="" end -- failed matching -> nothing found
 
 	if #abistr>8 then
-		for abi in abistr:gmatch("srlua.(%S*)") do
+		for abi in abistr:gmatch(libexec.."/(%S*)/srlua") do
 			table.insert(ret,abi)
 		end
 	end
@@ -51,7 +51,7 @@ local function help(err,msg)
 		p""
 	end
 	p"Description:"
-	p"This is a wrapper on original `glue` program from `srlua` package"
+	p"This is a wrapper on original `srglue` program from `srlua` package"
 	p"The only difference is that you should pass 'ABI' string instead of path to `srlua`"
 	p""
 	p"Usage:"
@@ -92,7 +92,7 @@ local function argparse(argv)
 	if #abi==0 then
 		help(true,"There is no such ABI that you specified.")
 	elseif #abi>1 then
-		help(true,"Multiple ABIs matched your ABI selection. Please, be more specific.")
+		help(true,("Multiple ABIs (%d) matched your ABI selection. Please, be more specific."):format(#abi))
 		--local interpreter, multilib = k:match("(%S*)%.(%w-)$")
 	else
 		abi=abi[1]
@@ -106,7 +106,9 @@ local function argparse(argv)
 	chmod="chmod" -- TODO: setfacl support
 	chmod_mod="755"
 
-	os.exit(os.execute(libexec.."/glue "..libexec.."/srlua."..abi.." "..script.." "..out.." && "..chmod.." "..chmod_mod.." "..out))
+	local abidir=libexec.."/"..abi
+
+	os.exit(os.execute(("%s/glue %s/srlua %s %s && %s %s %s"):format(abidir,abidir,script,out,chmod,chmod_mod,out)))
 end
 
 if #arg>3 or #arg==0 then

diff --git a/dev-lua/srlua/files/patches/5.3/lua51-compatibility.patch b/dev-lua/srlua/files/patches/5.3/lua51-compatibility.patch
deleted file mode 100644
index dda7663..0000000
--- a/dev-lua/srlua/files/patches/5.3/lua51-compatibility.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/srlua.c	2017-04-09 16:28:56.780761259 +0700
-+++ b/srlua.c	2017-04-09 16:34:40.159417660 +0700
-@@ -28,6 +28,10 @@
- #define getprogname()
- #endif
- 
-+#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
-+#define lua_load(L,reader,dt,chunkname,mode) lua_load(L,reader,dt,chunkname)
-+#endif
-+
- typedef struct
- {
-  FILE *f;
-

diff --git a/dev-lua/srlua/srlua-5.3.ebuild b/dev-lua/srlua/srlua-101.ebuild
similarity index 50%
rename from dev-lua/srlua/srlua-5.3.ebuild
rename to dev-lua/srlua/srlua-101.ebuild
index 2a4294e..30b9047 100644
--- a/dev-lua/srlua/srlua-5.3.ebuild
+++ b/dev-lua/srlua/srlua-101.ebuild
@@ -1,34 +1,27 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 IS_MULTILIB=true
 
 inherit lua
 
-DESCRIPTION=""
+DESCRIPTION="A simple tool, that help you to glue lua script with interpreter"
 HOMEPAGE="http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/index.html#srlua"
-SRC_URI="http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/${PV}/${PN}.tar.gz -> ${P}.tar.gz"
+SRC_URI="http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/ar/${P}.tar.gz"
 
 LICENSE="public-domain"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~hppa ~mips x86"
-IUSE=""
+IUSE="+static-libs"
 
 DOCS=(README)
 
-LUA_S="${PN}"
-
-PATCHES=("${FILESDIR}/patches/${PV}")
-
 all_lua_prepare() {
-	sed -r \
-		-e '2aCFLAGS+=-Wall -Wextra -O0 -ggdb' \
-		-e '2aLDFLAGS=-fPIC' \
-		-e '2aLIBS=$(LDFLAGS) $(LUA_LINK_LIB) -ldl' \
-		-e '2,/^LIBS/d' \
-		-i Makefile
+	local myeprepareargs=()
+	use static-libs && myeprepareargs+=("STATIC=-static")
+	cp "${FILESDIR}/Makefile" "${S}"
 	lua_default
 }
 
@@ -39,9 +32,8 @@ each_lua_test() {
 each_lua_install() {
 	local m_abi="${CHOST%%-*}"
 	local l_abi="$(lua_get_lua)"
-	exeinto /usr/libexec/"${PN}"
-	newexe "${PN}" "${PN}.${l_abi}.${m_abi}"
-	#newexe glue "glue.${l_abi}.${m_abi}"
-	multilib_is_native_abi && doexe glue
+	exeinto "/usr/libexec/${PN}/${l_abi}.${m_abi}"
+	doexe "${PN}"
+	doexe "glue"
 	dobin "${FILESDIR}"/glue
 }


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-08-09  6:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-08 16:19 [gentoo-commits] proj/lua:master commit in: dev-lua/srlua/files/patches/5.3/, dev-lua/srlua/, dev-lua/srlua/files/ 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