summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlack_Codec2022-09-18 16:00:48 +0200
committerBlack_Codec2022-09-18 16:00:48 +0200
commit48458267bdc09e9425076f2dfab457a2f4484820 (patch)
treef2c47e94c48d5a2429a8c5bbb36f7dd5d0db678a
parent1993178916227be1db578c4e7f0b8df1a807e23a (diff)
downloadaur-wmfs2-git.tar.gz
gcc-10 patch added
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD14
-rw-r--r--gcc-10.patch73
3 files changed, 87 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a60f730418ee..2b43a150b062 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Fri Mar 4 20:31:45 UTC 2016
pkgbase = wmfs2-git
pkgdesc = A lightweight and highly configurable tiling window manager for X
- pkgver = r442.3c701a9
- pkgrel = 3
+ pkgver = r459.b7b8ff8
+ pkgrel = 1
url = https://github.com/xorg62/wmfs
arch = i686
arch = x86_64
@@ -17,7 +15,8 @@ pkgbase = wmfs2-git
conflicts = wmfs
conflicts = wmfs-git
source = git+https://github.com/xorg62/wmfs.git
+ source = gcc-10.patch
md5sums = SKIP
+ md5sums = 4031b1efc5437fa641c279d7b67f6776
pkgname = wmfs2-git
-
diff --git a/PKGBUILD b/PKGBUILD
index 64342e43ca84..3dcf58f00e6d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
# Original Contributor: Erufu / Sébastien Lacroix <erufu.sennin@gmail.com>
pkgname=wmfs2-git
-pkgver=r442.3c701a9
-pkgrel=3
+pkgver=r459.b7b8ff8
+pkgrel=1
pkgdesc="A lightweight and highly configurable tiling window manager for X"
arch=('i686' 'x86_64')
url="https://github.com/xorg62/wmfs"
@@ -12,8 +12,10 @@ depends=('libxft' 'imlib2' 'libxinerama' 'libxrandr')
makedepends=('git')
provides=('wmfs2')
conflicts=('wmfs' 'wmfs-git')
-source=("git+https://github.com/xorg62/wmfs.git")
-md5sums=('SKIP')
+source=("git+https://github.com/xorg62/wmfs.git"
+ 'gcc-10.patch')
+md5sums=('SKIP'
+ '4031b1efc5437fa641c279d7b67f6776')
_pkgname="wmfs"
pkgver() {
@@ -24,6 +26,10 @@ pkgver() {
)
}
+prepare() {
+ cd "${_pkgname}"
+ patch -Np1 < ../gcc-10.patch
+}
build() {
cd "$srcdir/$_pkgname"
export CFLAGS=""
diff --git a/gcc-10.patch b/gcc-10.patch
new file mode 100644
index 000000000000..749cf2458c6b
--- /dev/null
+++ b/gcc-10.patch
@@ -0,0 +1,73 @@
+From e4ec12618f4689d791892ebb49df9610a25d24d3 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Fri, 6 May 2022 18:57:38 +0100
+Subject: [PATCH] Fix builf on -fno-common toolchains
+
+gcc-10 changed the default from -fcommon to fno-common:
+ https://gcc.gnu.org/PR85678
+
+As a result build fails as:
+
+ ld: src/log.o:(.bss+0x0): multiple definition of `W'; src/barwin.o:(.bss+0x0): first defined here
+ ld: src/wmfs.o:(.bss+0x0): multiple definition of `W'; src/barwin.o:(.bss+0x0): first defined here
+ ld: src/wmfs.o:(.bss+0x10): multiple definition of `event_handle'; src/client.o:(.bss+0x10): first defined here
+
+The change moves definitions into .c files.
+---
+ src/event.c | 3 +++
+ src/event.h | 2 +-
+ src/wmfs.c | 2 ++
+ src/wmfs.h | 2 +-
+ 4 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/event.c b/src/event.c
+index 5f788573..739b703d 100644
+--- a/src/event.c
++++ b/src/event.c
+@@ -21,6 +21,9 @@
+ if(!m->use_area || (m->use_area && INAREA(ev->x, ev->y, m->area))) \
+ if(m->func) \
+ m->func(m->cmd);
++
++void (*event_handle[MAX_EV])(XEvent*);
++
+ static void
+ event_buttonpress(XEvent *e)
+ {
+diff --git a/src/event.h b/src/event.h
+index bc74fd87..1db72efa 100644
+--- a/src/event.h
++++ b/src/event.h
+@@ -17,6 +17,6 @@
+
+ void event_init(void);
+
+-void (*event_handle[MAX_EV])(XEvent*);
++extern void (*event_handle[MAX_EV])(XEvent*);
+
+ #endif /* EVENT_H */
+diff --git a/src/wmfs.c b/src/wmfs.c
+index 4d1a4492..ec1f7f62 100644
+--- a/src/wmfs.c
++++ b/src/wmfs.c
+@@ -25,6 +25,8 @@
+ #include "layout.h"
+ #include "systray.h"
+
++struct wmfs *W;
++
+ int
+ wmfs_error_handler(Display *d, XErrorEvent *event)
+ {
+diff --git a/src/wmfs.h b/src/wmfs.h
+index c312e365..2321032f 100644
+--- a/src/wmfs.h
++++ b/src/wmfs.h
+@@ -444,6 +444,6 @@ void uicb_reload(Uicb cmd);
+ void uicb_quit(Uicb cmd);
+
+ /* Single global variable */
+-struct wmfs *W;
++extern struct wmfs *W;
+
+ #endif /* WMFS_H */