diff --git a/packages/waypipe/build.sh b/packages/waypipe/build.sh index 2b0edb05500d39..5259012606da26 100644 --- a/packages/waypipe/build.sh +++ b/packages/waypipe/build.sh @@ -1,11 +1,11 @@ TERMUX_PKG_HOMEPAGE=https://gitlab.freedesktop.org/mstoeckl/waypipe TERMUX_PKG_DESCRIPTION="A proxy for Wayland clients" TERMUX_PKG_LICENSE="MIT" +TERMUX_PKG_LICENSE_FILE="LICENSE.MIT" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION="0.9.2" -TERMUX_PKG_REVISION=2 +TERMUX_PKG_VERSION="0.10.0" TERMUX_PKG_SRCURL=https://gitlab.freedesktop.org/mstoeckl/waypipe/-/archive/v${TERMUX_PKG_VERSION}/waypipe-v${TERMUX_PKG_VERSION}.tar.bz2 -TERMUX_PKG_SHA256=ef0783ba95abb950cb0e876e1d186de77905759ed7406ec23973f46cab96b5ee +TERMUX_PKG_SHA256=cd49f56c4b4574801f8199894ff278262fa6b75f1a989ffe7270cb2735df42f8 TERMUX_PKG_AUTO_UPDATE=true TERMUX_PKG_DEPENDS="libandroid-spawn, liblz4, libwayland, zstd" TERMUX_PKG_BUILD_DEPENDS="libwayland-protocols, scdoc" @@ -14,7 +14,10 @@ TERMUX_PKG_BUILD_DEPENDS="libwayland-protocols, scdoc" # -Dwith_dmabuf=disabled appears to cause -Dwith_video=enabled to have no effect, # preventing the compilation of any calls to FFmpeg API. TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-Dbuild_c=true +-Dbuild_rs=false -Dman-pages=enabled +-Dtests=false -Dwerror=false -Dwith_video=disabled -Dwith_dmabuf=disabled @@ -28,3 +31,8 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" termux_step_pre_configure() { LDFLAGS+=" -landroid-spawn" } + +termux_step_post_make_install() { + # keep executable name same as previous + mv -v "${TERMUX_PREFIX}"/bin/{waypipe-c,waypipe} +} diff --git a/packages/waypipe/meson.build.patch b/packages/waypipe/meson.build.patch index a984c98a68b903..ef00b9e603b457 100644 --- a/packages/waypipe/meson.build.patch +++ b/packages/waypipe/meson.build.patch @@ -1,15 +1,12 @@ --- a/meson.build +++ b/meson.build -@@ -112,11 +112,10 @@ - - subdir('protocols') - subdir('src') --subdir('test') - - scdoc = dependency('scdoc', version: '>=1.9.4', native: true, required: get_option('man-pages')) +@@ -207,8 +207,7 @@ + ) if scdoc.found() -- scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true) -+ scdoc_prog = find_program('scdoc') - sh = find_program('sh', native: true) - mandir = get_option('mandir') - custom_target( + scdoc_prog = find_program( +- scdoc.get_variable(pkgconfig: 'scdoc'), +- native: true, ++ 'scdoc' + ) + sh = find_program('sh', native: true) + mandir = get_option('mandir') diff --git a/packages/waypipe/src-meson.build.patch b/packages/waypipe/src-meson.build.patch deleted file mode 100644 index b4f6b053e4b7ed..00000000000000 --- a/packages/waypipe/src-meson.build.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/meson.build -+++ b/src/meson.build -@@ -1,8 +1,6 @@ - - waypipe_source_files = ['dmabuf.c', 'handlers.c', 'kernel.c', 'mainloop.c', 'parsing.c', 'platform.c', 'shadow.c', 'interval.c', 'util.c', 'video.c'] - waypipe_deps = [ -- pthreads, # To run expensive computations in parallel -- rt, # For shared memory - ] - if config_data.has('HAS_DMABUF') - # General GPU buffer creation, aligned with dmabuf proto -@@ -53,7 +51,7 @@ - config_data.set('HAVE_NEON', 1, description: 'Compiler supports NEON') - endif - if config_data.has('HAS_SECURITY_CONTEXT') -- wayland_scanner_prog = find_program(wayland_scanner.get_variable(pkgconfig: 'wayland_scanner')) -+ wayland_scanner_prog = find_program('wayland-scanner') - wl_security_context_xml = '../protocols/security-context-v1.xml' - protocols_src += custom_target( - 'security-context-v1-protocol.c', diff --git a/packages/waypipe/src-secctx.c.patch b/packages/waypipe/src-secctx.c.patch deleted file mode 100644 index 37388d9a2bdd24..00000000000000 --- a/packages/waypipe/src-secctx.c.patch +++ /dev/null @@ -1,11 +0,0 @@ -https://gitlab.freedesktop.org/mstoeckl/waypipe/-/commit/eccbb5cbf1e3623af47518a1c4ec776820667cab - ---- a/src/secctx.c -+++ b/src/secctx.c -@@ -1,5 +1,6 @@ - #include "security-context-v1-protocol.h" - #include "util.h" -+#include - #include - #include - #include diff --git a/packages/waypipe/waypipe-c-meson.build.patch b/packages/waypipe/waypipe-c-meson.build.patch new file mode 100644 index 00000000000000..a502d30a05e6d5 --- /dev/null +++ b/packages/waypipe/waypipe-c-meson.build.patch @@ -0,0 +1,11 @@ +--- a/waypipe-c/meson.build ++++ b/waypipe-c/meson.build +@@ -218,7 +218,7 @@ + endif + if config_data.has('HAS_SECURITY_CONTEXT') + wayland_scanner_prog = find_program( +- wayland_scanner.get_variable(pkgconfig: 'wayland_scanner'), ++ 'wayland-scanner' + ) + wl_security_context_xml = '../protocols/security-context-v1.xml' + protocols_src += custom_target( diff --git a/packages/waypipe/src-platform.c.patch b/packages/waypipe/waypipe-c-platform.c.patch similarity index 86% rename from packages/waypipe/src-platform.c.patch rename to packages/waypipe/waypipe-c-platform.c.patch index 507f9e123812c0..09a52c7316e57b 100644 --- a/packages/waypipe/src-platform.c.patch +++ b/packages/waypipe/waypipe-c-platform.c.patch @@ -1,5 +1,5 @@ ---- a/src/platform.c -+++ b/src/platform.c +--- a/waypipe-c/platform.c ++++ b/waypipe-c/platform.c @@ -50,6 +50,10 @@ #if defined(__linux__) /* memfd_create was introduced in glibc 2.27 */ diff --git a/packages/waypipe/src-util.c.patch b/packages/waypipe/waypipe-c-util.c.patch similarity index 90% rename from packages/waypipe/src-util.c.patch rename to packages/waypipe/waypipe-c-util.c.patch index 602f102d45bdf5..7bc29d706851d2 100644 --- a/packages/waypipe/src-util.c.patch +++ b/packages/waypipe/waypipe-c-util.c.patch @@ -1,5 +1,5 @@ ---- a/src/util.c -+++ b/src/util.c +--- a/waypipe-c/util.c ++++ b/waypipe-c/util.c @@ -255,8 +255,8 @@ i, i); } else { diff --git a/packages/waypipe/src-waypipe.c.patch b/packages/waypipe/waypipe-c-waypipe.c.patch similarity index 72% rename from packages/waypipe/src-waypipe.c.patch rename to packages/waypipe/waypipe-c-waypipe.c.patch index 2878f116680825..cbb26237f3f219 100644 --- a/packages/waypipe/src-waypipe.c.patch +++ b/packages/waypipe/waypipe-c-waypipe.c.patch @@ -1,6 +1,6 @@ ---- a/src/waypipe.c -+++ b/src/waypipe.c -@@ -79,8 +79,8 @@ +--- a/waypipe-c/waypipe.c ++++ b/waypipe-c/waypipe.c +@@ -80,8 +80,8 @@ " -n, --no-gpu disable protocols which would use GPU resources\n" " -o, --oneshot only permit one connected application\n" " -s, --socket S set the socket path to either create or connect to:\n" @@ -9,9 +9,18 @@ + " server default: @TERMUX_PREFIX@/tmp/waypipe-server.sock\n" + " client default: @TERMUX_PREFIX@/tmp/waypipe-client.sock\n" " ssh: sets the prefix for the socket path\n" + " vsock: [[s]CID:]port\n" " --version print waypipe version and exit\n" - " --allow-tiled allow gpu buffers (DMABUFs) with format modifiers\n" -@@ -757,7 +757,7 @@ +@@ -863,7 +863,7 @@ + /* Create a new socket, send it to the compositor to attach + * a security context and write it to WAYLAND_DISPLAY */ + char secctx_sock_path[108]; +- sprintf(secctx_sock_path, "/tmp/waypipe-secctx-%d", getpid()); ++ sprintf(secctx_sock_path, "@TERMUX_PREFIX@/tmp/waypipe-secctx-%d", getpid()); + unlink(secctx_sock_path); + char instance_id[21]; + sprintf(instance_id, "%d", getpid()); +@@ -898,7 +898,7 @@ } else { struct socket_path client_sock_path; client_sock_path.folder = @@ -20,7 +29,7 @@ client_sock_path.filename = &sockaddr; if (!socketpath) { sockaddr.sun_family = AF_UNIX; -@@ -799,7 +799,7 @@ +@@ -954,7 +954,7 @@ } else { struct socket_path server_sock_path; server_sock_path.folder = @@ -29,7 +38,7 @@ server_sock_path.filename = &sockaddr; if (!socketpath) { sockaddr.sun_family = AF_UNIX; -@@ -830,8 +830,8 @@ +@@ -985,8 +985,8 @@ } else { clientsock.sun_family = AF_UNIX; strcpy(clientsock.sun_path, "waypipe");