Wednesday, August 31, 2022

www/luakit, more archs + test fix

Hi,

with this diff, luakit builds on more architectures by falling back to
lua51 if luajit is not available.

Additionally the test target is now running without error.

Tested on amd64 and riscv64.

OK?

Best Regards,
Stefan


Index: www/luakit/Makefile
===================================================================
RCS file: /cvs/ports/www/luakit/Makefile,v
retrieving revision 1.35
diff -u -p -u -p -r1.35 Makefile
--- www/luakit/Makefile 30 Aug 2022 20:13:10 -0000 1.35
+++ www/luakit/Makefile 31 Aug 2022 13:50:33 -0000
@@ -4,6 +4,7 @@ GH_ACCOUNT = luakit
GH_PROJECT = luakit
# used in MAKE_FLAGS
GH_TAGNAME = 2.3.1
+REVISION = 0

EPOCH = 1

@@ -20,14 +21,29 @@ USE_GMAKE = Yes

COMPILER = base-clang ports-gcc

-WANTLIB += atk-1.0 c cairo cairo-gobject gdk-3 gdk_pixbuf-2.0
-WANTLIB += gio-2.0 glib-2.0 gobject-2.0 gthread-2.0 gtk-3 harfbuzz
-WANTLIB += intl javascriptcoregtk-4.0 luajit-5.1 pango-1.0
-WANTLIB += pangocairo-1.0 pthread soup-2.4 sqlite3 webkit2gtk-4.0
-WANTLIB += gmodule-2.0
+WANTLIB += atk-1.0 c cairo cairo-gobject gdk-3 gdk_pixbuf-2.0 gio-2.0
+WANTLIB += glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0 gtk-3 harfbuzz
+WANTLIB += intl javascriptcoregtk-4.0 pango-1.0 pangocairo-1.0 pthread
+WANTLIB += soup-2.4 sqlite3 webkit2gtk-4.0
+
+# luajit archs
+.if ${MACHINE_ARCH} == "arm" \
+ || ${MACHINE_ARCH} == "aarch64" \
+ || ${MACHINE_ARCH} == "amd64" \
+ || ${MACHINE_ARCH} == "i386" \
+ || ${MACHINE_ARCH} == "powerpc"
+LUAJIT = 1
+WANTLIB += luajit-5.1
+LIB_DEPENDS += lang/luajit
+.else
+LUAJIT = 0
+WANTLIB += ${MODLLUA_WANTLIB}
+.endif

MODULES = lang/lua

+MODLUA_VERSION = 5.1
+
BUILD_DEPENDS = devel/help2man \
devel/luafs

@@ -36,8 +52,7 @@ RUN_DEPENDS = devel/desktop-file-utils \
net/luasocket \
textproc/lua-markdown

-LIB_DEPENDS = lang/luajit \
- www/webkitgtk4
+LIB_DEPENDS += www/webkitgtk4

TEST_DEPENDS = devel/luassert \
devel/luacheck
@@ -55,6 +70,7 @@ MAKE_FLAGS += LUA_BIN_NAME=${MODLUA_BIN}
PIXMAPDIR=${PREFIX}/share/pixmaps/ \
APPDIR=${PREFIX}/share/applications/ \
PREFIX=${PREFIX} \
+ USE_LUAJIT=${LUAJIT} \
DEVELOPMENT_PATHS=0 \
VERSION=${GH_TAGNAME}

Index: www/luakit/patches/patch-tests_async_test_undoclose_lua
===================================================================
RCS file: www/luakit/patches/patch-tests_async_test_undoclose_lua
diff -N www/luakit/patches/patch-tests_async_test_undoclose_lua
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ www/luakit/patches/patch-tests_async_test_undoclose_lua 31 Aug 2022 13:50:33 -0000
@@ -0,0 +1,13 @@
+Fix undoclose unit test
+
+Index: tests/async/test_undoclose.lua
+--- tests/async/test_undoclose.lua.orig
++++ tests/async/test_undoclose.lua
+@@ -42,6 +42,7 @@ T.test_undo_close_works = function ()
+ w:undo_close_tab(1)
+ assert(w.tabs:current() == 2)
+ test.wait_for_view(w.view)
++ test.wait_for_signal(w.view, "property::title", 2000)
+
+ assert(w.view.uri == uri)
+ assert(w.view.title == "undoclose_page")

No comments:

Post a Comment