Sunday, April 28, 2024

update devel/luaposix to 36.2.1

Noticed that we're lagging a bit behind upstream. There have been a
few breaking changes, but skimming in the changelog nothing extreme.
The build switched to luke.

The only consumer is sysutils/lsyncd. I've run the regression suite and
seems to be working, but I never used it before.

One patch is just to silence the massive amount of warnings clang would
issue otherwise and is a no-op in practice, the second one to work
around the lack of msglen_t in sys/msg.h.

while here i've also added the lua54 flavor. ok?

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/devel/luaposix/Makefile,v
diff -u -p -r1.26 Makefile
--- Makefile 11 Mar 2022 18:50:46 -0000 1.26
+++ Makefile 28 Apr 2024 14:35:29 -0000
@@ -1,20 +1,19 @@
COMMENT= posix library for the lua language
-V= 33.4.0
+V= 36.2.1
DISTNAME= luaposix-${V}
EPOCH= 0
-REVISION= 1
CATEGORIES= devel

GH_ACCOUNT= luaposix
GH_PROJECT= luaposix
-GH_TAGNAME= release-v${V}
+GH_TAGNAME= v${V}

# MIT
PERMIT_PACKAGE= Yes

MODULES= lang/lua

-FLAVORS= lua52 lua53
+FLAVORS= lua52 lua53 lua54
FLAVOR?=

# lua51 needs the bit32 library
@@ -22,9 +21,26 @@ FLAVOR?=
RUN_DEPENDS= devel/lua-bit32
.endif

-CONFIGURE_STYLE= gnu
-
-CONFIGURE_ENV+= LUA=${MODLUA_BIN}
+CONFIGURE_ARGS = package="${GH_ACCOUNT}" \
+ version="${GH_TAGNAME}" \
+ PREFIX="${TRUEPREFIX}" \
+ LUA="${MODLUA_BIN}" \
+ LUA_INCDIR="${MODLUA_INCL_DIR}" \
+ CC="${CC}" \
+ LD="${CC}" \
+ CFLAGS="${CFLAGS}" \
+ INST_LIBDIR="${DESTDIR}${MODLUA_LIBDIR}" \
+ INST_LUADIR="${DESTDIR}${MODLUA_DATADIR}"
+
+FAKE_FLAGS += INST_LIBDIR="${MODLUA_LIBDIR}" \
+ INST_LUADIR="${MODLUA_DATADIR}"
+
+do-build:
+ cd "${WRKSRC}" && ${MODLUA_BIN} build-aux/luke ${CONFIGURE_ARGS}
+
+do-install:
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/luaposix
+ cd "${WRKSRC}" && ${MODLUA_BIN} build-aux/luke ${ALL_FAKE_FLAGS} install

post-install:
mv ${PREFIX}/share/doc/luaposix ${MODLUA_DOCDIR}
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/devel/luaposix/distinfo,v
diff -u -p -r1.8 distinfo
--- distinfo 31 Aug 2016 10:11:52 -0000 1.8
+++ distinfo 28 Apr 2024 07:51:55 -0000
@@ -1,2 +1,2 @@
-SHA256 (luaposix-33.4.0.tar.gz) = 5mJi9bf+HDLGXxel71/7McTRh3AZtIcKXTc+KrZSaiE=
-SIZE (luaposix-33.4.0.tar.gz) = 643523
+SHA256 (luaposix-36.2.1.tar.gz) = ROUIfNPEcFj5k0uQwAF+TPhwtxYZ+ZcH3UMwdGIt67E=
+SIZE (luaposix-36.2.1.tar.gz) = 188010
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/ports/devel/luaposix/pkg/PLIST,v
diff -u -p -r1.6 PLIST
--- pkg/PLIST 11 Mar 2022 18:50:46 -0000 1.6
+++ pkg/PLIST 28 Apr 2024 08:11:39 -0000
@@ -1,58 +1,41 @@
-lib/lua/${MODLUA_VERSION}/posix.a
-lib/lua/${MODLUA_VERSION}/posix.so
+lib/lua/${MODLUA_VERSION}/posix/
+@so lib/lua/${MODLUA_VERSION}/posix/ctype.so
+@so lib/lua/${MODLUA_VERSION}/posix/dirent.so
+@so lib/lua/${MODLUA_VERSION}/posix/errno.so
+@so lib/lua/${MODLUA_VERSION}/posix/fcntl.so
+@so lib/lua/${MODLUA_VERSION}/posix/fnmatch.so
+@so lib/lua/${MODLUA_VERSION}/posix/glob.so
+@so lib/lua/${MODLUA_VERSION}/posix/grp.so
+@so lib/lua/${MODLUA_VERSION}/posix/libgen.so
+@so lib/lua/${MODLUA_VERSION}/posix/poll.so
+@so lib/lua/${MODLUA_VERSION}/posix/pwd.so
+@so lib/lua/${MODLUA_VERSION}/posix/sched.so
+@so lib/lua/${MODLUA_VERSION}/posix/signal.so
+@so lib/lua/${MODLUA_VERSION}/posix/stdio.so
+@so lib/lua/${MODLUA_VERSION}/posix/stdlib.so
+lib/lua/${MODLUA_VERSION}/posix/sys/
+@so lib/lua/${MODLUA_VERSION}/posix/sys/msg.so
+@so lib/lua/${MODLUA_VERSION}/posix/sys/resource.so
+@so lib/lua/${MODLUA_VERSION}/posix/sys/socket.so
+@so lib/lua/${MODLUA_VERSION}/posix/sys/stat.so
+@so lib/lua/${MODLUA_VERSION}/posix/sys/statvfs.so
+@so lib/lua/${MODLUA_VERSION}/posix/sys/time.so
+@so lib/lua/${MODLUA_VERSION}/posix/sys/times.so
+@so lib/lua/${MODLUA_VERSION}/posix/sys/utsname.so
+@so lib/lua/${MODLUA_VERSION}/posix/sys/wait.so
+@so lib/lua/${MODLUA_VERSION}/posix/syslog.so
+@so lib/lua/${MODLUA_VERSION}/posix/termio.so
+@so lib/lua/${MODLUA_VERSION}/posix/time.so
+@so lib/lua/${MODLUA_VERSION}/posix/unistd.so
+@so lib/lua/${MODLUA_VERSION}/posix/utime.so
share/doc/${FULLPKGNAME}/
-share/doc/${FULLPKGNAME}/examples/
-share/doc/${FULLPKGNAME}/examples/dir.lua.html
-share/doc/${FULLPKGNAME}/examples/fork.lua.html
-share/doc/${FULLPKGNAME}/examples/fork2.lua.html
-share/doc/${FULLPKGNAME}/examples/getopt.lua.html
-share/doc/${FULLPKGNAME}/examples/glob.lua.html
-share/doc/${FULLPKGNAME}/examples/limit.lua.html
-share/doc/${FULLPKGNAME}/examples/lock.lua.html
-share/doc/${FULLPKGNAME}/examples/netlink-uevent.lua.html
-share/doc/${FULLPKGNAME}/examples/ping.lua.html
-share/doc/${FULLPKGNAME}/examples/poll.lua.html
-share/doc/${FULLPKGNAME}/examples/signal.lua.html
-share/doc/${FULLPKGNAME}/examples/socket.lua.html
-share/doc/${FULLPKGNAME}/examples/termios.lua.html
-share/doc/${FULLPKGNAME}/examples/tree.lua.html
-share/doc/${FULLPKGNAME}/index.html
-share/doc/${FULLPKGNAME}/ldoc.css
-share/doc/${FULLPKGNAME}/modules/
-share/doc/${FULLPKGNAME}/modules/posix.ctype.html
-share/doc/${FULLPKGNAME}/modules/posix.dirent.html
-share/doc/${FULLPKGNAME}/modules/posix.errno.html
-share/doc/${FULLPKGNAME}/modules/posix.fcntl.html
-share/doc/${FULLPKGNAME}/modules/posix.fnmatch.html
-share/doc/${FULLPKGNAME}/modules/posix.getopt.html
-share/doc/${FULLPKGNAME}/modules/posix.glob.html
-share/doc/${FULLPKGNAME}/modules/posix.grp.html
-share/doc/${FULLPKGNAME}/modules/posix.html
-share/doc/${FULLPKGNAME}/modules/posix.libgen.html
-share/doc/${FULLPKGNAME}/modules/posix.poll.html
-share/doc/${FULLPKGNAME}/modules/posix.pwd.html
-share/doc/${FULLPKGNAME}/modules/posix.sched.html
-share/doc/${FULLPKGNAME}/modules/posix.signal.html
-share/doc/${FULLPKGNAME}/modules/posix.stdio.html
-share/doc/${FULLPKGNAME}/modules/posix.stdlib.html
-share/doc/${FULLPKGNAME}/modules/posix.sys.msg.html
-share/doc/${FULLPKGNAME}/modules/posix.sys.resource.html
-share/doc/${FULLPKGNAME}/modules/posix.sys.socket.html
-share/doc/${FULLPKGNAME}/modules/posix.sys.stat.html
-share/doc/${FULLPKGNAME}/modules/posix.sys.statvfs.html
-share/doc/${FULLPKGNAME}/modules/posix.sys.time.html
-share/doc/${FULLPKGNAME}/modules/posix.sys.times.html
-share/doc/${FULLPKGNAME}/modules/posix.sys.utsname.html
-share/doc/${FULLPKGNAME}/modules/posix.sys.wait.html
-share/doc/${FULLPKGNAME}/modules/posix.syslog.html
-share/doc/${FULLPKGNAME}/modules/posix.termio.html
-share/doc/${FULLPKGNAME}/modules/posix.time.html
-share/doc/${FULLPKGNAME}/modules/posix.unistd.html
-share/doc/${FULLPKGNAME}/modules/posix.utime.html
share/lua/${MODLUA_VERSION}/posix/
-share/lua/${MODLUA_VERSION}/posix/_argcheck.lua
+share/lua/${MODLUA_VERSION}/posix/_base.lua
+share/lua/${MODLUA_VERSION}/posix/_bitwise.lua
+share/lua/${MODLUA_VERSION}/posix/_strict.lua
share/lua/${MODLUA_VERSION}/posix/compat.lua
share/lua/${MODLUA_VERSION}/posix/deprecated.lua
share/lua/${MODLUA_VERSION}/posix/init.lua
share/lua/${MODLUA_VERSION}/posix/sys.lua
share/lua/${MODLUA_VERSION}/posix/util.lua
+share/lua/${MODLUA_VERSION}/posix/version.lua
Index: patches/patch-ext_include__helpers_c
===================================================================
RCS file: patches/patch-ext_include__helpers_c
diff -N patches/patch-ext_include__helpers_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-ext_include__helpers_c 28 Apr 2024 15:46:02 -0000
@@ -0,0 +1,14 @@
+avoid lots of warnings from clang
+
+Index: ext/include/_helpers.c
+--- ext/include/_helpers.c.orig
++++ ext/include/_helpers.c
+@@ -90,7 +90,7 @@
+
+ /* LPOSIX_STMT_BEG/END are used to create macros that expand to a
+ single compound statement in a portable way. */
+-#if defined __GNUC__ && !defined __STRICT_ANSI__ && !defined __cplusplus
++#if 0
+ # define LPOSIX_STMT_BEG (void)(
+ # define LPOSIX_STMT_END )
+ #else
Index: patches/patch-ext_posix_sys_msg_c
===================================================================
RCS file: patches/patch-ext_posix_sys_msg_c
diff -N patches/patch-ext_posix_sys_msg_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-ext_posix_sys_msg_c 28 Apr 2024 15:46:02 -0000
@@ -0,0 +1,14 @@
+we don't seem to have msglen_t in sys/msg.h
+
+Index: ext/posix/sys/msg.c
+--- ext/posix/sys/msg.c.orig
++++ ext/posix/sys/msg.c
+@@ -86,7 +86,7 @@ tomsqid(lua_State *L, int index, struct msqid_ds *msqi
+ luaL_checktype(L, index, LUA_TTABLE);
+
+ /* Copy fields to msqid struct */
+- msqid->msg_qbytes = (msglen_t)checkintegerfield(L, index, "msg_qbytes");
++ msqid->msg_qbytes = (unsigned long)checkintegerfield(L, index, "msg_qbytes");
+
+ checkfieldtype(L, index, "msg_perm", LUA_TTABLE, "table");
+ subindex = lua_gettop(L);

No comments:

Post a Comment