From 2e83d9e4017d14d5916745a0d9258198c9387f15 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sun, 8 Sep 2024 14:23:33 -0700 Subject: [PATCH] community/sxmo-dwm: fix build with GCC 14 --- community/sxmo-dwm/APKBUILD | 4 +++- community/sxmo-dwm/gcc14.patch | 43 ++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 community/sxmo-dwm/gcc14.patch diff --git a/community/sxmo-dwm/APKBUILD b/community/sxmo-dwm/APKBUILD index 0bb4eff54f8..d95676d1a23 100644 --- a/community/sxmo-dwm/APKBUILD +++ b/community/sxmo-dwm/APKBUILD @@ -13,7 +13,8 @@ subpackages="$pkgname-doc" provides="dwm" provider_priority=10 options="!check" # has no tests -source="$pkgname-$pkgver-2.tar.gz::https://git.sr.ht/~mil/sxmo-dwm/archive/$pkgver.tar.gz" +source="$pkgname-$pkgver-2.tar.gz::https://git.sr.ht/~mil/sxmo-dwm/archive/$pkgver.tar.gz + gcc14.patch" prepare() { default_prepare @@ -44,4 +45,5 @@ package() { sha512sums=" 9a2cfdde48101d56b2f0f91b56b9b51e4cee2e0be195b3d93155950df312ffe3fa79c74a77a3cecf3456ba3b56373230b56aa54b9841791f466af306b181c869 sxmo-dwm-6.3.0-2.tar.gz +9e656717f4e15721cc718f115f27b2267bc7a9d979b7429d1594107309d150ac43421b0609c1af99b3c2d3eeee7e655138c0c4c225d10704f12bc1e65773de7a gcc14.patch " diff --git a/community/sxmo-dwm/gcc14.patch b/community/sxmo-dwm/gcc14.patch new file mode 100644 index 00000000000..cc6b830403d --- /dev/null +++ b/community/sxmo-dwm/gcc14.patch @@ -0,0 +1,43 @@ +--- sxmo-dwm-6.3.0.orig/dwm.c ++++ sxmo-dwm-6.3.0/dwm.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + #ifdef XINERAMA + #include + #endif /* XINERAMA */ +@@ -961,6 +962,11 @@ + return m; + } + ++int ++iswide() { ++ return sw > 1000 ? 1 : 0; ++} ++ + void + drawbar(Monitor *m) + { +@@ -1267,11 +1273,6 @@ + } + #endif /* XINERAMA */ + +-int +-iswide() { +- return sw > 1000 ? 1 : 0; +-} +- + void + markhold(KeySym keysym) + { +@@ -1976,7 +1977,7 @@ + /* init appearance */ + scheme = ecalloc(LENGTH(colors), sizeof(Clr *)); + for (i = 0; i < LENGTH(colors); i++) +- scheme[i] = drw_scm_create(drw, colors[i], 3); ++ scheme[i] = drw_scm_create(drw, (const char **) colors[i], 3); + for (j = 0; j <= SchemeTabInactive; ++j) { + free(colors[j][ColFg]); + free(colors[j][ColBg]);