diff --git a/srcpkgs/zwm/patches/fix-makefile.patch b/srcpkgs/zwm/patches/fix-makefile.patch new file mode 100644 index 00000000000..e54c9911f35 --- /dev/null +++ b/srcpkgs/zwm/patches/fix-makefile.patch @@ -0,0 +1,32 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,8 @@ + CC = gcc +-CFLAGS = -Wextra -Wshadow -Wunreachable-code -Wcast-align -Wuninitialized -finline-functions -finline-small-functions ++CFLAGS = -Wextra -Wshadow -Wunreachable-code -Wcast-align -Wuninitialized ++MYCFLAGS = -finline-functions -finline-small-functions + +-LDFLAGS = -lxcb -lxcb-util -lxcb-keysyms -lxcb-ewmh -lxcb-icccm -lxcb-randr -lxcb-xinerama -lxcb-cursor ++LIBS = -lxcb -lxcb-util -lxcb-keysyms -lxcb-ewmh -lxcb-icccm -lxcb-randr -lxcb-xinerama -lxcb-cursor + SRC_FILES = ./src/zwm.c ./src/logger.c ./src/tree.c ./src/config_parser.c ./src/queue.c + HEADER_FILES = ./src/logger.h ./src/tree.h ./src/type.h ./src/zwm.h ./src/config_parser.h ./src/helper.h ./src/queue.h + OBJ_FILES = $(SRC_FILES:.c=.o) +@@ -15,15 +16,15 @@ + MANPAGE = zwm.1 + + $(TARGET): $(OBJ_FILES) +- $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) ++ $(CC) $(CFLAGS) $(MYCFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) + + %.o: %.c $(HEADER_FILES) +- $(CC) $(CFLAGS) -c $< -o $@ ++ $(CC) $(CFLAGS) $(MYCLAGS) -c $< -o $@ + + clean: + rm -f $(TARGET) $(OBJ_FILES) + +-install: $(TARGET) ++install: + mkdir -p "$(DESTDIR)$(BINDIR)" + cp -pf $(TARGET) "$(DESTDIR)$(BINDIR)" + mkdir -p "$(DESTDIR)$(MANDIR)" diff --git a/srcpkgs/zwm/patches/fix-musl.patch b/srcpkgs/zwm/patches/fix-musl.patch new file mode 100644 index 00000000000..357666462a9 --- /dev/null +++ b/srcpkgs/zwm/patches/fix-musl.patch @@ -0,0 +1,11 @@ +--- a/src/logger.c ++++ b/src/logger.c +@@ -55,7 +55,7 @@ + if (!initialized) { + const char *homedir; + if ((homedir = getenv("HOME")) == NULL) { +- __uid_t id = getuid(); ++ uid_t id = getuid(); + struct passwd *pw = getpwuid(id); + if (pw == NULL) { + fprintf(stderr, "Failed to get home directory\n"); diff --git a/srcpkgs/zwm/template b/srcpkgs/zwm/template new file mode 100644 index 00000000000..4dd5e5260a1 --- /dev/null +++ b/srcpkgs/zwm/template @@ -0,0 +1,14 @@ +# Template file for 'zwm' +pkgname=zwm +version=0.1.12 +revision=1 +build_style=gnu-makefile +makedepends="libxcb-devel xcb-util-wm-devel xcb-util-keysyms-devel + xcb-util-devel xcb-util-cursor-devel" +depends="wmctrl" +short_desc="Minimal tiling window manager for X11" +maintainer="elbachir-one " +license="GPL-3.0-or-later" +homepage="https://github.com/Yazeed1s/zwm" +distfiles="https://github.com/Yazeed1s/zwm/archive/refs/tags/${version}.tar.gz" +checksum=331e0b0e646f162a8b83cde08077b6125141104bc84b7439ca4a3ec777a0004d