diff --git a/user/drawterm/patches/flags.patch b/user/drawterm/patches/flags.patch new file mode 100644 index 0000000000..b195e032bd --- /dev/null +++ b/user/drawterm/patches/flags.patch @@ -0,0 +1,21 @@ +make sure our CFLAGS/LDFLAGS are respected + +diff -ruN a/Make.linux b/Make.linux +--- a/Make.linux 2024-10-04 03:22:35.000000000 +0200 ++++ b/Make.linux 2024-10-06 14:03:04.320760656 +0200 +@@ -4,12 +4,12 @@ + AS=as + RANLIB=ranlib + CC=cc +-CFLAGS=-Wall -Wno-missing-braces -Wno-parentheses -ggdb -I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -D_THREAD_SAFE -DPTHREAD $(PTHREAD) `pkg-config --cflags libpipewire-0.3` -D_REENTRANT -O2 ++override CFLAGS := -fno-strict-aliasing -Wall -Wno-missing-braces -Wno-parentheses -I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -D_THREAD_SAFE -DPTHREAD $(PTHREAD) `pkg-config --cflags libpipewire-0.3` -D_REENTRANT $(CFLAGS) + O=o + OS=posix + GUI=wl +-LDADD=-lwayland-client -lxkbcommon -ggdb -lm -lrt -lpipewire-0.3 +-LDFLAGS=$(PTHREAD) ++LDADD=-lwayland-client -lxkbcommon -lm -lrt -lpipewire-0.3 ++override LDFLAGS := $(PTHREAD) $(LDFLAGS) + TARG=drawterm + # AUDIO=none + AUDIO=pipewire diff --git a/user/drawterm/patches/posix_generic.patch b/user/drawterm/patches/posix_generic.patch deleted file mode 100644 index c59f67bdc3..0000000000 --- a/user/drawterm/patches/posix_generic.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 21f709644699dca4014691d050ff08990023b6d3 Mon Sep 17 00:00:00 2001 -From: q66 -Date: Fri, 19 Jun 2020 16:42:24 +0200 -Subject: [PATCH] Add posix-generic which uses gcc builtins instead of - arch-specific assembly. We can then use this for all our archs. - -Also make sure our CFLAGS/LDFLAGS are respected. - ---- a/Make.linux -+++ b/Make.linux -@@ -4,12 +4,12 @@ - AS=as - RANLIB=ranlib - CC=cc --CFLAGS=-Wall -Wno-missing-braces -Wno-parentheses -ggdb -I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -D_THREAD_SAFE -DPTHREAD $(PTHREAD) `pkg-config --cflags libpipewire-0.3` -D_REENTRANT -O2 -+override CFLAGS := -fno-strict-aliasing -Wall -Wno-missing-braces -Wno-parentheses -I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -D_THREAD_SAFE -DPTHREAD $(PTHREAD) `pkg-config --cflags libpipewire-0.3` -D_REENTRANT $(CFLAGS) - O=o - OS=posix - GUI=wl --LDADD=-lwayland-client -lxkbcommon -ggdb -lm -lrt -lpipewire-0.3 --LDFLAGS=$(PTHREAD) -+LDADD=-lwayland-client -lxkbcommon -lm -lrt -lpipewire-0.3 -+override LDFLAGS := $(PTHREAD) $(LDFLAGS) - TARG=drawterm - # AUDIO=none - AUDIO=pipewire -@@ -17,5 +17,4 @@ - all: default - - libmachdep.a: -- arch=`uname -m|sed 's/i.86/386/;s/Power Macintosh/power/; s/x86_64/amd64/; s/armv[567].*/arm/; s/aarch64/arm64/'`; \ -- (cd posix-$$arch && make) -+ (cd posix-generic && $(MAKE)) -diff --git a/posix-generic/Makefile b/posix-generic/Makefile -new file mode 100644 -index 0000000..970204e ---- /dev/null -+++ b/posix-generic/Makefile -@@ -0,0 +1,15 @@ -+ROOT=.. -+include ../Make.config -+LIB=../libmachdep.a -+ -+OFILES=\ -+ getcallerpc.$O\ -+ tas.$O -+ -+default: $(LIB) -+$(LIB): $(OFILES) -+ $(AR) r $(LIB) $(OFILES) -+ $(RANLIB) $(LIB) -+ -+%.$O: %.c -+ $(CC) $(CFLAGS) $*.c -diff --git a/posix-generic/getcallerpc.c b/posix-generic/getcallerpc.c -new file mode 100644 -index 0000000..3614c59 ---- /dev/null -+++ b/posix-generic/getcallerpc.c -@@ -0,0 +1,8 @@ -+#include "u.h" -+#include "libc.h" -+ -+uintptr -+getcallerpc(void *a) -+{ -+ return ((uintptr*)a)[-1]; -+} -diff --git a/posix-generic/tas.c b/posix-generic/tas.c -new file mode 100644 -index 0000000..289f747 ---- /dev/null -+++ b/posix-generic/tas.c -@@ -0,0 +1,18 @@ -+#include "u.h" -+#include "libc.h" -+ -+int -+tas(int *x) -+{ -+ /* use a gcc __atomic builtin */ -+ int v = __atomic_exchange_n(x, 1, __ATOMIC_SEQ_CST); -+ switch(v) { -+ case 0: -+ case 1: -+ return v; -+ default: -+ print("canlock: corrupted 0x%lux\n", v); -+ return 1; -+ } -+} -+ --- -2.27.0 diff --git a/user/drawterm/template.py b/user/drawterm/template.py index 5de7db4a5d..ca848558eb 100644 --- a/user/drawterm/template.py +++ b/user/drawterm/template.py @@ -1,6 +1,6 @@ pkgname = "drawterm" -_commit = "789b8fe40e156ad0252230b13dd4ada96f3eed8b" -pkgver = "0_git20240909" +_commit = "d7620e8d528a87a3d6cf7285a839d52d4f705771" +pkgver = "0_git20241003" pkgrel = 0 build_style = "makefile" make_env = {"CONF": "linux"} @@ -22,7 +22,7 @@ f"!https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/raw/{_wlr_protocols_commit}/unstable/wlr-virtual-pointer-unstable-v1.xml>{_wlr_protocols_commit}.xml", ] sha256 = [ - "d5353af6d0557b345cb0df70141cdc9a443a747dc24d888f059750933ee2ad29", + "9c40457a26a5cd618092b454acf9225732a7e304b8c39e0dd0d58d4672ea0422", "3ff6d540be0bc5228195bf072bde42117ea17945a5c2061add5d3cf97d6bb524", ] # no tests