Add luaposix 36.2.1

This commit is contained in:
Michael Forney
2025-02-12 00:22:19 -08:00
parent ed3b50be88
commit acb92fb3d4
5 changed files with 101 additions and 0 deletions

3
.gitmodules vendored
View File

@@ -181,6 +181,9 @@
path = pkg/libxkbcommon/src
url = https://github.com/xkbcommon/libxkbcommon.git
ignore = all
[submodule "pkg/luaposix/src"]
path = pkg/luaposix/src
url = https://github.com/luaposix/luaposix.git
[submodule "pkg/mblaze/src"]
path = pkg/mblaze/src
url = https://github.com/leahneukirchen/mblaze.git

View File

@@ -68,6 +68,7 @@ subgen 'libxkbcommon'
subgen 'linux-headers'
subgen 'lpeg'
subgen 'lua'
subgen 'luaposix'
subgen 'make'
subgen 'man-pages-posix'
subgen 'mandoc'

34
pkg/luaposix/config.h Normal file
View File

@@ -0,0 +1,34 @@
#define PACKAGE "luaposix"
#define VERSION "v36.2.1"
/* fcntl */
#define HAVE_POSIX_FADVISE 1
/* sched */
#define HAVE_SCHED_H 1
#define HAVE_SCHED_GETSCHEDULER 1
#define HAVE_SCHED_SETSCHEDULER 1
/* sys.msg */
#define HAVE_SYS_MSG_H 1
#define HAVE_MSGRCV 1
#define HAVE_MSGSND 1
/* sys.socket */
#define HAVE_NET_IF_H 1
#define HAVE_LINUX_NETLINK_H 1
#define HAVE_LINUX_IF_PACKET_H 1
/* sys.statvfs */
#define HAVE_STATVFS 1
/* time */
#define HAVE_TM_GMTOFF 1
#define HAVE_TM_ZONE 1
/* unistd */
#define HAVE_CRYPT 1
#define HAVE_CRYPT_H 1
#define HAVE_DECL_FDATASYNC 1
#define HAVE_FDATASYNC 1
#define HAVE_GETHOSTID 1

62
pkg/luaposix/gen.lua Normal file
View File

@@ -0,0 +1,62 @@
cflags{
'-std=c99',
'-D _GNU_SOURCE',
'-I $srcdir/ext/include',
'-include $dir/config.h',
}
build('sed', '$outdir/version.lua', '$srcdir/lib/posix/version.lua.in', {
expr={
'-e s,@package@,luaposix,',
'-e s,@version2,36.2.1,',
},
})
lib('libluaposix.a', [[
ext/posix/(
ctype.c
dirent.c
errno.c
fcntl.c
fnmatch.c
glob.c
grp.c
libgen.c
poll.c
pwd.c
sched.c
signal.c
stdio.c
stdlib.c
sys/(
msg.c
resource.c
socket.c
stat.c
statvfs.c
time.c
times.c
utsname.c
wait.c
)
syslog.c
termio.c
time.c
unistd.c
utime.c
)
]])
local files = {
'init.lua',
'_base.lua',
'_bitwise.lua',
'_strict.lua',
'compat.lua',
'sys.lua',
'util.lua',
}
for _, f in ipairs(files) do
file('share/lua/5.4/posix/'..f, '644', '$srcdir/lib/posix/'..f)
end
file('share/lua/5.4/posix/version.lua', '644', '$outdir/version.lua')

1
pkg/luaposix/src Submodule

Submodule pkg/luaposix/src added at 5a8d8c768f