diff --git a/srcpkgs/picom/patches/arm32-build-failures.patch b/srcpkgs/picom/patches/arm32-build-failures.patch new file mode 100644 index 00000000000..d511e4bc446 --- /dev/null +++ b/srcpkgs/picom/patches/arm32-build-failures.patch @@ -0,0 +1,67 @@ +From 950eb6f7413db56ebf97ed95a299f84af6a47b97 Mon Sep 17 00:00:00 2001 +From: Yuxuan Shui +Date: Tue, 15 Oct 2024 02:40:20 +0100 +Subject: [PATCH] misc: fix build on arm32 + +Instead of using memcmp to compare windows_options, and thus relying on +the struct being laid out without padding, just compare the fields +one-by-one. + +Fixes #1355 + +Signed-off-by: Yuxuan Shui +--- + CHANGELOG.md | 6 ++++++ + src/config.h | 14 ++++++++------ + 2 files changed, 14 insertions(+), 6 deletions(-) + +diff --git a/CHANGELOG.md b/CHANGELOG.md +index 1483104232..bf65e9bbc7 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -1,3 +1,9 @@ ++# 12.x (unreleased) ++ ++## Build fixes ++ ++* Fix build on arm32 (#1355) ++ + # 12.3 (2024-Oct-14) + + ## Improvements +diff --git a/src/config.h b/src/config.h +index 369579acb8..b1d0f251e1 100644 +--- a/src/config.h ++++ b/src/config.h +@@ -199,9 +199,6 @@ struct window_maybe_options { + struct win_script animations[ANIMATION_TRIGGER_COUNT]; + }; + +-// Make sure `window_options` has no implicit padding. +-#pragma GCC diagnostic push +-#pragma GCC diagnostic error "-Wpadded" + /// Like `window_maybe_options`, but all fields are guaranteed to be set. + struct window_options { + double opacity; +@@ -220,13 +217,18 @@ struct window_options { + + struct win_script animations[ANIMATION_TRIGGER_COUNT]; + }; +-#pragma GCC diagnostic pop + + static inline bool + win_options_no_damage(const struct window_options *a, const struct window_options *b) { + // Animation changing does not immediately change how window is rendered, so +- // they don't cause damage. +- return memcmp(a, b, offsetof(struct window_options, animations)) == 0; ++ // they don't cause damage; all other options do. ++ return a->opacity == b->opacity && a->dim == b->dim && ++ a->corner_radius == b->corner_radius && a->unredir == b->unredir && ++ a->transparent_clipping == b->transparent_clipping && ++ a->shadow == b->shadow && a->invert_color == b->invert_color && ++ a->blur_background == b->blur_background && a->fade == b->fade && ++ a->clip_shadow_above == b->clip_shadow_above && a->paint == b->paint && ++ a->full_shadow == b->full_shadow && a->shader == b->shader; + } + + /// Structure representing all options. diff --git a/srcpkgs/picom/template b/srcpkgs/picom/template index 58e70dce623..b090d2bf183 100644 --- a/srcpkgs/picom/template +++ b/srcpkgs/picom/template @@ -1,20 +1,18 @@ # Template file for 'picom' pkgname=picom -version=11.2 +version=12.3 revision=1 build_style=meson configure_args="-Dwith_docs=true" -hostmakedepends="pkg-config asciidoc" -makedepends="MesaLib-devel dbus-devel libconfig-devel libepoxy-devel libev-devel - pcre2-devel pixman-devel xcb-util-image-devel xcb-util-renderutil-devel - libxdg-basedir-devel uthash" -depends="desktop-file-utils" +hostmakedepends="pkg-config ruby-asciidoctor" +makedepends="dbus-devel libconfig-devel libepoxy-devel libev-devel pcre2-devel + pixman-devel uthash xcb-util-image-devel xcb-util-renderutil-devel" short_desc="Lightweight compositor for X11 (previously a compton fork)" maintainer="0x5c " -license="MIT, MPL-2.0" +license="MPL-2.0 AND MIT" homepage="https://github.com/yshui/picom/" distfiles="https://github.com/yshui/picom/archive/v${version}.tar.gz" -checksum=1c1063936faf09ed9bba726e7737a562564b7a5f8cdef79d48fcdaf3669a4df4 +checksum=926142c667c9e5b5205a11b2755fb9ca39c3e696365792d705a45d84e34d7a68 post_install() { vlicense LICENSES/MIT