forked from pool/lua-luasystem
Compare commits
7 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
8f6c055de9
|
|||
|
12b7da78ce
|
|||
|
2d28f1e105
|
|||
|
dc36142fbf
|
|||
|
d2cdfc5dc2
|
|||
|
558b3729f3
|
|||
|
38443523ee
|
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -21,3 +21,4 @@
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*.changes merge=merge-changes
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1 +1,6 @@
|
||||
.osc
|
||||
*.obscpio
|
||||
*.osc
|
||||
_build.*
|
||||
.pbuild
|
||||
lua*-luasystem-*-build
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<multibuild>
|
||||
<package>lua51</package>
|
||||
<package>luajit</package>
|
||||
<package>lua53</package>
|
||||
<package>lua54</package>
|
||||
<package>test</package>
|
||||
</multibuild>
|
||||
|
||||
@@ -1,3 +1,111 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 3 12:26:26 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- My effort to fix the test suite were unsuccesful, so let’s just
|
||||
switch of the tests for now.
|
||||
- Split test phase as a special step to break luasystem-busted
|
||||
dependency cycle.
|
||||
- Add unused_variable.patch to squelch two unused-variable warnings
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 24 14:49:57 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Switch off building lua51 build of the package.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 20 23:03:36 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Change of the upstream project.
|
||||
- Update to 0.6.3:
|
||||
- Fix: maximum key-delay, reduced from 0.2 to 0.1 seconds to
|
||||
reduce slugginess feel on some key presses. See #69.
|
||||
- Fix: readansi now only reports printable chars as characters
|
||||
See #70.
|
||||
- Fix: readkey now ignores Windows scancodes if received. See
|
||||
#74.
|
||||
- Fix: readkey now passes errors on. See #74.
|
||||
- Update to 0.6.2:
|
||||
- Fix: autotermrestore didn't work because its metatable was
|
||||
overwritten.
|
||||
- Update to 0.6.1:
|
||||
- Docs: document readansi internal buffer for incomplete
|
||||
sequences.
|
||||
- Fix: ensure to properly parse <alt>+key key presses
|
||||
- Update to 0.6.0:
|
||||
- Fix: when sleep returns an error, pass that on in readkey.
|
||||
- Feat: added detachfds which will create separate file
|
||||
descriptions for stdout and stderr to ensure that related
|
||||
settings (eg. non-blocking flag) will not be shared amongst
|
||||
those streams and stdin.
|
||||
- Update to 0.5.1:
|
||||
- Fix: on older unixes with glibc < 2.25, fall back to
|
||||
/dev/urandom
|
||||
- Update to 0.5.0:
|
||||
- Feat: when detecting character display width, also accept
|
||||
unicode codepoints (integers), since the Lua utf8 library
|
||||
returns codepoints, not strings
|
||||
- Feat: allow passing in a sleep function to readkey and
|
||||
readansi
|
||||
- Fix: NetBSD fix compilation, undeclared directives
|
||||
- Refactor: random bytes; remove deprecated API usage on
|
||||
Windows, move to binary api instead of /dev/urandom file on
|
||||
linux and bsd
|
||||
- Update to 0.4.5:
|
||||
- Fix: suppress a warning when building with clang
|
||||
- Fix: do not rely on luaconf.h to include limits.h, fixes
|
||||
builds with latest LuaJIT (#38).
|
||||
- Update to 0.4.4:
|
||||
- Fix: include all objects in Makefile
|
||||
- Update to 0.4.3:
|
||||
- Chore: add compiler error on Windows if Virtual Terminal
|
||||
Processing is unavailable.
|
||||
- Fix: fix the freebsd build
|
||||
- Update to 0.4.2:
|
||||
- Fix: include additional headers for some MinGW installations
|
||||
- Update to 0.4.1:
|
||||
- Fix: when compiling with msys2 the conio.h header is required
|
||||
- Update to 0.4.0:
|
||||
- Feat: getconsoleflags and setconsoleflags for getting/setting
|
||||
the current console configuration flags on Windows
|
||||
- Feat: getconsolecp and setconsolecp for getting/setting the
|
||||
console codepage on Windows
|
||||
- Feat: getconsoleoutputcp and setconsoleoutputcp for
|
||||
getting/setting the console output codepage on Windows
|
||||
- Feat: tcgetattr and tcsetattr for getting/setting the current
|
||||
console configuration flags on Posix
|
||||
- Feat: getnonblock and setnonblock for getting/setting the
|
||||
non-blocking flag on Posix
|
||||
- Feat: bitflags: a support feature for the above flag type
|
||||
controls to facilitate bit manipulation without resorting to
|
||||
binary operations (to also support PuC Lua 5.1)
|
||||
- Feat: readkey reads a keyboard input from stdin in a
|
||||
non-blocking way (utf8, also on Windows)
|
||||
- Feat: readansi reads a keyboard input from stdin in a
|
||||
non-blocking way, parses ansi and utf8 sequences
|
||||
- Feat: termsize gets the current terminal size in rows and
|
||||
columns
|
||||
- Feat: utf8cwidth and utf8swidth for getting the display width
|
||||
(in columns) of respectively a single utf8 character, or a
|
||||
utf8 string
|
||||
- Feat: helpers; termbackup, termrestore, autotermrestore,
|
||||
and termwrap for managing the many terminal settings on all
|
||||
platforms.
|
||||
- Update to 0.3.0:
|
||||
- Feat: on Windows sleep now has a precision parameter
|
||||
- Feat: setenv added to set environment variables.
|
||||
- Feat: getenvs added to list environment variables.
|
||||
- Feat: getenv added to get environment variable previously set
|
||||
(Windows).
|
||||
- Feat: random added to return high-quality random bytes
|
||||
- Feat: isatty added to check if a file-handle is a tty
|
||||
- Remove upstreamed patches:
|
||||
- build-independent.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 10 14:42:38 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Allow building with modern compilers.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 23 10:36:55 UTC 2022 - Michal Suchanek <msuchanek@suse.com>
|
||||
|
||||
|
||||
@@ -17,52 +17,74 @@
|
||||
|
||||
|
||||
%define flavor @BUILD_FLAVOR@
|
||||
%if "%{flavor}" == "test"
|
||||
%define flavor lua54
|
||||
%bcond_without test
|
||||
%else
|
||||
%bcond_with test
|
||||
%endif
|
||||
%define mod_name luasystem
|
||||
%define upversion 0.2.1
|
||||
Version: 0.21
|
||||
Version: 0.6.3
|
||||
Release: 0
|
||||
Summary: Platform independent system calls for Lua
|
||||
License: MIT
|
||||
URL: https://github.com/o-lim/luasystem
|
||||
Source: https://github.com/o-lim/luasystem/archive/v%{upversion}.tar.gz#/%{mod_name}-%{upversion}.tar.gz
|
||||
URL: https://github.com/lunarmodules/luasystem
|
||||
Source: https://github.com/lunarmodules/luasystem/archive/v%{version}.tar.gz#/%{mod_name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM unused_variable.patch gh#lunarmodules/luasystem!78 mcepl@suse.com
|
||||
# remove two unused-variable warnings
|
||||
Patch0: unused_variable.patch
|
||||
BuildRequires: %{flavor}-devel
|
||||
BuildRequires: %{flavor}-luarocks
|
||||
BuildRequires: lua-macros
|
||||
BuildRequires: pkgconf
|
||||
Requires: %{flavor}
|
||||
%lua_provides
|
||||
%if "%{flavor}" == ""
|
||||
Name: lua-luasystem
|
||||
ExclusiveArch: do_not_build
|
||||
%else
|
||||
%if %{with test}
|
||||
Name: %{flavor}-luasystem-test
|
||||
%else
|
||||
Name: %{flavor}-luasystem
|
||||
%endif
|
||||
%endif
|
||||
%if %{with test}
|
||||
BuildRequires: %{flavor}-luasystem
|
||||
BuildRequires: %{flavor}-busted
|
||||
%endif
|
||||
|
||||
%description
|
||||
Adds a Lua API for making platform independent system calls.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{mod_name}-%{upversion}
|
||||
%autosetup -p1 -n %{mod_name}-%{version}
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags} \
|
||||
CWARNS="%{optflags}" \
|
||||
LUAINC_linux=%{lua_incdir} \
|
||||
CDIR_linux?=%{_lib}/lua/%{lua_version} \
|
||||
LUAPREFIX_linux?=%{_prefix} \
|
||||
linux
|
||||
export CFLAGS="%{optflags} $(pkgconf --cflags lua)" \
|
||||
MYLDFLAGS="$(pkgconf --libs lua)"
|
||||
%luarocks_build
|
||||
|
||||
%install
|
||||
%make_install \
|
||||
CWARNS="%{optflags}" \
|
||||
%if %{without test}
|
||||
export CWARNS="%{optflags}" \
|
||||
LUAINC_linux=%{lua_incdir} \
|
||||
LUAPREFIX_linux?=%{_prefix} \
|
||||
CDIR_linux?=%{_lib}/lua/%{lua_version} \
|
||||
linux
|
||||
install -v -D -m0644 -p -t %{buildroot}%{lua_noarchdir}/system system/init.lua
|
||||
LUAPREFIX_linux=%{_prefix} \
|
||||
CDIR_linux="%{_lib}/lua/%{lua_version}"
|
||||
%luarocks_install ./*.rock
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
busted || true
|
||||
%endif
|
||||
|
||||
%if %{without test}
|
||||
%files
|
||||
%dir %{lua_archdir}/system
|
||||
%{lua_archdir}/system/*
|
||||
%dir %{lua_noarchdir}/system
|
||||
%{lua_noarchdir}/system/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
||||
BIN
luasystem-0.2.1.tar.gz
LFS
BIN
luasystem-0.2.1.tar.gz
LFS
Binary file not shown.
BIN
luasystem-0.6.3.tar.gz
LFS
Normal file
BIN
luasystem-0.6.3.tar.gz
LFS
Normal file
Binary file not shown.
48
unused_variable.patch
Normal file
48
unused_variable.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
src/random.c | 3 +--
|
||||
src/term.c | 4 ++++
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: luasystem-0.6.3/src/random.c
|
||||
===================================================================
|
||||
--- luasystem-0.6.3.orig/src/random.c 2025-07-11 22:59:19.000000000 +0200
|
||||
+++ luasystem-0.6.3/src/random.c 2025-10-28 14:56:11.555621406 +0100
|
||||
@@ -60,7 +60,6 @@
|
||||
return 2;
|
||||
}
|
||||
|
||||
- ssize_t n;
|
||||
ssize_t total_read = 0;
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -99,7 +98,7 @@
|
||||
}
|
||||
|
||||
while (total_read < num_bytes) {
|
||||
- n = read(fd, buffer + total_read, num_bytes - total_read);
|
||||
+ ssize_t n = read(fd, buffer + total_read, num_bytes - total_read);
|
||||
|
||||
if (n < 0) {
|
||||
if (errno == EINTR) {
|
||||
Index: luasystem-0.6.3/src/term.c
|
||||
===================================================================
|
||||
--- luasystem-0.6.3.orig/src/term.c 2025-07-11 22:59:19.000000000 +0200
|
||||
+++ luasystem-0.6.3/src/term.c 2025-10-28 14:56:11.555945957 +0100
|
||||
@@ -1226,6 +1226,8 @@
|
||||
int success = TRUE;
|
||||
#ifdef _WIN32
|
||||
SetConsoleCP(cp);
|
||||
+#else
|
||||
+ (void)cp;
|
||||
#endif
|
||||
lua_pushboolean(L, success);
|
||||
return 1;
|
||||
@@ -1262,6 +1264,8 @@
|
||||
int success = TRUE;
|
||||
#ifdef _WIN32
|
||||
SetConsoleOutputCP(cp);
|
||||
+#else
|
||||
+ (void)cp;
|
||||
#endif
|
||||
lua_pushboolean(L, success);
|
||||
return 1;
|
||||
Reference in New Issue
Block a user