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

2024-01-22 Thread David Seifert
commit: 776c7c3b0ec869dd9e7c191489c3c46e5536f7ae
Author: David Seifert  gentoo  org>
AuthorDate: Mon Jan 22 12:56:51 2024 +
Commit: David Seifert  gentoo  org>
CommitDate: Mon Jan 22 12:56:51 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=776c7c3b

dev-lang/lua: drop 5.4.4-r103

Signed-off-by: David Seifert  gentoo.org>

 dev-lang/lua/Manifest  |  1 -
 .../lua/files/lua-5.4.4-lparser-overread.patch | 34 --
 dev-lang/lua/lua-5.4.4-r103.ebuild | 54 --
 3 files changed, 89 deletions(-)

diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest
index ec26d04f4fb5..8e8837da084c 100644
--- a/dev-lang/lua/Manifest
+++ b/dev-lang/lua/Manifest
@@ -1,4 +1,3 @@
 DIST lua-5.1.5.tar.xz 397416 BLAKE2B 
ef3880d78be1def383a9db6753b7aec4160f6fa8719529c2ea6266015771a23a1be81424520de10bb087a86081f1ec48c58c36eb8b24bff53adb6bd8d791e31b
 SHA512 
bd827cb2e63cd71d15d846eb29c8745bf869e7b70e12c565ce173623d1fcd29dabf4d33a99c48f294151bb580d830c112cf178e2d80a5a5c36acc7b3bfcd7d24
 DIST lua-5.3.6.tar.xz 541220 BLAKE2B 
c356cec06b14cdcbb29e382c951491432a3189618f9fd8c8832bdc8c831640fbcb9e212db05b61a577633c5fe9831e75a158cb97720c1e51cab27544526c9e24
 SHA512 
9a632a90806fa71398d70be7d38769065c1258fd94709cef72236753b42131b8d30da2a5dd28c74211ef8d04b0c30f52d0c593d49c2e8686568c8896b69577d7
-DIST lua-5.4.4.tar.xz 606456 BLAKE2B 
ba6cad647c0171e5e737151b189b5b404948c08182e9f17d7974a6c6c3b7d99b03cf930add863188db22674b8613fc600d771f62f9dfc99232aab9caea9b073c
 SHA512 
8f3950ed5972a29d7c79e72af617526f6b9f6be7ab268e66206d7e453acc2564541c9d01e2de08a7e9046ab24c66b02167e48a0d5764753befd95dc922b61219
 DIST lua-5.4.6.tar.xz 608376 BLAKE2B 
bec47685a24be429fa930ac02e6930300ad77105c56d970d3f1a9a6241c23da5ea77b863e9eca36b6c20e1ef1dc90f3635afe9b09dc4221f1e5dd72ce951df38
 SHA512 
8e7f6bd9d7fdf9327134f7eb01a78df87141989ea0d95f331eb0e71acdbf7c7b7d908da95e16cd91b3f9bad1b496e3b4db2380a851557f29cdc53f4f5255cda5

diff --git a/dev-lang/lua/files/lua-5.4.4-lparser-overread.patch 
b/dev-lang/lua/files/lua-5.4.4-lparser-overread.patch
deleted file mode 100644
index 3e625aa4ffc0..
--- a/dev-lang/lua/files/lua-5.4.4-lparser-overread.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 
https://github.com/lua/lua/commit/1f3c6f4534c6411313361697d98d1145a1f030fa Mon 
Sep 17 00:00:00 2001
-From: Roberto Ierusalimschy 
-Date: Tue, 15 Feb 2022 12:28:46 -0300
-Subject: [PATCH] Bug: Lua can generate wrong code when _ENV is 
-
 a/src/lparser.c
-+++ b/src/lparser.c
-@@ -468,6 +468,7 @@ static void singlevar (LexState *ls, expdesc *var) {
- expdesc key;
- singlevaraux(fs, ls->envn, var, 1);  /* get environment variable */
- lua_assert(var->k != VVOID);  /* this one must exist */
-+luaK_exp2anyregup(fs, var);  /* but could be a constant */
- codestring(, varname);  /* key is variable name */
- luaK_indexed(fs, var, );  /* env[varname] */
-   }
 a/tests/attrib.lua
-+++ b/tests/attrib.lua
-@@ -434,6 +434,16 @@ 
a.aVeryLongName012345678901234567890123456789012345678901234567890123456789 ==
- 10)
-
-
-+do
-+  -- _ENV constant
-+  local function foo ()
-+local _ENV  = 11
-+X = "hi"
-+  end
-+  local st, msg = pcall(foo)
-+  assert(not st and string.find(msg, "number"))
-+end
-+
-
- -- test of large float/integer indices
-

diff --git a/dev-lang/lua/lua-5.4.4-r103.ebuild 
b/dev-lang/lua/lua-5.4.4-r103.ebuild
deleted file mode 100644
index ebfa8021edc3..
--- a/dev-lang/lua/lua-5.4.4-r103.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic optfeature
-
-DESCRIPTION="A powerful light-weight programming language designed for 
extending applications"
-HOMEPAGE="https://www.lua.org/;
-# tarballs produced from ${PV} branches in 
https://gitweb.gentoo.org/proj/lua-patches.git
-SRC_URI="https://dev.gentoo.org/~soap/distfiles/${P}.tar.xz;
-
-LICENSE="MIT"
-SLOT="5.4"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~x64-solaris"
-IUSE="+deprecated readline"
-
-DEPEND="
-   >=app-eselect/eselect-lua-3
-   readline? ( sys-libs/readline:= )
-   !dev-lang/lua:0"
-RDEPEND="${DEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
-   "${FILESDIR}/${P}-lparser-overread.patch"
-)
-
-src_prepare() {
-   default
-
-   if use elibc_musl; then
-   # locales on musl are non-functional (#834153)
-   # https://wiki.musl-libc.org/open-issues.html#Locale-limitations
-   sed -e 's|os.setlocale("pt_BR") or os.setlocale("ptb")|false|g' 
\
-   -i tests/literals.lua || die
-   fi
-}
-
-src_configure() {
-   use deprecated && append-cppflags -DLUA_COMPAT_5_3
-   econf $(use_with readline)
-}
-
-src_install() {
-   default
-   find 

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

2023-10-17 Thread Sam James
commit: 1f721528f36fd090e3338b5293918323caf30900
Author: Sam James  gentoo  org>
AuthorDate: Tue Oct 17 09:13:09 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Oct 17 09:13:09 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f721528

dev-lang/lua: fix tests on sparc

Backport upstream patch to fix sparc tests. This just drops the bad test and
makes a semantically-identical change to another function, so no revbump needed.

Closes: https://bugs.gentoo.org/914562
Signed-off-by: Sam James  gentoo.org>

 dev-lang/lua/files/lua-5.4.6-sparc-tests.patch | 44 ++
 dev-lang/lua/lua-5.4.6.ebuild  |  5 +++
 2 files changed, 49 insertions(+)

diff --git a/dev-lang/lua/files/lua-5.4.6-sparc-tests.patch 
b/dev-lang/lua/files/lua-5.4.6-sparc-tests.patch
new file mode 100644
index ..29515aad1639
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.4.6-sparc-tests.patch
@@ -0,0 +1,44 @@
+https://github.com/lua/lua/commit/6baee9ef9d5657ab582c8a4b9f885ec58ed502d0
+https://bugs.gentoo.org/914562
+
+From 6baee9ef9d5657ab582c8a4b9f885ec58ed502d0 Mon Sep 17 00:00:00 2001
+From: Roberto Ierusalimschy 
+Date: Fri, 8 Sep 2023 16:19:21 -0300
+Subject: [PATCH] Removed test for "corrupted binary dump"
+
+Test is too non portable. (For instance, it does not work for
+different number types.)
+--- a/src/lundump.c
 b/src/lundump.c
+@@ -81,7 +81,7 @@ static size_t loadUnsigned (LoadState *S, size_t limit) {
+ 
+ 
+ static size_t loadSize (LoadState *S) {
+-  return loadUnsigned(S, ~(size_t)0);
++  return loadUnsigned(S, MAX_SIZET);
+ }
+ 
+ 
+--- a/tests/calls.lua
 b/tests/calls.lua
+@@ -342,20 +342,6 @@ do   -- another bug (in 5.4.0)
+ end
+ 
+ 
+-do   -- another bug (since 5.2)
+-  -- corrupted binary dump: list of upvalue names is larger than number
+-  -- of upvalues, overflowing the array of upvalues.
+-  local code =
+-   "\x1b\x4c\x75\x61\x54\x00\x19\x93\x0d\x0a\x1a\x0a\x04\x08\x08\x78\x56\z
+-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x77\x40\x00\x86\x40\z
+-\x74\x65\x6d\x70\x81\x81\x01\x00\x02\x82\x48\x00\x02\x00\xc7\x00\x01\z
+-\x00\x80\x80\x80\x82\x00\x00\x80\x81\x82\x78\x80\x82\x81\x86\x40\x74\z
+-\x65\x6d\x70"
+-
+-  assert(load(code))   -- segfaults in previous versions
+-end
+-
+-
+ x = string.dump(load("x = 1; return x"))
+ a = assert(load(read1(x), nil, "b"))
+ assert(a() == 1 and _G.x == 1)

diff --git a/dev-lang/lua/lua-5.4.6.ebuild b/dev-lang/lua/lua-5.4.6.ebuild
index c7fd11588774..c5d1c9109b73 100644
--- a/dev-lang/lua/lua-5.4.6.ebuild
+++ b/dev-lang/lua/lua-5.4.6.ebuild
@@ -22,6 +22,11 @@ DEPEND="
 RDEPEND="${DEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=(
+   # Backported variant of upstream patch to fix sparc tests, bug #914562
+   "${FILESDIR}"/${PN}-5.4.6-sparc-tests.patch
+)
+
 src_prepare() {
default
 



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

2022-09-26 Thread David Seifert
commit: 4fb0d3e7e9eafdd19a6931dce5948016ddc351e0
Author: Federico Denkena  posteo  de>
AuthorDate: Mon Sep 26 15:43:34 2022 +
Commit: David Seifert  gentoo  org>
CommitDate: Mon Sep 26 15:43:34 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fb0d3e7

dev-lang/lua: Fix for CVE-2022-28805

This commit fixes CVE-2022-28805 (patch from upstream, slightly modified
due to changed file paths in gentoo).

Closes: https://github.com/gentoo/gentoo/pull/27423
Bug: https://bugs.gentoo.org/837521
Signed-off-by: Federico Denkena  posteo.de>
Signed-off-by: David Seifert  gentoo.org>

 .../lua/files/lua-5.4.4-lparser-overread.patch | 34 ++
 ...lua-5.4.4-r102.ebuild => lua-5.4.4-r103.ebuild} |  4 +++
 2 files changed, 38 insertions(+)

diff --git a/dev-lang/lua/files/lua-5.4.4-lparser-overread.patch 
b/dev-lang/lua/files/lua-5.4.4-lparser-overread.patch
new file mode 100644
index ..3e625aa4ffc0
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.4.4-lparser-overread.patch
@@ -0,0 +1,34 @@
+From 
https://github.com/lua/lua/commit/1f3c6f4534c6411313361697d98d1145a1f030fa Mon 
Sep 17 00:00:00 2001
+From: Roberto Ierusalimschy 
+Date: Tue, 15 Feb 2022 12:28:46 -0300
+Subject: [PATCH] Bug: Lua can generate wrong code when _ENV is 
+
+--- a/src/lparser.c
 b/src/lparser.c
+@@ -468,6 +468,7 @@ static void singlevar (LexState *ls, expdesc *var) {
+ expdesc key;
+ singlevaraux(fs, ls->envn, var, 1);  /* get environment variable */
+ lua_assert(var->k != VVOID);  /* this one must exist */
++luaK_exp2anyregup(fs, var);  /* but could be a constant */
+ codestring(, varname);  /* key is variable name */
+ luaK_indexed(fs, var, );  /* env[varname] */
+   }
+--- a/tests/attrib.lua
 b/tests/attrib.lua
+@@ -434,6 +434,16 @@ 
a.aVeryLongName012345678901234567890123456789012345678901234567890123456789 ==
+ 10)
+
+
++do
++  -- _ENV constant
++  local function foo ()
++local _ENV  = 11
++X = "hi"
++  end
++  local st, msg = pcall(foo)
++  assert(not st and string.find(msg, "number"))
++end
++
+
+ -- test of large float/integer indices
+

diff --git a/dev-lang/lua/lua-5.4.4-r102.ebuild 
b/dev-lang/lua/lua-5.4.4-r103.ebuild
similarity index 96%
rename from dev-lang/lua/lua-5.4.4-r102.ebuild
rename to dev-lang/lua/lua-5.4.4-r103.ebuild
index 1667e6078222..6d39113fa1a3 100644
--- a/dev-lang/lua/lua-5.4.4-r102.ebuild
+++ b/dev-lang/lua/lua-5.4.4-r103.ebuild
@@ -22,6 +22,10 @@ DEPEND="
 RDEPEND="${DEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=(
+   "${FILESDIR}/${P}-lparser-overread.patch"
+)
+
 src_prepare() {
default
 



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

2020-12-05 Thread William Hubbs
commit: 1c73c534632603d64377940b996b8c34937969fe
Author: William Hubbs  gentoo  org>
AuthorDate: Sun Dec  6 01:30:56 2020 +
Commit: William Hubbs  gentoo  org>
CommitDate: Sun Dec  6 01:33:36 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c73c534

dev-lang/lua: migrate 5.2.4 to eapi 7

Signed-off-by: William Hubbs  gentoo.org>

 dev-lang/lua/files/lua-5.2-make-r1.patch |  4 ++--
 dev-lang/lua/lua-5.2.4-r2.ebuild | 36 +++-
 2 files changed, 23 insertions(+), 17 deletions(-)

diff --git a/dev-lang/lua/files/lua-5.2-make-r1.patch 
b/dev-lang/lua/files/lua-5.2-make-r1.patch
index a0624af9cc3..c65f799c0dc 100644
--- a/dev-lang/lua/files/lua-5.2-make-r1.patch
+++ b/dev-lang/lua/files/lua-5.2-make-r1.patch
@@ -17,7 +17,7 @@
 +# Use libtool for binary installs, etc.
 +
 +export V
-+export LIBTOOL = $(EROOT)usr/bin/libtool --quiet --tag=CC
++export LIBTOOL = libtool --quiet --tag=CC
 +# See libtool manual about how to set this
 +
 +gentoo_clean:
@@ -47,7 +47,7 @@
   lzio.h
 
 +
-+export LIBTOOL = $(EROOT)usr/bin/libtool --quiet --tag=CC
++export LIBTOOL = libtool --quiet --tag=CC
 +export LIB_VERSION = 6:1:1
 +
 +# The following rules use libtool for compiling and linking in order to

diff --git a/dev-lang/lua/lua-5.2.4-r2.ebuild b/dev-lang/lua/lua-5.2.4-r2.ebuild
index af89f22a59c..e9de80efdfb 100644
--- a/dev-lang/lua/lua-5.2.4-r2.ebuild
+++ b/dev-lang/lua/lua-5.2.4-r2.ebuild
@@ -1,9 +1,9 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 
-inherit eutils autotools multilib multilib-minimal portability toolchain-funcs 
versionator
+inherit autotools multilib multilib-minimal portability toolchain-funcs
 
 DESCRIPTION="A powerful light-weight programming language designed for 
extending applications"
 HOMEPAGE="http://www.lua.org/;
@@ -17,7 +17,7 @@ SRC_URI="
 LICENSE="MIT"
 SLOT="5.2"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc 
~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+deprecated emacs readline static test test-complete"
+IUSE="+deprecated readline static test test-complete"
 RESTRICT="!test? ( test )"
 
 RDEPEND="readline? ( sys-libs/readline:0= )
@@ -25,16 +25,17 @@ RDEPEND="readline? ( sys-libs/readline:0= )
!dev-lang/lua:0"
 DEPEND="${RDEPEND}
sys-devel/libtool"
-PDEPEND="emacs? ( app-emacs/lua-mode )"
 
 MULTILIB_WRAPPED_HEADERS=(
/usr/include/lua${SLOT}/luaconf.h
 )
 
-src_prepare() {
-   local PATCH_PV=$(get_version_component_range 1-2)
+PATCHES=(
+   "${FILESDIR}/${PN}-$(ver_cut 1-2)-make-r1.patch"
+)
 
-   epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
+src_prepare() {
+   default
 
# use glibtool on Darwin (versus Apple libtool)
if [[ ${CHOST} == *-darwin* ]] ; then
@@ -42,9 +43,6 @@ src_prepare() {
Makefile src/Makefile || die
fi
 
-   [ -d "${FILESDIR}/${PV}" ] && \
-   EPATCH_SOURCE="${FILESDIR}/${PV}" 
EPATCH_SUFFIX="upstream.patch" epatch
-
# correct lua versioning
sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
 
@@ -108,7 +106,7 @@ multilib_src_compile() {
RPATH="${EPREFIX}/usr/$(get_libdir)/" \
LUA_LIBS="${mylibs}" \
LIB_LIBS="${liblibs}" \
-   V=$(get_version_component_range 1-2) \
+   V=$(ver_cut 1-2) \
gentoo_all
 }
 
@@ -129,7 +127,7 @@ multilib_src_install() {
# We want packages to find our things...
# A slotted Lua uses different directories for headers & names for
# libraries, and pkgconfig should reflect that.
-   local PATCH_PV=$(get_version_component_range 1-2)
+   local PATCH_PV=$(ver_cut 1-2)
cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die
sed -r -i \
-e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \
@@ -152,9 +150,9 @@ multilib_src_install() {
 }
 
 multilib_src_install_all() {
-   dodoc README
-   dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
-
+   DOCS="README"
+   HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif"
+   einstalldocs
newman doc/lua.1 lua${SLOT}.1
newman doc/luac.1 luac${SLOT}.1
 }
@@ -192,3 +190,11 @@ src_test() {
die "Tests failed"
fi
 }
+
+pkg_postinst() {
+   if has_version "app-editor/emacs"; then
+   if ! has_version "app-emacs/lua-mode"; then
+   einfo "Install app-emacs/lua-mode for lua support for 
emacs"
+   fi
+   fi
+}



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

2020-12-05 Thread William Hubbs
commit: 05bcdda098aace6c3507b14b5b956d373ad40c36
Author: William Hubbs  gentoo  org>
AuthorDate: Sun Dec  6 00:36:27 2020 +
Commit: William Hubbs  gentoo  org>
CommitDate: Sun Dec  6 00:41:01 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05bcdda0

dev-lang/lua: migrate 5.3 to eapi 7

Signed-off-by: William Hubbs  gentoo.org>

 dev-lang/lua/files/lua-5.3-make-r1.patch |  4 ++--
 dev-lang/lua/lua-5.3.6-r1.ebuild | 38 ++--
 2 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/dev-lang/lua/files/lua-5.3-make-r1.patch 
b/dev-lang/lua/files/lua-5.3-make-r1.patch
index b9e9051462c..d27eb9938ea 100644
--- a/dev-lang/lua/files/lua-5.3-make-r1.patch
+++ b/dev-lang/lua/files/lua-5.3-make-r1.patch
@@ -18,7 +18,7 @@ diff -uNr lua-5.3.3.orig/Makefile lua-5.3.3/Makefile
 +# Use libtool for binary installs, etc.
 +
 +export V
-+export LIBTOOL = $(EROOT)usr/bin/libtool --quiet --tag=CC
++export LIBTOOL = libtool --quiet --tag=CC
 +# See libtool manual about how to set this
 +
 +gentoo_clean:
@@ -63,7 +63,7 @@ diff -uNr lua-5.3.3.orig/src/Makefile lua-5.3.3/src/Makefile
  
  # (end of Makefile)
 +
-+export LIBTOOL = $(EROOT)usr/bin/libtool --quiet --tag=CC
++export LIBTOOL = libtool --quiet --tag=CC
 +export LIB_VERSION = 6:1:1
 +
 +# The following rules use libtool for compiling and linking in order to

diff --git a/dev-lang/lua/lua-5.3.6-r1.ebuild b/dev-lang/lua/lua-5.3.6-r1.ebuild
index 1e7b58d91b6..a65d701dcd5 100644
--- a/dev-lang/lua/lua-5.3.6-r1.ebuild
+++ b/dev-lang/lua/lua-5.3.6-r1.ebuild
@@ -1,13 +1,13 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 
-inherit eutils autotools multilib multilib-minimal portability toolchain-funcs 
versionator
+inherit autotools multilib multilib-minimal portability toolchain-funcs
 
 DESCRIPTION="A powerful light-weight programming language designed for 
extending applications"
 HOMEPAGE="http://www.lua.org/;
-TEST_PV="5.3.4" # no 5.3.5-specific release yet
+TEST_PV="5.3.4"
 TEST_A="${PN}-${TEST_PV}-tests.tar.gz"
 PKG_A="${P}.tar.gz"
 SRC_URI="
@@ -17,7 +17,7 @@ SRC_URI="
 LICENSE="MIT"
 SLOT="5.3"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc 
~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+deprecated emacs readline static test test-complete"
+IUSE="+deprecated readline static test test-complete"
 RESTRICT="!test? ( test )"
 
 RDEPEND="readline? ( sys-libs/readline:0= )
@@ -25,16 +25,17 @@ RDEPEND="readline? ( sys-libs/readline:0= )
!dev-lang/lua:0"
 DEPEND="${RDEPEND}
sys-devel/libtool"
-PDEPEND="emacs? ( app-emacs/lua-mode )"
 
 MULTILIB_WRAPPED_HEADERS=(
/usr/include/lua${SLOT}/luaconf.h
 )
 
-src_prepare() {
-   local PATCH_PV=$(get_version_component_range 1-2)
+PATCHES=(
+   "${FILESDIR}/${PN}-$(ver_cut 1-2)-make-r1.patch"
+)
 
-   epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
+src_prepare() {
+   default
 
# use glibtool on Darwin (versus Apple libtool)
if [[ ${CHOST} == *-darwin* ]] ; then
@@ -42,9 +43,6 @@ src_prepare() {
Makefile src/Makefile || die
fi
 
-   [ -d "${FILESDIR}/${PV}" ] && \
-   EPATCH_SOURCE="${FILESDIR}/${PV}" 
EPATCH_SUFFIX="upstream.patch" epatch
-
# correct lua versioning
sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
 
@@ -108,7 +106,7 @@ multilib_src_compile() {
RPATH="${EPREFIX}/usr/$(get_libdir)/" \
LUA_LIBS="${mylibs}" \
LIB_LIBS="${liblibs}" \
-   V=$(get_version_component_range 1-2) \
+   V=$(ver_cut 1-2) \
gentoo_all
 }
 
@@ -129,7 +127,7 @@ multilib_src_install() {
# We want packages to find our things...
# A slotted Lua uses different directories for headers & names for
# libraries, and pkgconfig should reflect that.
-   local PATCH_PV=$(get_version_component_range 1-2)
+   local PATCH_PV=$(ver_cut 1-2)
cp "${FILESDIR}/lua.pc" "${WORKDIR}" || die
sed -r -i \
-e "/^INSTALL_INC=/s,(/include)$,\1/lua${SLOT}," \
@@ -152,9 +150,9 @@ multilib_src_install() {
 }
 
 multilib_src_install_all() {
-   dodoc README
-   dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
-
+   DOCS="README"
+   HTML_DOCS="doc/*.html doc/*.png doc/*.css doc/*.gif"
+   einstalldocs
newman doc/lua.1 lua${SLOT}.1
newman doc/luac.1 luac${SLOT}.1
 }
@@ -192,3 +190,11 @@ src_test() {
die "Tests failed"
fi
 }
+
+pkg_postinst() {
+   if has_version "app-editor/emacs"; then
+   if ! has_version "app-emacs/lua-mode"; then
+   einfo "Install 

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

2020-11-16 Thread William Hubbs
commit: 45d981ed13785da38b1eb1788137fd9ea1165593
Author: William Hubbs  gentoo  org>
AuthorDate: Mon Nov 16 15:04:52 2020 +
Commit: William Hubbs  gentoo  org>
CommitDate: Mon Nov 16 15:06:22 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45d981ed

dev-lang/lua: 5.4.1 eapi 7 fixes

Signed-off-by: William Hubbs  gentoo.org>

 dev-lang/lua/files/lua-5.4-makefiles.patch | 4 ++--
 dev-lang/lua/lua-5.4.1.ebuild  | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dev-lang/lua/files/lua-5.4-makefiles.patch 
b/dev-lang/lua/files/lua-5.4-makefiles.patch
index 461abb9b0d9..87e3a276897 100644
--- a/dev-lang/lua/files/lua-5.4-makefiles.patch
+++ b/dev-lang/lua/files/lua-5.4-makefiles.patch
@@ -25,7 +25,7 @@ index 1797df9..90284d8 100644
 +# Use libtool for binary installs, etc.
 +
 +export V
-+export LIBTOOL = $(EROOT)/usr/bin/libtool --quiet --tag=CC
++export LIBTOOL = $(ROOT)/usr/bin/libtool --quiet --tag=CC
 +# See libtool manual about how to set this
 +
 +gentoo_clean:
@@ -71,7 +71,7 @@ index 514593d..8af8f99 100644
  
  # (end of Makefile)
 +
-+export LIBTOOL = $(EROOT)/usr/bin/libtool --quiet --tag=CC
++export LIBTOOL = $(ROOT)/usr/bin/libtool --quiet --tag=CC
 +export LIB_VERSION = 6:1:1
 +
 +# The following rules use libtool for compiling and linking in order to

diff --git a/dev-lang/lua/lua-5.4.1.ebuild b/dev-lang/lua/lua-5.4.1.ebuild
index 97b958f75f9..d20880d9c82 100644
--- a/dev-lang/lua/lua-5.4.1.ebuild
+++ b/dev-lang/lua/lua-5.4.1.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-inherit eutils autotools multilib multilib-minimal portability toolchain-funcs
+inherit autotools multilib multilib-minimal portability toolchain-funcs
 
 DESCRIPTION="A powerful light-weight programming language designed for 
extending applications"
 HOMEPAGE="http://www.lua.org/;
@@ -21,9 +21,9 @@ COMMON_DEPEND="
app-eselect/eselect-lua
readline? ( sys-libs/readline:0= )
!dev-lang/lua:0"
-DEPEND="${COMMON_DEPEND}
-   sys-devel/libtool"
+DEPEND="${COMMON_DEPEND}"
 RDEPEND="${COMMON_DEPEND}"
+BDEPEND="sys-devel/libtool"
 
 RESTRICT="!test? ( test )"
 



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

2020-11-16 Thread William Hubbs
commit: 48e616adccbebbdf28baa025ae832c5e17f99c65
Author: William Hubbs  gentoo  org>
AuthorDate: Mon Nov 16 14:31:19 2020 +
Commit: William Hubbs  gentoo  org>
CommitDate: Mon Nov 16 14:31:19 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48e616ad

dev-lang/lua: 5.4.1 bump

Closes: https://bugs.gentoo.org/754318
Signed-off-by: William Hubbs  gentoo.org>

 dev-lang/lua/Manifest  |   2 +
 dev-lang/lua/files/lua-5.4-makefiles.patch |  99 ++
 dev-lang/lua/lua-5.4.1.ebuild  | 200 +
 3 files changed, 301 insertions(+)

diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest
index 56014cc9fe1..2b0364166fe 100644
--- a/dev-lang/lua/Manifest
+++ b/dev-lang/lua/Manifest
@@ -4,3 +4,5 @@ DIST lua-5.2.4.tar.gz 252651 BLAKE2B 
6f20308d8413438f8446040e8de16274837cb55e626
 DIST lua-5.3.4-tests.tar.gz 103438 BLAKE2B 
ac82708022e7729039111c3df4fe24302c8d0efb224afb4828871ac085a3d64c41d674a6f9369035de01ed1f7f75a3d2ce16917f37e774e923216aac0be03e09
 SHA512 
79575d100a2efabc8243f55b55d912443e09ef7e8b0219cb93541d85c2ba802fb9538015e1228703f09ca57bdb28a640a8f1fa0735716ba1e4bca2179c712dfb
 DIST lua-5.3.5.tar.gz 303543 BLAKE2B 
8890fa70fcfb869296bc74c754dc30621a3786d4b38dd35ef9e57ca46ee4b3df12dac1b86109be0823847499ff6b0d95de11f446c4c22de440ae3bb704e5068b
 SHA512 
4f9516acc4659dfd0a9e911bfa00c0788f0ad9348e5724fe8fb17aac59e9c0060a64378f82be86f8534e49c6c013e7488ad17321bafcc787831d3d67406bd0f4
 DIST lua-5.3.6.tar.gz 303770 BLAKE2B 
07c37c56f43095a4f6ca8eb8b3adf19afd53107c02b62b2bcb3619565cb2100d5f823493eef93092d5e312b30fc28885a6d9e8f0ba5a23b5bed86dc4515a5d61
 SHA512 
ccc380d5e114d54504de0bfb0321ca25ec325d6ff1bfee44b11870b660762d1a9bf120490c027a0088128b58bb6b5271bbc648400cab84d2dc22b512c4841681
+DIST lua-5.4.1-tests.tar.gz 128646 BLAKE2B 
2dae666e89bacf986228a33fc665bbc510e738d9f8791933f5048e4bbecaf6cd59c5e70e488d332b16960225aac3b9fae46e500f3b54856bb6aabe8cd3a5c932
 SHA512 
ac7cf113d96f8fe2af4f104297a70debd3bede5997627fc18db6b5d9c78ff49e05a165f5855894def5656c6dcc2d7d9ccce741c90da17698a5c714a33828f49a
+DIST lua-5.4.1.tar.gz 353965 BLAKE2B 
e5b46fcf2eb2ea9bd235793cefec2bf19f185ed51b11bc6133bda4e3639f09194378b2fd55544972ee32576751e80bba87b3b61ec3d4a0910592d6e5cb4a4c77
 SHA512 
49ffbe814ec41e515fc8502b6958151c6c56aa171412f0b211ad9de934be2c958c3709d49435885ddea0fa6765ed511dafb3537558950ff3b4261338214f1571

diff --git a/dev-lang/lua/files/lua-5.4-makefiles.patch 
b/dev-lang/lua/files/lua-5.4-makefiles.patch
new file mode 100644
index 000..461abb9b0d9
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.4-makefiles.patch
@@ -0,0 +1,99 @@
+diff --git a/Makefile b/Makefile
+index 1797df9..90284d8 100644
+--- a/Makefile
 b/Makefile
+@@ -10,11 +10,11 @@ PLAT= guess
+ # so take care if INSTALL_TOP is not an absolute path. See the local target.
+ # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with
+ # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
+-INSTALL_TOP= /usr/local
++INSTALL_TOP= /usr
+ INSTALL_BIN= $(INSTALL_TOP)/bin
+-INSTALL_INC= $(INSTALL_TOP)/include
++INSTALL_INC= $(INSTALL_TOP)/include/lua$V
+ INSTALL_LIB= $(INSTALL_TOP)/lib
+-INSTALL_MAN= $(INSTALL_TOP)/man/man1
++INSTALL_MAN= $(INSTALL_TOP)/share/man/man1
+ INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
+ INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
+ 
+@@ -104,3 +104,18 @@ pc:
+ .PHONY: all $(PLATS) help test clean install uninstall local dummy echo pc
+ 
+ # (end of Makefile)
++
++# Use libtool for binary installs, etc.
++
++export V
++export LIBTOOL = $(EROOT)/usr/bin/libtool --quiet --tag=CC
++# See libtool manual about how to set this
++
++gentoo_clean:
++  cd src; $(MAKE) $@
++
++gentoo_install:
++  mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB)
++  cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua$V luac$V 
$(INSTALL_BIN)
++  cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
++  cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua$V.la 
$(INSTALL_LIB)
+diff --git a/src/Makefile b/src/Makefile
+index 514593d..8af8f99 100644
+--- a/src/Makefile
 b/src/Makefile
+@@ -37,10 +37,10 @@ CORE_O=lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o 
lfunc.o lgc.o llex.o lmem
+ LIB_O=lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o 
loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o
+ BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
+ 
+-LUA_T=lua
++LUA_T=lua$V
+ LUA_O=lua.o
+ 
+-LUAC_T=   luac
++LUAC_T=   luac$V
+ LUAC_O=   luac.o
+ 
+ ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
+@@ -60,10 +60,10 @@ $(LUA_A): $(BASE_O)
+   $(AR) $@ $(BASE_O)
+   $(RANLIB) $@
+ 
+-$(LUA_T): $(LUA_O) $(LUA_A)
++origin$(LUA_T): $(LUA_O) $(LUA_A)
+   $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
+ 
+-$(LUAC_T): $(LUAC_O) $(LUA_A)
++origin$(LUAC_T): $(LUAC_O) $(LUA_A)
+   $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
+ 
+ test:
+@@ -218,3 +218,30 @@ lzio.o: lzio.c lprefix.h lua.h 

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

2020-01-23 Thread Robin H. Johnson
commit: 719f9a18c8709bf355d7ea80c09cd4e87f0a11fe
Author: Robin H. Johnson  gentoo  org>
AuthorDate: Thu Jan 23 23:35:30 2020 +
Commit: Robin H. Johnson  gentoo  org>
CommitDate: Thu Jan 23 23:36:34 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=719f9a18

dev-lang/lua: EAPI bump

Signed-off-by: Robin H. Johnson  gentoo.org>

 .../lua/files/lua-5.1.5-disable-deprecated.patch   |  59 +++
 dev-lang/lua/files/lua-5.1.5-gentoo-build.patch| 118 +
 dev-lang/lua/files/lua-5.1.5-readline.patch|  17 +++
 dev-lang/lua/lua-5.1.5-r5.ebuild   | 113 
 4 files changed, 307 insertions(+)

diff --git a/dev-lang/lua/files/lua-5.1.5-disable-deprecated.patch 
b/dev-lang/lua/files/lua-5.1.5-disable-deprecated.patch
new file mode 100644
index 000..d1d7fb10115
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.1.5-disable-deprecated.patch
@@ -0,0 +1,59 @@
+diff -rdu old/src/luaconf.h new/src/luaconf.h
+--- old/src/luaconf.h  2008-02-12 17:00:03.0 +
 new/src/luaconf.h  2008-02-12 17:07:55.0 +
+@@ -340,14 +340,14 @@
+ ** CHANGE it to undefined as soon as your programs use only '...' to
+ ** access vararg parameters (instead of the old 'arg' table).
+ */
+-#define LUA_COMPAT_VARARG
++#undef LUA_COMPAT_VARARG
+ 
+ /*
+ @@ LUA_COMPAT_MOD controls compatibility with old math.mod function.
+ ** CHANGE it to undefined as soon as your programs use 'math.fmod' or
+ ** the new '%' operator instead of 'math.mod'.
+ */
+-#define LUA_COMPAT_MOD
++#undef LUA_COMPAT_MOD
+ 
+ /*
+ @@ LUA_COMPAT_LSTR controls compatibility with old long string nesting
+@@ -355,14 +355,14 @@
+ ** CHANGE it to 2 if you want the old behaviour, or undefine it to turn
+ ** off the advisory error when nesting [[...]].
+ */
+-#define LUA_COMPAT_LSTR   1
++#undef LUA_COMPAT_LSTR
+ 
+ /*
+ @@ LUA_COMPAT_GFIND controls compatibility with old 'string.gfind' name.
+ ** CHANGE it to undefined as soon as you rename 'string.gfind' to
+ ** 'string.gmatch'.
+ */
+-#define LUA_COMPAT_GFIND
++#undef LUA_COMPAT_GFIND
+ 
+ /*
+ @@ LUA_COMPAT_OPENLIB controls compatibility with old 'luaL_openlib'
+@@ -370,7 +370,7 @@
+ ** CHANGE it to undefined as soon as you replace to 'luaL_register'
+ ** your uses of 'luaL_openlib'
+ */
+-#define LUA_COMPAT_OPENLIB
++#undef LUA_COMPAT_OPENLIB
+ 
+ 
+ 
+diff -rdu old/test/sieve.lua new/test/sieve.lua
+Rename deprecated functions in test scripts
+--- old/test/sieve.lua~2002-10-31 03:52:58.0 +0100
 new/test/sieve.lua 2008-02-20 17:44:22.468281121 +0100
+@@ -14,7 +14,7 @@
+ while 1 do
+   local n = g()
+   if n == nil then return end
+-  if math.mod(n, p) ~= 0 then coroutine.yield(n) end
++  if math.fmod(n, p) ~= 0 then coroutine.yield(n) end
+ end
+   end)
+ end

diff --git a/dev-lang/lua/files/lua-5.1.5-gentoo-build.patch 
b/dev-lang/lua/files/lua-5.1.5-gentoo-build.patch
new file mode 100644
index 000..62c4ed33648
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.1.5-gentoo-build.patch
@@ -0,0 +1,118 @@
+--- old/Makefile   2012-02-10 10:50:23.0 +0100
 new/Makefile   2019-07-12 12:00:30.807725876 +0200
+@@ -22,7 +22,8 @@
+ 
+ # How to install. If your install program does not support "-p", then you
+ # may have to run ranlib on the installed liblua.a (do "make ranlib").
+-INSTALL= install -p
++INSTALL?= install -p
++INSTALL_LINK= ln -s
+ INSTALL_EXEC= $(INSTALL) -m 0755
+ INSTALL_DATA= $(INSTALL) -m 0644
+ #
+@@ -33,7 +34,7 @@
+ 
+ # Utilities.
+ MKDIR= mkdir -p
+-RANLIB= ranlib
++RANLIB?= ranlib
+ 
+ # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE 
=
+ 
+@@ -47,13 +48,17 @@
+ TO_MAN= lua.1 luac.1
+ 
+ # Lua version and release.
++M= 5
+ V= 5.1
+ R= 5.1.5
+ 
++# Export to sub-make
++export M R
++
+ all:  $(PLAT)
+ 
+ $(PLATS) clean:
+-  cd src && $(MAKE) $@
++  cd src && $(MKDIR) .libs && $(MAKE) $@
+ 
+ test: dummy
+   src/lua test/hello.lua
+@@ -61,6 +66,8 @@
+ install: dummy
+   cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) 
$(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
+   cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
++  cd src && $(INSTALL_EXEC) $(TO_LIB:.a=.so.$(R)) $(INSTALL_LIB)
++  cd src && $(INSTALL_LINK) $(TO_LIB:.a=.so.$(R)) 
$(INSTALL_LIB)/$(TO_LIB:.a=.so.$(M))
+   cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
+   cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
+   cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
+--- old/src/Makefile   2012-02-13 21:41:22.0 +0100
 new/src/Makefile   2019-07-12 11:31:02.945290602 +0200
+@@ -7,12 +7,14 @@
+ # Your platform. See PLATS for possible values.
+ PLAT= none
+ 
+-CC= gcc
+-CFLAGS= -O2 -Wall $(MYCFLAGS)
+-AR= ar rcu
+-RANLIB= ranlib
++CC?= gcc
++CFLAGS?= -O2 -Wall $(MYCFLAGS)
++SOFLAGS= -shared -fPIC -DPIC -Wl,-O1 -Wl,--as-needed -Wl,-soname