public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: x11-wm/wmfs/, x11-wm/wmfs/files/
@ 2020-01-27 18:40 Jeroen Roovers
  0 siblings, 0 replies; 2+ messages in thread
From: Jeroen Roovers @ 2020-01-27 18:40 UTC (permalink / raw
  To: gentoo-commits

commit:     76fd4de2a8574b255cb8c84fd769a2eabc8b3aca
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 27 18:02:11 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Mon Jan 27 18:40:41 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76fd4de2

x11-wm/wmfs: Fix CFLAGS=-fno-common

- EAPI=7
- Convert sed script to patch
- Fix W and event_handle for CFLAGS=-fno-common
- Respect CC
- Apply one lingering upstream patch

Package-Manager: Portage-2.3.85, Repoman-2.3.20
Closes: https://bugs.gentoo.org/show_bug.cgi?id=706654
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 x11-wm/wmfs/files/wmfs-99999999-Debian.patch     | 11 +++
 x11-wm/wmfs/files/wmfs-99999999-fno-common.patch | 92 ++++++++++++++++++++++++
 x11-wm/wmfs/files/wmfs-99999999-strncat.patch    | 20 ++++++
 x11-wm/wmfs/wmfs-99999999.ebuild                 | 19 +++--
 4 files changed, 132 insertions(+), 10 deletions(-)

diff --git a/x11-wm/wmfs/files/wmfs-99999999-Debian.patch b/x11-wm/wmfs/files/wmfs-99999999-Debian.patch
new file mode 100644
index 00000000000..dde3497e640
--- /dev/null
+++ b/x11-wm/wmfs/files/wmfs-99999999-Debian.patch
@@ -0,0 +1,11 @@
+--- a/configure
++++ b/configure
+@@ -81,7 +81,7 @@ fi
+ [ -n "$USE_XFT" ] && CFLAGS="$CFLAGS -DHAVE_XFT"
+ 
+ # Debian hardening options http://wiki.debian.org/Hardening
+-which dpkg-buildflags > /dev/null 2>&1
++false
+ if [ $? -eq 0 ];
+ then
+     CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 `dpkg-buildflags --get CFLAGS`"

diff --git a/x11-wm/wmfs/files/wmfs-99999999-fno-common.patch b/x11-wm/wmfs/files/wmfs-99999999-fno-common.patch
new file mode 100644
index 00000000000..0ff0ce0ebc9
--- /dev/null
+++ b/x11-wm/wmfs/files/wmfs-99999999-fno-common.patch
@@ -0,0 +1,92 @@
+--- a/src/client.c
++++ b/src/client.c
+@@ -12,6 +12,7 @@
+ #include "draw.h"
+ #include "screen.h"
+ #include "mouse.h"
++#include "wmfs.h"
+ 
+ #define CLIENT_RESIZE_DIR(D)                                    \
+      void uicb_client_resize_##D(Uicb cmd)                      \
+--- 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)
+ {
+--- 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 */
+--- a/src/ewmh.c
++++ b/src/ewmh.c
+@@ -7,6 +7,7 @@
+ #include "util.h"
+ #include "screen.h"
+ #include "client.h"
++#include "wmfs.h"
+ 
+ /* Taken From standards.freedesktop.org */
+ #define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
+--- a/src/mouse.c
++++ b/src/mouse.c
+@@ -9,6 +9,7 @@
+ #include "client.h"
+ #include "layout.h"
+ #include "draw.h"
++#include "wmfs.h"
+ 
+ #define _REV_SBORDER(c) draw_reversed_rect(W->root, c, false);
+ 
+--- a/src/status.c
++++ b/src/status.c
+@@ -9,6 +9,7 @@
+ #include "infobar.h"
+ #include "util.h"
+ #include "draw.h"
++#include "wmfs.h"
+ 
+ #include <string.h>
+ 
+--- 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)
+ {
+@@ -617,8 +619,6 @@ main(int argc, char **argv)
+           }
+      }
+ 
+-     W = (struct wmfs*)xcalloc(1, sizeof(struct wmfs));
+-
+      /* Default path ~/.config/wmfs/wmfsrc */
+      W->confpath = path;
+ 
+--- 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 */

diff --git a/x11-wm/wmfs/files/wmfs-99999999-strncat.patch b/x11-wm/wmfs/files/wmfs-99999999-strncat.patch
new file mode 100644
index 00000000000..e55cd00121b
--- /dev/null
+++ b/x11-wm/wmfs/files/wmfs-99999999-strncat.patch
@@ -0,0 +1,20 @@
+--- a/src/launcher.c
++++ b/src/launcher.c
+@@ -366,7 +366,7 @@
+                if(pos && (end = complete(&cache, tmpbuf)))
+                {
+                     strncpy(buf, tmpbuf, sizeof(buf));
+-                    strncat(buf, end, sizeof(buf));
++                    strncat(buf, end, sizeof(buf) - 1);
+                     found = true;
+                }
+ 
+@@ -387,7 +387,7 @@
+ 
+           default:
+                lastwastab = false;
+-               strncat(buf, tmp, sizeof(tmp));
++               strncat(buf, tmp, sizeof(buf) - 1);
+                ++pos;
+                break;
+           }

diff --git a/x11-wm/wmfs/wmfs-99999999.ebuild b/x11-wm/wmfs/wmfs-99999999.ebuild
index f152990663f..a2a1959136e 100644
--- a/x11-wm/wmfs/wmfs-99999999.ebuild
+++ b/x11-wm/wmfs/wmfs-99999999.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
-inherit eutils git-r3
+EAPI=7
+inherit git-r3 toolchain-funcs
 
 DESCRIPTION="Window Manager From Scratch, A tiling window manager highly configurable"
 HOMEPAGE="https://github.com/xorg62/wmfs"
@@ -26,15 +26,14 @@ DEPEND="
 	virtual/pkgconfig
 	x11-base/xorg-proto
 "
-
-src_prepare() {
-	epatch \
-		"${FILESDIR}"/${PN}-99999999-desktop.patch
-
-	sed -i -e '/^which dpkg/s|.*|false|g' configure || die
-}
+PATCHES=(
+	"${FILESDIR}"/${PN}-99999999-Debian.patch
+	"${FILESDIR}"/${PN}-99999999-desktop.patch
+	"${FILESDIR}"/${PN}-99999999-fno-common.patch
+)
 
 src_configure() {
+	tc-export CC
 	# not autotools based
 	local ECHO
 	for ECHO in echo ''; do


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: x11-wm/wmfs/, x11-wm/wmfs/files/
@ 2020-06-24  6:21 Jeroen Roovers
  0 siblings, 0 replies; 2+ messages in thread
From: Jeroen Roovers @ 2020-06-24  6:21 UTC (permalink / raw
  To: gentoo-commits

commit:     4d2516ef563fdf2a533b427a139f7552da97dfd7
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 24 06:20:46 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed Jun 24 06:21:33 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d2516ef

x11-wm/wmfs: Actually apply dropped patch instead

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 x11-wm/wmfs/files/wmfs-99999999-strncat.patch | 20 ++++++++++++++++++++
 x11-wm/wmfs/wmfs-99999999.ebuild              |  1 +
 2 files changed, 21 insertions(+)

diff --git a/x11-wm/wmfs/files/wmfs-99999999-strncat.patch b/x11-wm/wmfs/files/wmfs-99999999-strncat.patch
new file mode 100644
index 00000000000..e55cd00121b
--- /dev/null
+++ b/x11-wm/wmfs/files/wmfs-99999999-strncat.patch
@@ -0,0 +1,20 @@
+--- a/src/launcher.c
++++ b/src/launcher.c
+@@ -366,7 +366,7 @@
+                if(pos && (end = complete(&cache, tmpbuf)))
+                {
+                     strncpy(buf, tmpbuf, sizeof(buf));
+-                    strncat(buf, end, sizeof(buf));
++                    strncat(buf, end, sizeof(buf) - 1);
+                     found = true;
+                }
+ 
+@@ -387,7 +387,7 @@
+ 
+           default:
+                lastwastab = false;
+-               strncat(buf, tmp, sizeof(tmp));
++               strncat(buf, tmp, sizeof(buf) - 1);
+                ++pos;
+                break;
+           }

diff --git a/x11-wm/wmfs/wmfs-99999999.ebuild b/x11-wm/wmfs/wmfs-99999999.ebuild
index a2a1959136e..416f8f678db 100644
--- a/x11-wm/wmfs/wmfs-99999999.ebuild
+++ b/x11-wm/wmfs/wmfs-99999999.ebuild
@@ -30,6 +30,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-99999999-Debian.patch
 	"${FILESDIR}"/${PN}-99999999-desktop.patch
 	"${FILESDIR}"/${PN}-99999999-fno-common.patch
+	"${FILESDIR}"/${PN}-99999999-strncat.patch
 )
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-24  6:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-27 18:40 [gentoo-commits] repo/gentoo:master commit in: x11-wm/wmfs/, x11-wm/wmfs/files/ Jeroen Roovers
  -- strict thread matches above, loose matches on Subject: below --
2020-06-24  6:21 Jeroen Roovers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox