From 824a0a00aa0bb22429269227f536d6eea7b6b325 Mon Sep 17 00:00:00 2001 From: obosob Date: Thu, 2 Feb 2023 12:32:40 +0000 Subject: [PATCH] New package: warpd 1.3.5 --- srcpkgs/warpd/patches/makefile.patch | 74 ++++++++++++++++++++++++++++ srcpkgs/warpd/template | 24 +++++++++ 2 files changed, 98 insertions(+) create mode 100644 srcpkgs/warpd/patches/makefile.patch create mode 100644 srcpkgs/warpd/template diff --git a/srcpkgs/warpd/patches/makefile.patch b/srcpkgs/warpd/patches/makefile.patch new file mode 100644 index 000000000000..fb49861e69e9 --- /dev/null +++ b/srcpkgs/warpd/patches/makefile.patch @@ -0,0 +1,74 @@ +diff --git a/Makefile b/Makefile +index 064ac65..891f791 100644 +--- a/Makefile ++++ b/Makefile +@@ -11,7 +11,9 @@ ifeq ($(PLATFORM), macos) + endif + + %.o: %.c Makefile mk/*.mk +- $(CC) -c $< -o $@ $(CFLAGS) ++ $(CC) -c $< -o $@ $(DEFS) $(INCLUDES) $(CFLAGS) ++ ++DEFS=-DVERSION='"v$(VERSION)$(COMMITSTR)"' + + CFLAGS:=-g\ + -Wall\ +@@ -20,7 +22,6 @@ CFLAGS:=-g\ + -Wno-deprecated-declarations\ + -Wno-unused-parameter\ + -std=c99\ +- -DVERSION='"v$(VERSION)$(COMMITSTR)"'\ + -D_DEFAULT_SOURCE \ + -D_FORTIFY_SOURCE=2 $(CFLAGS) + +diff --git a/mk/linux.mk b/mk/linux.mk +index bdfc558..4c91817 100644 +--- a/mk/linux.mk ++++ b/mk/linux.mk +@@ -1,25 +1,29 @@ + CFILES=$(shell find src/platform/linux/*.c src/*.c) ++LIBS= + + ifndef DISABLE_WAYLAND +- CFLAGS+=-lwayland-client\ ++ LIBS+=-lwayland-client\ + -lxkbcommon\ + -lcairo\ + -lrt\ +- -DWARPD_WAYLAND=1 ++ ++ DEFS+=-DWARPD_WAYLAND=1 + + CFILES+=$(shell find src/platform/linux/wayland/ -name '*.c') + endif + + ifndef DISABLE_X +- CFLAGS+=-I/usr/include/freetype2/\ +- -lXfixes\ ++ INCLUDES+=-I/usr/include/freetype2 ++ ++ LIBS+=-lXfixes\ + -lXext\ + -lXinerama\ + -lXi\ + -lXtst\ + -lX11\ +- -lXft\ +- -DWARPD_X=1 ++ -lXft ++ ++ DEFS+=-DWARPD_X=1 + + CFILES+=$(shell find src/platform/linux/X/*.c) + endif +@@ -27,8 +31,8 @@ endif + OBJECTS=$(CFILES:.c=.o) + + all: $(OBJECTS) +- -mkdir bin +- $(CC) -o bin/warpd $(OBJECTS) $(CFLAGS) ++ -mkdir -p bin ++ $(CC) -o bin/warpd $(OBJECTS) $(CFLAGS) $(LDFLAGS) $(LIBS) + clean: + -rm $(OBJECTS) + -rm -r bin diff --git a/srcpkgs/warpd/template b/srcpkgs/warpd/template new file mode 100644 index 000000000000..a2afb707ca47 --- /dev/null +++ b/srcpkgs/warpd/template @@ -0,0 +1,24 @@ +# Template file for 'warpd' +pkgname=warpd +version=v1.3.5 +revision=1 +build_style=gnu-makefile +hostmakedepends="" +make_build_args="$(vopt_if x11 "" "DISABLE_X=1") $(vopt_if wayland "" "DISABLE_WAYLAND=1")" +makedepends="$(vopt_if x11 "libXi-devel libXinerama-devel libXft-devel libXfixes-devel libXtst-devel libX11-devel") +$(vopt_if wayland "wayland-devel cairo-devel libxkbcommon-devel")" +depends="$(vopt_if x11 "libXi libXinerama libXft libXfixes libXtst libX11") +$(vopt_if wayland "wayland cairo libxkbcommon")" +short_desc="A modal keyboard-driven virtual pointer" +maintainer="obosob " +license="MIT" +homepage="https://github.com/rvaiya/warpd" +changelog="https://raw.githubusercontent.com/rvaiya/warpd/master/CHANGELOG.md" +distfiles="https://github.com/rvaiya/warpd/archive/refs/tags/${version}.tar.gz" +checksum=708f551c7a3637319cca320a2849c334a69a7294c3bf268a3b2fbd5de6d980af + +build_options="x11 wayland" +build_options_default="$build_options" + +desc_option_x11="Enable support for X" +desc_option_wayland="Enable support for Wayland"