From 2258b3ebc4eea9aa93da7058a0df054475849f38 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sat, 30 Sep 2023 04:09:56 +0200 Subject: [PATCH] multimedia/arcan: unbreak KMS support after cb7c09ae6a8e MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $ arcan console pid 12345 (arcan), jid 0, uid 1111: exited on signal 6 (no core dump - bad address) $ tail -1 /var/log/messages Sep 29 22:48:36 localhost arcan[12345]: stack overflow detected; terminated (lldb) bt * thread #2, name = 'arcan', stop reason = signal SIGABRT * frame #0: 0x00000008277faf5a libc.so.7`__sys_kill at kill.S:4 frame #1: 0x00000008277fe361 libc.so.7`__fail(msg="stack overflow detected; terminated") at stack_protector.c:120:8 frame #2: 0x00000008277fe2d0 libc.so.7`__stack_chk_fail at stack_protector.c:127:2 frame #3: 0x00000000002eb876 arcan`button_count(fd=5, bitn=1, got_mouse=0x000000082040a5cf, got_joy=0x000000082040a5ce) at event.c:0 (lldb) f 3 frame #3: 0x00000000002eb876 arcan`button_count(fd=5, bitn=1, got_mouse=0x000000082040a5cf, got_joy=0x000000082040a5ce) at event.c:0 844 #define bit_isset(ary, bit) (( ary[bit_longn(bit)] >> bit_ofs(bit)) & 1) 845 #define bit_count(x) ( ((x) - 1 ) / (sizeof(long) * 8 ) + 1 ) 846 -> 847 static size_t button_count(int fd, size_t bitn, bool* got_mouse, bool* got_joy) 848 { 849 size_t count = 0; 850 PR: 274163 Reported by: Albin "a12l" Otterhäll --- multimedia/arcan/Makefile | 2 +- .../files/patch-platform_cmake_CMakeLists.BSD | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 multimedia/arcan/files/patch-platform_cmake_CMakeLists.BSD diff --git a/multimedia/arcan/Makefile b/multimedia/arcan/Makefile index 4d23ce46b92a5..04c42c748903f 100644 --- a/multimedia/arcan/Makefile +++ b/multimedia/arcan/Makefile @@ -1,6 +1,6 @@ PORTNAME= arcan DISTVERSION= 0.6.2.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ diff --git a/multimedia/arcan/files/patch-platform_cmake_CMakeLists.BSD b/multimedia/arcan/files/patch-platform_cmake_CMakeLists.BSD new file mode 100644 index 0000000000000..af4661e3174aa --- /dev/null +++ b/multimedia/arcan/files/patch-platform_cmake_CMakeLists.BSD @@ -0,0 +1,15 @@ +Partially revert https://github.com/letoram/arcan/commit/3c1674a8f5db + +--- platform/cmake/CMakeLists.BSD.orig 2022-10-12 20:23:54 UTC ++++ platform/cmake/CMakeLists.BSD +@@ -74,6 +74,10 @@ else() + set(BSD_VARIANT_DEFINITIONS + -DCLOCK_MONOTONIC_RAW=CLOCK_REALTIME_FAST) + ++# FreeBSD 12.1 enabled evdev but Arcan crashes ++ if(${INPUT_PLATFORM} STREQUAL "evdev") ++ SET(INPUT_PLATFORM "syscons") ++ endif() + if (VIDEO_PLATFORM STREQUAL "egl-dri") + list(APPEND ARCAN_PLATFORM ${PLATFORM_PATH}/psep_open.c) + else()