[gentoo-commits] repo/gentoo:master commit in: dev-lua/toluapp/, dev-lua/toluapp/files/

2020-10-13 Thread Marek Szuba
commit: 3af402bb34f314334ec7496a9fec777e197b7b99
Author: Marek Szuba  gentoo  org>
AuthorDate: Tue Oct 13 14:00:04 2020 +
Commit: Marek Szuba  gentoo  org>
CommitDate: Tue Oct 13 16:47:34 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3af402bb

dev-lua/toluapp: migrate to lua-single.eclass

Does not support Lua versions newer than 5.1 so didn't even bother
adapting this to multi-impl.

Signed-off-by: Marek Szuba  gentoo.org>

 .../toluapp-1.0.93_p20190513-lua-version.patch | 11 ++
 .../toluapp/toluapp-1.0.93_p20190513-r100.ebuild   | 40 ++
 2 files changed, 51 insertions(+)

diff --git a/dev-lua/toluapp/files/toluapp-1.0.93_p20190513-lua-version.patch 
b/dev-lua/toluapp/files/toluapp-1.0.93_p20190513-lua-version.patch
new file mode 100644
index 000..fda6c253c2e
--- /dev/null
+++ b/dev-lua/toluapp/files/toluapp-1.0.93_p20190513-lua-version.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -8,7 +8,7 @@
+ cmake_minimum_required ( VERSION 2.8 )
+ include ( cmake/dist.cmake )
+ 
+-find_package ( Lua REQUIRED )
++find_package ( Lua ${LUA_VERSION} EXACT REQUIRED )
+ include_directories ( include src/lib ${LUA_INCLUDE_DIR} )
+ 
+ # Build lib

diff --git a/dev-lua/toluapp/toluapp-1.0.93_p20190513-r100.ebuild 
b/dev-lua/toluapp/toluapp-1.0.93_p20190513-r100.ebuild
new file mode 100644
index 000..ab25d1fac8d
--- /dev/null
+++ b/dev-lua/toluapp/toluapp-1.0.93_p20190513-r100.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Newer Lua versions are NOT supported, see Bug #508222
+LUA_COMPAT=( lua5-1 )
+
+inherit cmake lua-single
+
+MY_PN=${PN/pp/++}
+COMMIT_ID="b34075b76835b778bb6b2ce0aa224afd9d182887"
+
+DESCRIPTION="A tool to integrate C/C++ code with Lua"
+HOMEPAGE="https://github.com/LuaDist/toluapp;
+SRC_URI="https://github.com/LuaDist/toluapp/archive/${COMMIT_ID}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+RDEPEND="${LUA_DEPS}"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${PN}-${COMMIT_ID}"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.0.93_p20190513-fix-multilib.patch
+   "${FILESDIR}"/${PN}-1.0.93_p20190513-lua-version.patch
+)
+CMAKE_REMOVE_MODULES_LIST="dist.cmake lua.cmake FindLua.cmake"
+
+src_configure() {
+   local mycmakeargs=(
+   -DLUA_VERSION=$(ver_cut 1-2 $(lua_get_version))
+   )
+   cmake_src_configure
+}



[gentoo-commits] repo/gentoo:master commit in: dev-lua/toluapp/, dev-lua/toluapp/files/

2019-06-16 Thread David Seifert
commit: 795a587235c11f13c183e2ee4277322f3ac8e8af
Author: David Seifert  gentoo  org>
AuthorDate: Sun Jun 16 15:00:52 2019 +
Commit: David Seifert  gentoo  org>
CommitDate: Sun Jun 16 15:00:52 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=795a5872

dev-lua/toluapp: Fix packaging and drop lua 5.3 patches

Closes: https://bugs.gentoo.org/688070
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: David Seifert  gentoo.org>

 .../toluapp-1.0.93_p20190513-fix-multilib.patch|   3 +-
 .../files/toluapp-1.0.93_p20190513-lua5.3.patch| 534 -
 ...3.ebuild => toluapp-1.0.93_p20190513-r1.ebuild} |   3 +-
 3 files changed, 3 insertions(+), 537 deletions(-)

diff --git a/dev-lua/toluapp/files/toluapp-1.0.93_p20190513-fix-multilib.patch 
b/dev-lua/toluapp/files/toluapp-1.0.93_p20190513-fix-multilib.patch
index 21ebc499238..b8f1cd3759f 100644
--- a/dev-lua/toluapp/files/toluapp-1.0.93_p20190513-fix-multilib.patch
+++ b/dev-lua/toluapp/files/toluapp-1.0.93_p20190513-fix-multilib.patch
@@ -18,7 +18,7 @@
1 )
  
  # Build app
-@@ -27,10 +27,11 @@
+@@ -27,10 +27,12 @@
  set ( SRC_TOLUA src/bin/tolua.c src/bin/toluabind.c )
  add_executable ( toluapp ${SRC_TOLUA} )
  target_link_libraries ( toluapp toluapp_lib ${LUA_LIBRARIES} )
@@ -35,3 +35,4 @@
 +install( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )
 +install( FILES README DESTINATION ${CMAKE_INSTALL_DOCDIR} )
 +install( DIRECTORY doc/ DESTINATION ${CMAKE_INSTALL_DOCDIR}/html )
++install( DIRECTORY src/bin/lua/ DESTINATION 
${CMAKE_INSTALL_DATADIR}/toluapp/luapp )

diff --git a/dev-lua/toluapp/files/toluapp-1.0.93_p20190513-lua5.3.patch 
b/dev-lua/toluapp/files/toluapp-1.0.93_p20190513-lua5.3.patch
deleted file mode 100644
index 4da3e33e7fe..000
--- a/dev-lua/toluapp/files/toluapp-1.0.93_p20190513-lua5.3.patch
+++ /dev/null
@@ -1,534 +0,0 @@
-Taken from 
https://aur.archlinux.org/cgit/aur.git/tree/tolua53.patch?h=tolua%2b%2b_5.3
-and slimmed down
-
 a/src/bin/lua/all.lua
-+++ b/src/bin/lua/all.lua
-@@ -1,8 +1,8 @@
- dofile(path.."compat-5.1.lua")
- dofile(path.."compat.lua")
--dofile(path.."basic.lua")
- dofile(path.."feature.lua")
- dofile(path.."verbatim.lua")
-+dofile(path.."basic.lua")
- dofile(path.."code.lua")
- dofile(path.."typedef.lua")
- dofile(path.."container.lua")
 a/src/bin/lua/basic.lua
-+++ b/src/bin/lua/basic.lua
-@@ -75,8 +75,8 @@
- end
- 
- function applyrenaming (s)
--  for i=1,getn(_renaming) do
--   local m,n = gsub(s,_renaming[i].old,_renaming[i].new)
-+  for i,v in ipairs(_renaming) do
-+   local m,n = gsub(s,v.old,v.new)
-   if n ~= 0 then
-return m
-   end
-@@ -252,7 +252,8 @@
- -- concatenate all parameters, following output rules
- function concatparam (line, ...)
-  local i=1
-- while i<=arg.n do
-+ local arg={...}
-+ while i<=#arg do
-   if _cont and not strfind(_cont,'[%(,"]') and
-  strfind(arg[i],"^[%a_~]") then
-   line = line .. ' '
-@@ -263,7 +264,7 @@
-   end
-   i = i+1
-  end
-- if strfind(arg[arg.n],"[%/%)%;%{%}]$") then
-+ if strfind(arg[#arg],"[%/%)%;%{%}]$") then
-   _cont=nil line = line .. '\n'
-  end
-   return line
-@@ -272,7 +273,8 @@
- -- output line
- function output (...)
-  local i=1
-- while i<=arg.n do
-+ local arg = {...}
-+ while i<=#arg do
-   if _cont and not strfind(_cont,'[%(,"]') and
-  strfind(arg[i],"^[%a_~]") then
-   write(' ')
-@@ -283,7 +285,7 @@
-   end
-   i = i+1
-  end
-- if strfind(arg[arg.n],"[%/%)%;%{%}]$") then
-+ if strfind(arg[#arg],"[%/%)%;%{%}]$") then
-   _cont=nil write('\n')
-  end
- end
-@@ -373,9 +375,10 @@
- 
- end
- 
-+
- -- called to output an error message
- function output_error_hook(...)
--  return string.format(...)
-+  return string.format(table.unpack{...})
- end
- 
- -- custom pushers
 a/src/bin/lua/class.lua
-+++ b/src/bin/lua/class.lua
-@@ -92,7 +92,7 @@
-   self.btype = typevar(self.base)
-   self.ctype = 'const '..self.type
-   if self.extra_bases then
--  for i=1,table.getn(self.extra_bases) do
-+  for i=1,#self.extra_bases do
-   self.extra_bases[i] = typevar(self.extra_bases[i])
-   end
-   end
-@@ -138,9 +138,9 @@
- -- Expects the name, the base (array) and the body of the class.
- function Class (n,p,b)
- 
--  if table.getn(p) > 1 then
-+  if #p > 1 then
-   b = string.sub(b, 1, -2)
--  for i=2,table.getn(p),1 do
-+  for i=2,#p,1 do
-   b = b.."\n tolua_inherits "..p[i].." __"..p[i].."__;\n"
-   end
-   b = b.."\n}"
 a/src/bin/lua/clean.lua
-+++ b/src/bin/lua/clean.lua
-@@ -19,14 +19,14 @@
- }
- 
- function mask (s)
-- for i = 1,getn(MASK)  do
-+ for i = 1,#MASK  do
-   s = gsub(s,MASK[i][2],MASK[i][1])
-  end
-  return s
- end
- 
- function unmask (s)
-- for i = 1,getn(MASK)  do
-+ for i = 1,#MASK  do